aboutsummaryrefslogtreecommitdiffstats
path: root/epan/dissectors/packet-lacp.c
diff options
context:
space:
mode:
authorAlexis La Goutte <alexis.lagoutte@gmail.com>2016-10-26 09:03:07 +0200
committerMichael Mann <mmann78@netscape.net>2016-10-28 13:51:31 +0000
commitfa0e6adbc44f6c91389fd7bf031b92c5de7be61a (patch)
tree5d76ac739857c759098ec1b0976b8b2932e0bd79 /epan/dissectors/packet-lacp.c
parentb92292b48afda02e29da70292f6ef5aee5256a1f (diff)
LACP: Add field for extra bytes (vendor specific)
Change-Id: I0b9725ed8972de3cb84215face3bae65eb27d575 Reviewed-on: https://code.wireshark.org/review/18518 Reviewed-by: Michael Mann <mmann78@netscape.net>
Diffstat (limited to 'epan/dissectors/packet-lacp.c')
-rw-r--r--epan/dissectors/packet-lacp.c16
1 files changed, 15 insertions, 1 deletions
diff --git a/epan/dissectors/packet-lacp.c b/epan/dissectors/packet-lacp.c
index 2439de785b..052eae05d2 100644
--- a/epan/dissectors/packet-lacp.c
+++ b/epan/dissectors/packet-lacp.c
@@ -93,6 +93,8 @@ static int hf_lacp_term_type = -1;
static int hf_lacp_term_len = -1;
static int hf_lacp_term_reserved = -1;
+static int hf_lacp_vendor = -1;
+
/* Initialise the subtree pointers */
static gint ett_lacp = -1;
@@ -141,7 +143,7 @@ static const char * lacp_state_flags_to_str(guint32 value)
static int
dissect_lacp(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void* data _U_)
{
- int offset = 0;
+ int offset = 0, length_remaining;
guint16 raw_word;
guint8 raw_octet;
@@ -333,6 +335,13 @@ dissect_lacp(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void* data _U_
proto_tree_add_item(lacpdu_tree, hf_lacp_term_reserved, tvb, offset, 50, ENC_NA);
offset += 50;
+ length_remaining = tvb_reported_length_remaining(tvb, offset);
+
+ if(length_remaining) {
+ proto_tree_add_item(lacpdu_tree, hf_lacp_vendor, tvb, offset, length_remaining, ENC_NA);
+ offset += length_remaining;
+ }
+
return offset;
}
@@ -562,6 +571,11 @@ proto_register_lacp(void)
{ "Reserved", "lacp.term_reserved",
FT_BYTES, BASE_NONE, NULL, 0x0,
NULL, HFILL }},
+
+ { &hf_lacp_vendor,
+ { "Unknown vendor", "lacp.vendor",
+ FT_BYTES, BASE_NONE, NULL, 0x0,
+ "Some extra bytes (Vendor Specific ?)", HFILL }},
};
/* Setup protocol subtree array */