diff options
author | Jörg Mayer <jmayer@loplof.de> | 2005-05-09 11:21:16 +0000 |
---|---|---|
committer | Jörg Mayer <jmayer@loplof.de> | 2005-05-09 11:21:16 +0000 |
commit | 78d0e8b33d29e729e808544ee985206872f22d0b (patch) | |
tree | 56c71c9a2ffe5214b4375abed0793f1bd68249c3 /epan | |
parent | 9a47db0c3d70272ebf32a72aa25deaf5294fb016 (diff) |
I just found a packet with an option e. As the value looked very much
like the mac-address of the switch, I added decoding of option e as
mac address.
svn path=/trunk/; revision=14336
Diffstat (limited to 'epan')
-rw-r--r-- | epan/dissectors/packet-hpsw.c | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/epan/dissectors/packet-hpsw.c b/epan/dissectors/packet-hpsw.c index 1c3ad4df71..f05c8f9746 100644 --- a/epan/dissectors/packet-hpsw.c +++ b/epan/dissectors/packet-hpsw.c @@ -57,6 +57,7 @@ static gint ett_hpsw_tlv = -1; #define HPFOO_FIELD_8 0x8 #define HPFOO_FIELD_9 0x9 #define HPFOO_FIELD_10 0xa +#define HPFOO_MAC_ADDR 0xe static const value_string hpsw_tlv_type_vals[] = { { HPFOO_DEVICE_NAME, "Device Name" }, @@ -67,6 +68,7 @@ static const value_string hpsw_tlv_type_vals[] = { { HPFOO_FIELD_8, "Field 8" }, { HPFOO_FIELD_9, "Field 9" }, { HPFOO_FIELD_10, "Field 10" }, + { HPFOO_MAC_ADDR, "MAC Addr" }, { 0x00, NULL } }; @@ -220,6 +222,17 @@ dissect_hpsw_tlv(tvbuff_t *tvb, int offset, int length, } break; + case HPFOO_MAC_ADDR: + if (length == 6) { + const guint8 *macptr=tvb_get_ptr(tvb,offset,length); + proto_item_set_text(ti, "MAC Addr: %s", ether_to_str(macptr)); + proto_tree_add_text(tree, tvb, offset, length, "MAC Addr: %s", ether_to_str(macptr)); + } else { + proto_item_set_text(ti, "MAC Addr: Bad length %u", length); + proto_tree_add_text(tree, tvb, offset, length, "MAC Addr: Bad length %u", length); + } + break; + default: proto_tree_add_text(tree, tvb, offset, length, "Data"); break; |