LACP: Add HP IRF vendor TLV
Change-Id: I8c0d18f104bf37686b9b53ad9e7d1b9f8a709f5c Reviewed-on: https://code.wireshark.org/review/18519 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:
parent
fa0e6adbc4
commit
01147f8369
|
@ -95,6 +95,14 @@ static int hf_lacp_term_reserved = -1;
|
|||
|
||||
static int hf_lacp_vendor = -1;
|
||||
|
||||
static int hf_lacp_vendor_hp_length = -1;
|
||||
static int hf_lacp_vendor_hp_irf_domain = -1;
|
||||
static int hf_lacp_vendor_hp_irf_mac = -1;
|
||||
static int hf_lacp_vendor_hp_irf_switch = -1;
|
||||
static int hf_lacp_vendor_hp_irf_port = -1;
|
||||
static int hf_lacp_vendor_hp_unknown = -1;
|
||||
|
||||
|
||||
/* Initialise the subtree pointers */
|
||||
|
||||
static gint ett_lacp = -1;
|
||||
|
@ -339,7 +347,39 @@ dissect_lacp(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void* data _U_
|
|||
|
||||
if(length_remaining) {
|
||||
proto_tree_add_item(lacpdu_tree, hf_lacp_vendor, tvb, offset, length_remaining, ENC_NA);
|
||||
offset += length_remaining;
|
||||
/* HP LACP MAD IRF, first bytes is always 0x64 and second bytes is the rest of length */
|
||||
if (length_remaining > 2 && (tvb_get_guint8(tvb, offset) == 0x64) && ((length_remaining -2) == tvb_get_guint8(tvb, offset+1)) )
|
||||
{
|
||||
proto_tree_add_item(lacpdu_tree, hf_lacp_vendor_hp_unknown, tvb, offset, 1, ENC_NA);
|
||||
offset += 1;
|
||||
|
||||
proto_tree_add_item(lacpdu_tree, hf_lacp_vendor_hp_length, tvb, offset, 1, ENC_NA);
|
||||
offset += 1;
|
||||
|
||||
proto_tree_add_item(lacpdu_tree, hf_lacp_vendor_hp_unknown, tvb, offset, 2, ENC_NA);
|
||||
offset += 2;
|
||||
|
||||
proto_tree_add_item(lacpdu_tree, hf_lacp_vendor_hp_irf_domain, tvb, offset, 2, ENC_NA);
|
||||
offset += 2;
|
||||
|
||||
proto_tree_add_item(lacpdu_tree, hf_lacp_vendor_hp_irf_mac, tvb, offset, 6, ENC_NA);
|
||||
offset += 6;
|
||||
|
||||
proto_tree_add_item(lacpdu_tree, hf_lacp_vendor_hp_unknown, tvb, offset, 8, ENC_NA);
|
||||
offset += 8;
|
||||
|
||||
proto_tree_add_item(lacpdu_tree, hf_lacp_vendor_hp_irf_switch, tvb, offset, 2, ENC_NA);
|
||||
offset += 2;
|
||||
|
||||
proto_tree_add_item(lacpdu_tree, hf_lacp_vendor_hp_irf_port, tvb, offset, 2, ENC_NA);
|
||||
offset += 2;
|
||||
|
||||
proto_tree_add_item(lacpdu_tree, hf_lacp_vendor_hp_unknown, tvb, offset, 2, ENC_NA);
|
||||
offset += 2;
|
||||
|
||||
} else {
|
||||
offset += length_remaining;
|
||||
}
|
||||
}
|
||||
|
||||
return offset;
|
||||
|
@ -576,6 +616,32 @@ proto_register_lacp(void)
|
|||
{ "Unknown vendor", "lacp.vendor",
|
||||
FT_BYTES, BASE_NONE, NULL, 0x0,
|
||||
"Some extra bytes (Vendor Specific ?)", HFILL }},
|
||||
|
||||
/* HP IRF MAD LACP */
|
||||
{ &hf_lacp_vendor_hp_length,
|
||||
{ "Length", "lacp.vendor.hp.length",
|
||||
FT_UINT16, BASE_DEC, NULL, 0x0,
|
||||
"The length of HP TLV", HFILL }},
|
||||
{ &hf_lacp_vendor_hp_irf_domain,
|
||||
{ "IRF Domain", "lacp.vendor.hp.irf_domain",
|
||||
FT_UINT16, BASE_DEC, NULL, 0x0,
|
||||
NULL, HFILL }},
|
||||
{ &hf_lacp_vendor_hp_irf_mac,
|
||||
{ "IRF MAC", "lacp.vendor.hp.irf_mac",
|
||||
FT_ETHER, BASE_NONE, NULL, 0x0,
|
||||
NULL, HFILL }},
|
||||
{ &hf_lacp_vendor_hp_irf_switch,
|
||||
{ "IRF Switch", "lacp.vendor.hp.irf_switch",
|
||||
FT_UINT16, BASE_DEC, NULL, 0x0,
|
||||
"Number of switch on the IRF stack", HFILL }},
|
||||
{ &hf_lacp_vendor_hp_irf_port,
|
||||
{ "IRF Port", "lacp.vendor.hp.irf_port",
|
||||
FT_UINT16, BASE_DEC, NULL, 0x0,
|
||||
"Stack ID where the LACP is attached", HFILL }},
|
||||
{ &hf_lacp_vendor_hp_unknown,
|
||||
{ "Unknown", "lacp.vendor.hp.unknown",
|
||||
FT_BYTES, BASE_NONE, NULL, 0x0,
|
||||
NULL, HFILL }},
|
||||
};
|
||||
|
||||
/* Setup protocol subtree array */
|
||||
|
|
Loading…
Reference in New Issue