diff options
author | Anders Broman <anders.broman@ericsson.com> | 2013-10-24 16:41:04 +0000 |
---|---|---|
committer | Anders Broman <anders.broman@ericsson.com> | 2013-10-24 16:41:04 +0000 |
commit | f1f72f2f576b59e14a3efa74bea7d9cc238384f6 (patch) | |
tree | 108d7f3f2c054eec9b90a169c61ef3478b717555 | |
parent | e4e536bf1d94f2ff31938ce28cabea3b827dc5f5 (diff) |
From Zoltán Lajos Kis:
dissect echo messages.
https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=9283
svn path=/trunk/; revision=52816
-rw-r--r-- | epan/dissectors/packet-openflow_v4.c | 20 |
1 files changed, 19 insertions, 1 deletions
diff --git a/epan/dissectors/packet-openflow_v4.c b/epan/dissectors/packet-openflow_v4.c index d58a25bc32..e8612d0d7d 100644 --- a/epan/dissectors/packet-openflow_v4.c +++ b/epan/dissectors/packet-openflow_v4.c @@ -123,6 +123,7 @@ static int hf_openflow_v4_error_code = -1; static int hf_openflow_v4_error_data_text = -1; static int hf_openflow_v4_error_data_body = -1; static int hf_openflow_v4_error_experimenter = -1; +static int hf_openflow_v4_echo_data = -1; static int hf_openflow_v4_datapath_id = -1; static int hf_openflow_datapath_v4_mac = -1; static int hf_openflow_v4_datapath_impl = -1; @@ -1043,6 +1044,15 @@ dissect_openflow_error_v4(tvbuff_t *tvb, packet_info *pinfo _U_, proto_tree *tre } +static void +dissect_openflow_echo_v4(tvbuff_t *tvb, packet_info *pinfo _U_, proto_tree *tree, int offset, guint16 length) +{ + /* data */ + if (offset < length) { + proto_tree_add_item(tree, hf_openflow_v4_echo_data, tvb, offset, length - offset, ENC_BIG_ENDIAN); + } +} + #define OFPC_V4_FLOW_STATS 1<<0 /* Flow statistics. */ #define OFPC_V4_TABLE_STATS 1<<1 /* Table statistics. */ #define OFPC_V4_PORT_STATS 1<<2 /* Port statistics. */ @@ -1874,7 +1884,10 @@ dissect_openflow_v4(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void *d case OFPT_V4_ERROR: /* 1 */ dissect_openflow_error_v4(tvb, pinfo, openflow_tree, offset, length); break; - + case OFPT_V4_ECHO_REQUEST: /* 3 */ + case OFPT_V4_ECHO_REPLY: /* 4 */ + dissect_openflow_echo_v4(tvb, pinfo, openflow_tree, offset, length); + break; case OFPT_V4_FEATURES_REQUEST: /* 5 */ /* 5.3.1 Handshake * Upon TLS session establishment, the controller sends an OFPT_FEATURES_REQUEST @@ -2345,6 +2358,11 @@ proto_register_openflow_v4(void) FT_STRING, BASE_NONE, NULL, 0x0, NULL, HFILL } }, + { &hf_openflow_v4_echo_data, + { "Data", "openflow_v4.echo.data", + FT_BYTES, BASE_NONE, NULL, 0x0, + NULL, HFILL } + }, { &hf_openflow_v4_error_data_body, { "Body", "openflow_v4.error.data.body", FT_BYTES, BASE_NONE, NULL, 0x0, |