forked from osmocom/wireshark
Add dissector for CP "Cooper" 2179 Protocol
All credit for development should go Qiaoyin Yang CP2179 protocol is a serial based protocol. The 2179 protocol is implemented with minor variations between vendors. The RTAC implemented the 2179 client supporting a limited function codes and command codes. The RTAC doesn't support multiple function codes in a single request and the dissector also doesn't support decoding these or corresponding responses. Bug:10285 Change-Id: I217bf4185c52b0b183f69b3b5aa84613340d3944 Reviewed-on: https://code.wireshark.org/review/3089 Reviewed-by: Alexis La Goutte <alexis.lagoutte@gmail.com>
This commit is contained in:
parent
511e1fbf3e
commit
23adc871f4
4
AUTHORS
4
AUTHORS
|
@ -3607,6 +3607,10 @@ Sean O. Stalley <sean.stalley[AT]intel.com> {
|
|||
Dissector for Media Agnostic USB (MA USB)
|
||||
}
|
||||
|
||||
Qiaoyin Yang <qiaoyin.yang[AT]gmail.com> {
|
||||
Dissector for CP 'Cooper' 2179
|
||||
}
|
||||
|
||||
and by:
|
||||
|
||||
Georgi Guninski <guninski[AT]guninski.com>
|
||||
|
|
|
@ -124,6 +124,7 @@ corosync/totemnet
|
|||
corosync/totemsrp
|
||||
ceph
|
||||
Stateless Transport Tunneling
|
||||
CP 'Cooper' 2179
|
||||
--sort-and-group--
|
||||
|
||||
=== Updated Protocol Support
|
||||
|
|
|
@ -482,6 +482,7 @@ set(DISSECTOR_SRC
|
|||
dissectors/packet-corosync-totemnet.c
|
||||
dissectors/packet-corosync-totemsrp.c
|
||||
dissectors/packet-cosine.c
|
||||
dissectors/packet-cp2179.c
|
||||
dissectors/packet-cpfi.c
|
||||
dissectors/packet-cpha.c
|
||||
dissectors/packet-csm-encaps.c
|
||||
|
|
|
@ -405,6 +405,7 @@ DISSECTOR_SRC = \
|
|||
packet-corosync-totemnet.c \
|
||||
packet-corosync-totemsrp.c \
|
||||
packet-cosine.c \
|
||||
packet-cp2179.c \
|
||||
packet-cpfi.c \
|
||||
packet-cpha.c \
|
||||
packet-csm-encaps.c \
|
||||
|
|
File diff suppressed because it is too large
Load Diff
|
@ -93,6 +93,7 @@ static dissector_handle_t dnp3_handle;
|
|||
static dissector_handle_t modbus_handle;
|
||||
static dissector_handle_t synphasor_handle;
|
||||
static dissector_handle_t lg8979_handle;
|
||||
static dissector_handle_t cp2179_handle;
|
||||
|
||||
#define RTACSER_HEADER_LEN 12
|
||||
|
||||
|
@ -112,6 +113,7 @@ static dissector_handle_t lg8979_handle;
|
|||
#define RTACSER_PAYLOAD_MODBUS 3
|
||||
#define RTACSER_PAYLOAD_SYNPHASOR 4
|
||||
#define RTACSER_PAYLOAD_LG8979 5
|
||||
#define RTACSER_PAYLOAD_CP2179 6
|
||||
|
||||
/* Event Types */
|
||||
static const value_string rtacser_eventtype_vals[] = {
|
||||
|
@ -136,6 +138,7 @@ static const enum_val_t rtacser_payload_proto_type[] = {
|
|||
{ "MODBUS RTU", "MODBUS RTU", RTACSER_PAYLOAD_MODBUS },
|
||||
{ "SYNPHASOR ", "SYNPHASOR ", RTACSER_PAYLOAD_SYNPHASOR },
|
||||
{ "L&G 8979 ", "L&G 8979 ", RTACSER_PAYLOAD_LG8979 },
|
||||
{ "CP 2179 ", "CP 2179 ", RTACSER_PAYLOAD_CP2179 },
|
||||
{ NULL, NULL, 0 }
|
||||
};
|
||||
|
||||
|
@ -258,6 +261,10 @@ dissect_rtacser_data(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
|
|||
payload_tvb = tvb_new_subset_remaining(tvb, RTACSER_HEADER_LEN);
|
||||
call_dissector(lg8979_handle, payload_tvb, pinfo, tree);
|
||||
break;
|
||||
case RTACSER_PAYLOAD_CP2179:
|
||||
payload_tvb = tvb_new_subset_remaining(tvb, RTACSER_HEADER_LEN);
|
||||
call_dissector(cp2179_handle, payload_tvb, pinfo, tree);
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
|
@ -377,6 +384,7 @@ proto_reg_handoff_rtacser(void)
|
|||
modbus_handle = find_dissector("mbrtu");
|
||||
synphasor_handle = find_dissector("synphasor");
|
||||
lg8979_handle = find_dissector("lg8979");
|
||||
cp2179_handle = find_dissector("cp2179");
|
||||
|
||||
dissector_add_uint("wtap_encap", WTAP_ENCAP_RTAC_SERIAL, rtacser_handle);
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue