diff options
author | jmayer <jmayer@f5534014-38df-0310-8fa8-9805f1628bb7> | 2009-08-19 15:42:24 +0000 |
---|---|---|
committer | jmayer <jmayer@f5534014-38df-0310-8fa8-9805f1628bb7> | 2009-08-19 15:42:24 +0000 |
commit | c8aa3f666580172ae12d0e9ab3436f4e73d93514 (patch) | |
tree | 0af760b13eb810b07627871cf3e01dace3394cda /epan/dissectors/packet-capwap.c | |
parent | 2cccb7f300935591c7090ab95e97895b50874632 (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.
git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@29476 f5534014-38df-0310-8fa8-9805f1628bb7
Diffstat (limited to 'epan/dissectors/packet-capwap.c')
-rw-r--r-- | epan/dissectors/packet-capwap.c | 18 |
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, |