From 43a60c03f63259dd0c759d0effe3a5dfc57d6546 Mon Sep 17 00:00:00 2001 From: sangodbole Date: Wed, 2 Nov 2016 16:56:18 -0400 Subject: 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 Tested-by: Petri Dish Buildbot Reviewed-by: Michael Mann --- epan/dissectors/packet-openflow_v4.c | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to 'epan/dissectors/packet-openflow_v4.c') 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, -- cgit v1.2.3