summaryrefslogtreecommitdiff
path: root/epan/dissectors/packet-openflow_v4.c
diff options
context:
space:
mode:
authorAnders Broman <anders.broman@ericsson.com>2013-11-05 19:38:41 +0000
committerAnders Broman <anders.broman@ericsson.com>2013-11-05 19:38:41 +0000
commitf435f8c52cdd5d6f282214689b9c469ebdd4b343 (patch)
treeb2d30960648e7ed3c0024110778825407d755938 /epan/dissectors/packet-openflow_v4.c
parent99b598baf15a9829d5f2dd6897fb9bb7fe739fdf (diff)
downloadwireshark-f435f8c52cdd5d6f282214689b9c469ebdd4b343.tar.gz
From Zoltán Lajos Kis:
display present bit for vlan oxm field https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=9283 svn path=/trunk/; revision=53092
Diffstat (limited to 'epan/dissectors/packet-openflow_v4.c')
-rw-r--r--epan/dissectors/packet-openflow_v4.c20
1 files changed, 20 insertions, 0 deletions
diff --git a/epan/dissectors/packet-openflow_v4.c b/epan/dissectors/packet-openflow_v4.c
index f6c4bc3533..89b86e583e 100644
--- a/epan/dissectors/packet-openflow_v4.c
+++ b/epan/dissectors/packet-openflow_v4.c
@@ -51,6 +51,8 @@ static int hf_openflow_v4_oxm_length = -1;
static int hf_openflow_v4_oxm_experimenter_experimenter = -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;
+static int hf_openflow_v4_oxm_value_vlan_vid = -1;
static int hf_openflow_v4_oxm_value_ethertype = -1;
static int hf_openflow_v4_oxm_value_ipv4addr = -1;
static int hf_openflow_v4_oxm_value_ipv6addr = -1;
@@ -983,6 +985,8 @@ dissect_openflow_oxm_header_v4(tvbuff_t *tvb, packet_info *pinfo _U_, proto_tree
return offset;
}
+
+#define OFPVID_PRESENT 0x1000
static int
dissect_openflow_oxm_v4(tvbuff_t *tvb, packet_info *pinfo _U_, proto_tree *tree, int offset, guint16 length _U_)
{
@@ -1033,6 +1037,12 @@ dissect_openflow_oxm_v4(tvbuff_t *tvb, packet_info *pinfo _U_, proto_tree *tree,
offset+=2;
break;
+ case OFPXMT_OFB_VLAN_VID:
+ proto_tree_add_item(oxm_tree, hf_openflow_v4_oxm_value_vlan_present, tvb, offset, 2, ENC_BIG_ENDIAN);
+ proto_tree_add_item(oxm_tree, hf_openflow_v4_oxm_value_vlan_vid, tvb, offset, 2, ENC_BIG_ENDIAN);
+ offset+=2;
+ break;
+
case OFPXMT_OFB_IP_PROTO:
proto_tree_add_item(oxm_tree, hf_openflow_v4_oxm_value_ipproto, tvb, offset, 1, ENC_BIG_ENDIAN);
offset+=1;
@@ -4738,6 +4748,16 @@ proto_register_openflow_v4(void)
FT_UINT16, BASE_HEX, VALS(etype_vals), 0x0,
NULL, HFILL }
},
+ { &hf_openflow_v4_oxm_value_vlan_present,
+ { "OFPVID_PRESENT", "openflow_v4.oxm.value",
+ FT_BOOLEAN, 16, NULL, OFPVID_PRESENT,
+ NULL, HFILL }
+ },
+ { &hf_openflow_v4_oxm_value_vlan_vid,
+ { "Value", "openflow_v4.oxm.value",
+ FT_UINT16, BASE_DEC, NULL, 0x0fff,
+ NULL, HFILL }
+ },
{ &hf_openflow_v4_oxm_value_ipv4addr,
{ "Value", "openflow_v4.oxm.value",
FT_IPv4, BASE_NONE, NULL, 0x0,