Openflow (v4/v5): Add vOXM vlan mask field

Bug: 12979
Change-Id: I7f0e806081704dfeaf40ce1e4e41271ffd5e3023
Reviewed-on: https://code.wireshark.org/review/18618
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>
This commit is contained in:
Alexis La Goutte 2016-11-02 09:47:48 +01:00 committed by Michael Mann
parent 23eac7dc69
commit 35e4233314
2 changed files with 20 additions and 0 deletions

View File

@ -62,6 +62,7 @@ static int hf_openflow_v4_oxm_mask = -1;
static int hf_openflow_v4_oxm_mask_etheraddr = -1;
static int hf_openflow_v4_oxm_mask_ipv4addr = -1;
static int hf_openflow_v4_oxm_mask_ipv6addr = -1;
static int hf_openflow_v4_oxm_mask_vlan = -1;
static int hf_openflow_v4_match_type = -1;
static int hf_openflow_v4_match_length = -1;
static int hf_openflow_v4_match_pad = -1;
@ -1043,6 +1044,10 @@ dissect_openflow_oxm_v4(tvbuff_t *tvb, packet_info *pinfo _U_, proto_tree *tree,
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;
if (oxm_hm) {
proto_tree_add_item(oxm_tree, hf_openflow_v4_oxm_mask_vlan, tvb, offset, 2, ENC_NA);
offset+=2;
}
break;
case OFPXMT_OFB_IP_PROTO:
@ -4807,6 +4812,11 @@ proto_register_openflow_v4(void)
FT_IPv6, BASE_NONE, NULL, 0x0,
NULL, HFILL }
},
{ &hf_openflow_v4_oxm_mask_vlan,
{ "Mask", "openflow_v4.oxm.vlan_mask",
FT_UINT16, BASE_HEX, NULL, 0x0,
NULL, HFILL }
},
{ &hf_openflow_v4_match_type,
{ "Type", "openflow_v4.match.type",
FT_UINT16, BASE_DEC, VALS(openflow_v4_match_type_values), 0x0,

View File

@ -62,6 +62,7 @@ static int hf_openflow_v5_oxm_mask = -1;
static int hf_openflow_v5_oxm_mask_etheraddr = -1;
static int hf_openflow_v5_oxm_mask_ipv4addr = -1;
static int hf_openflow_v5_oxm_mask_ipv6addr = -1;
static int hf_openflow_v5_oxm_mask_vlan = -1;
static int hf_openflow_v5_match_type = -1;
static int hf_openflow_v5_match_length = -1;
static int hf_openflow_v5_match_pad = -1;
@ -1198,6 +1199,10 @@ dissect_openflow_oxm_v5(tvbuff_t *tvb, packet_info *pinfo _U_, proto_tree *tree,
proto_tree_add_item(oxm_tree, hf_openflow_v5_oxm_value_vlan_present, tvb, offset, 2, ENC_BIG_ENDIAN);
proto_tree_add_item(oxm_tree, hf_openflow_v5_oxm_value_vlan_vid, tvb, offset, 2, ENC_BIG_ENDIAN);
offset+=2;
if (oxm_hm) {
proto_tree_add_item(oxm_tree, hf_openflow_v5_oxm_mask_vlan, tvb, offset, 2, ENC_NA);
offset+=2;
}
break;
case OFPXMT_OFB_IP_PROTO:
@ -6136,6 +6141,11 @@ proto_register_openflow_v5(void)
FT_IPv6, BASE_NONE, NULL, 0x0,
NULL, HFILL }
},
{ &hf_openflow_v5_oxm_mask_vlan,
{ "Mask", "openflow_v5.oxm.vlan_mask",
FT_UINT16, BASE_HEX, NULL, 0x0,
NULL, HFILL }
},
{ &hf_openflow_v5_match_type,
{ "Type", "openflow_v5.match.type",
FT_UINT16, BASE_DEC, VALS(openflow_v5_match_type_values), 0x0,