diff options
author | sangodbole <sanket.godbole@spirent.com> | 2016-11-02 16:56:18 -0400 |
---|---|---|
committer | Michael Mann <mmann78@netscape.net> | 2016-11-07 00:18:03 +0000 |
commit | 43a60c03f63259dd0c759d0effe3a5dfc57d6546 (patch) | |
tree | 1c3b08bd5ef224522b847ee7ca988e06fa463a35 /epan/dissectors/packet-openflow_v4.c | |
parent | 61ed49e69cf0895e041f01fcc0c04b9e0fb2047b (diff) |
Added Dissector for Openflow Experimenter Value field for Openflow 1.3 and 1.4
Change-Id: I79d7b9afbde34451b545ac7e67c22b012843d822
Reviewed-on: https://code.wireshark.org/review/18654
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-openflow_v4.c')
-rw-r--r-- | epan/dissectors/packet-openflow_v4.c | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/epan/dissectors/packet-openflow_v4.c b/epan/dissectors/packet-openflow_v4.c index f5e8d7f4c2..59f4bbba14 100644 --- a/epan/dissectors/packet-openflow_v4.c +++ b/epan/dissectors/packet-openflow_v4.c @@ -47,6 +47,7 @@ static int hf_openflow_v4_oxm_field_basic = -1; static int hf_openflow_v4_oxm_hm = -1; static int hf_openflow_v4_oxm_length = -1; static int hf_openflow_v4_oxm_experimenter_experimenter = -1; +static int hf_openflow_v4_oxm_experimenter_value = -1; static int hf_openflow_v4_oxm_value = -1; static int hf_openflow_v4_oxm_value_etheraddr = -1; static int hf_openflow_v4_oxm_value_vlan_present = -1; @@ -956,6 +957,7 @@ static int dissect_openflow_oxm_header_v4(tvbuff_t *tvb, packet_info *pinfo _U_, proto_tree *tree, int offset, guint16 length _U_) { guint16 oxm_class; + guint8 oxm_length; /* oxm_class */ oxm_class = tvb_get_ntohs(tvb, offset); @@ -974,6 +976,7 @@ dissect_openflow_oxm_header_v4(tvbuff_t *tvb, packet_info *pinfo _U_, proto_tree offset+=1; /* oxm_length */ + oxm_length = tvb_get_guint8(tvb, offset); proto_tree_add_item(tree, hf_openflow_v4_oxm_length, tvb, offset, 1, ENC_BIG_ENDIAN); offset+=1; @@ -981,6 +984,8 @@ dissect_openflow_oxm_header_v4(tvbuff_t *tvb, packet_info *pinfo _U_, proto_tree /* uint32_t experimenter; */ proto_tree_add_item(tree, hf_openflow_v4_oxm_experimenter_experimenter, tvb, offset, 4, ENC_BIG_ENDIAN); offset+=4; + proto_tree_add_item(tree, hf_openflow_v4_oxm_experimenter_value, tvb, offset, oxm_length - 4, ENC_NA); + offset+=(oxm_length - 4); } return offset; @@ -4737,6 +4742,11 @@ proto_register_openflow_v4(void) FT_UINT32, BASE_HEX, NULL, 0x0, NULL, HFILL } }, + { &hf_openflow_v4_oxm_experimenter_value, + { "Experimenter Value", "openflow_v4.oxm_experimenter.value", + FT_BYTES, BASE_NONE, NULL, 0x0, + NULL, HFILL } + }, { &hf_openflow_v4_oxm_value, { "Value", "openflow_v4.oxm.value", FT_BYTES, BASE_NONE, NULL, 0x0, |