aboutsummaryrefslogtreecommitdiffstats
path: root/epan/dissectors/packet-enip.c
diff options
context:
space:
mode:
authorD. Ulis <daulis0@gmail.com>2016-12-05 07:43:03 -0500
committerMichael Mann <mmann78@netscape.net>2016-12-06 00:08:35 +0000
commit8773ea03cbcd72cc6463476e0342d6756d51267a (patch)
tree15f00bc8977ee31bd6eeab2154d541025b141925 /epan/dissectors/packet-enip.c
parenta94b82a8e1ca71d130ec5a77f7d71b2d6814aeef (diff)
CIP: Minor enhancements
1. ENIP: Display the CIP Forward Open Request packet number for connected data 2. CIP: Extended Network: Display expert info when the expected bytes does not match actual bytes 3. CIP: Look up more data fields as CIP service or Device Type 4. CIP: Display data as Dec/Hex, depending on how the spec shows things 5. Minor: Pull out common code into load_cip_request_data() 6. Minor: Text corrections Change-Id: I184ac3899786f650e4d4643a5dfe68bba785d6e0 Reviewed-on: https://code.wireshark.org/review/19092 Petri-Dish: Alexis La Goutte <alexis.lagoutte@gmail.com> Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org> Reviewed-by: Michael Mann <mmann78@netscape.net>
Diffstat (limited to 'epan/dissectors/packet-enip.c')
-rw-r--r--epan/dissectors/packet-enip.c25
1 files changed, 22 insertions, 3 deletions
diff --git a/epan/dissectors/packet-enip.c b/epan/dissectors/packet-enip.c
index f664818124..584518fe32 100644
--- a/epan/dissectors/packet-enip.c
+++ b/epan/dissectors/packet-enip.c
@@ -155,6 +155,7 @@ static int hf_enip_cpf_data = -1;
static int hf_enip_response_in = -1;
static int hf_enip_response_to = -1;
static int hf_enip_time = -1;
+static int hf_enip_fwd_open_in = -1;
static int hf_enip_connection_transport_data = -1;
/* Parsed Attributes */
@@ -2259,6 +2260,13 @@ dissect_cpf(enip_request_key_t *request_key, int command, tvbuff_t *tvb,
proto_item_append_text(enip_item, ", Connection ID: 0x%08X", tvb_get_letohl(tvb, offset + 6));
}
+ if (conn_info)
+ {
+ proto_item *it;
+ it = proto_tree_add_uint(tree, hf_enip_fwd_open_in, tvb, 0, 0, conn_info->open_frame);
+ PROTO_ITEM_SET_GENERATED(it);
+ }
+
break;
case UNCONNECTED_MSG_DTLS:
@@ -2572,6 +2580,13 @@ dissect_cpf(enip_request_key_t *request_key, int command, tvbuff_t *tvb,
proto_tree_add_item(item_tree, hf_enip_cpf_sai_connid, tvb, offset+6, 4, ENC_LITTLE_ENDIAN );
proto_tree_add_item(item_tree, hf_enip_cpf_sai_seqnum, tvb, offset+10, 4, ENC_LITTLE_ENDIAN );
+ if (conn_info)
+ {
+ proto_item *it;
+ it = proto_tree_add_uint(tree, hf_enip_fwd_open_in, tvb, 0, 0, conn_info->open_frame);
+ PROTO_ITEM_SET_GENERATED(it);
+ }
+
/* Add info to column */
col_add_fstr(pinfo->cinfo, COL_INFO, "Connection: ID=0x%08X, SEQ=%010d",
tvb_get_letohl( tvb, offset+6 ),
@@ -3220,8 +3235,8 @@ proto_register_enip(void)
/* Connected Data Item */
{ &hf_enip_cpf_cdi_seqcnt,
- { "Sequence Count", "enip.cpf.cdi.seqcnt",
- FT_UINT16, BASE_HEX, NULL, 0,
+ { "CIP Sequence Count", "enip.cpf.cdi.seqcnt",
+ FT_UINT16, BASE_DEC, NULL, 0,
"Common Packet Format: Connected Data Item, Sequence Count", HFILL }},
{ &hf_enip_cpf_cdi_32bitheader,
@@ -3277,7 +3292,7 @@ proto_register_enip(void)
"Common Packet Format: Sequenced Address Item, Connection Identifier", HFILL }},
{ &hf_enip_cpf_sai_seqnum,
- { "Sequence Number", "enip.cpf.sai.seq",
+ { "Encapsulation Sequence Number", "enip.cpf.sai.seq",
FT_UINT32, BASE_DEC, NULL, 0,
"Common Packet Format: Sequenced Address Item, Sequence Number", HFILL }},
@@ -3302,6 +3317,10 @@ proto_register_enip(void)
FT_RELATIVE_TIME, BASE_NONE, NULL, 0x0,
"The time between the Call and the Reply", HFILL }},
+ { &hf_enip_fwd_open_in,
+ { "Forward Open Request In", "enip.fwd_open_in",
+ FT_FRAMENUM, BASE_NONE, NULL, 0, NULL, HFILL } },
+
{ &hf_enip_connection_transport_data,
{ "Data", "enip.connection_transport_data",
FT_BYTES, BASE_NONE|BASE_ALLOW_ZERO, NULL, 0x0,