aboutsummaryrefslogtreecommitdiffstats
path: root/epan/dissectors/packet-capwap.c
diff options
context:
space:
mode:
authorJörg Mayer <jmayer@loplof.de>2009-08-19 15:42:24 +0000
committerJörg Mayer <jmayer@loplof.de>2009-08-19 15:42:24 +0000
commit283dbb4414108d56f8134b2eb8b78de832482968 (patch)
tree0af760b13eb810b07627871cf3e01dace3394cda /epan/dissectors/packet-capwap.c
parent82adb33a48e066a5479a42a73382252fe3984943 (diff)
As pointed out by Alexis La Goutte via PM, r29474 didn't
support the different MAC formats (eui48 and eui64) properly. Now, eui48 is printed as mac, the rest is still handled as blob. svn path=/trunk/; revision=29476
Diffstat (limited to 'epan/dissectors/packet-capwap.c')
-rw-r--r--epan/dissectors/packet-capwap.c18
1 files changed, 17 insertions, 1 deletions
diff --git a/epan/dissectors/packet-capwap.c b/epan/dissectors/packet-capwap.c
index edb317b128..3bce5ca366 100644
--- a/epan/dissectors/packet-capwap.c
+++ b/epan/dissectors/packet-capwap.c
@@ -80,6 +80,8 @@ static int hf_capwap_header_fragment_offset = -1;
static int hf_capwap_header_reserved = -1;
static int hf_capwap_header_mac_length = -1;
+static int hf_capwap_header_mac_eui48 = -1;
+static int hf_capwap_header_mac_eui64 = -1;
static int hf_capwap_header_mac_data = -1;
static int hf_capwap_header_wireless_length = -1;
@@ -825,7 +827,13 @@ dissect_capwap_header(tvbuff_t *tvb, proto_tree *capwap_control_tree, guint offs
maclength=tvb_get_guint8(tvb, offset+plen);
proto_tree_add_item(capwap_header_tree, hf_capwap_header_mac_length, tvb, offset+plen, 1, FALSE);
plen += 1;
+ if (maclength == 6) {
+ proto_tree_add_item(capwap_header_tree, hf_capwap_header_mac_eui48, tvb, offset+plen, maclength, FALSE);
+ } else if (maclength == 8) {
+ proto_tree_add_item(capwap_header_tree, hf_capwap_header_mac_eui64, tvb, offset+plen, maclength, FALSE);
+ } else {
proto_tree_add_item(capwap_header_tree, hf_capwap_header_mac_data, tvb, offset+plen, maclength, FALSE);
+ }
plen += maclength;
}
if (flags & 0x20 /* Wireless specific information */) {
@@ -1057,8 +1065,16 @@ proto_register_capwap_control(void)
{ "MAC length", "capwap.header.mac.length",
FT_UINT8, BASE_DEC, NULL, 0x00,
NULL, HFILL }},
+ { &hf_capwap_header_mac_eui48,
+ { "MAC address", "capwap.header.mac.eui48",
+ FT_ETHER, BASE_NONE, NULL, 0x00,
+ NULL, HFILL }},
+ { &hf_capwap_header_mac_eui64,
+ { "MAC address", "capwap.header.mac.eui64",
+ FT_BYTES, BASE_NONE, NULL, 0x00,
+ NULL, HFILL }},
{ &hf_capwap_header_mac_data,
- { "MAC address", "capwap.header.mac.addr",
+ { "MAC address", "capwap.header.mac.data",
FT_BYTES, BASE_NONE, NULL, 0x00,
NULL, HFILL }},
{ &hf_capwap_header_wireless_length,