diff options
author | jmayer <jmayer@f5534014-38df-0310-8fa8-9805f1628bb7> | 2005-12-11 22:52:20 +0000 |
---|---|---|
committer | jmayer <jmayer@f5534014-38df-0310-8fa8-9805f1628bb7> | 2005-12-11 22:52:20 +0000 |
commit | d8b02d4b40b7307a9880e5835134708ed0e82554 (patch) | |
tree | 662958b24d38c57ac261968d189b053a8a283fce /epan/dissectors/packet-dtp.c | |
parent | 4b8763f640727e064a223f32e6537f005ac1599f (diff) |
Port some information from yersinia
(http://yersinia.sourceforge.net/index.html)
by Alfredo Andres and David Barroso. There's more information to be put
into Ethereal but it's a start.
git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@16756 f5534014-38df-0310-8fa8-9805f1628bb7
Diffstat (limited to 'epan/dissectors/packet-dtp.c')
-rw-r--r-- | epan/dissectors/packet-dtp.c | 61 |
1 files changed, 31 insertions, 30 deletions
diff --git a/epan/dissectors/packet-dtp.c b/epan/dissectors/packet-dtp.c index 4f6bc3af9b..10a66f8ac6 100644 --- a/epan/dissectors/packet-dtp.c +++ b/epan/dissectors/packet-dtp.c @@ -51,18 +51,19 @@ static gint ett_dtp_tlv = -1; static void dissect_dtp_tlv(tvbuff_t *tvb, int offset, int length, proto_tree *tree, proto_item *ti, guint8 type); -#define TRUNK_NAME_NUM 0x01 -#define TYPE_2_NUM 0x02 -#define TYPE_3_NUM 0x03 -#define SOMEMAC_NUM 0x04 +#define TYPE_DOMAIN 0x01 +#define TYPE_STATUS 0x02 +#define TYPE_DTPTYPE 0x03 +#define TYPE_NEIGHBOR 0x04 static const value_string dtp_tlv_type_vals[] = { - { TRUNK_NAME_NUM, "Trunk Name" }, - { TYPE_2_NUM, "Type 2" }, - { TYPE_3_NUM, "Type 3" }, - { SOMEMAC_NUM, "Some MAC" }, - { 0, NULL } + { TYPE_DOMAIN, "Domain" }, + { TYPE_STATUS, "Status" }, + { TYPE_DTPTYPE, "Type" }, + { TYPE_NEIGHBOR, "Neighbor" }, + + { 0, NULL } }; @@ -124,66 +125,66 @@ dissect_dtp_tlv(tvbuff_t *tvb, int offset, int length, { switch (type) { - case TRUNK_NAME_NUM: + case TYPE_DOMAIN: if (length > 0) { - proto_item_set_text(ti, "Trunk Name: %s", tvb_format_text(tvb, offset, length - 1)); - proto_tree_add_text(tree, tvb, offset, length, "Trunk Name: %s", tvb_format_text(tvb, offset, length - 1)); + proto_item_set_text(ti, "Domain: %s", tvb_format_text(tvb, offset, length - 1)); + proto_tree_add_text(tree, tvb, offset, length, "Domain: %s", tvb_format_text(tvb, offset, length - 1)); } else { - proto_item_set_text(ti, "Trunk Name: Bad length %u", length); - proto_tree_add_text(tree, tvb, offset, length, "Trunk Name: Bad length %u", length); + proto_item_set_text(ti, "Domain: Bad length %u", length); + proto_tree_add_text(tree, tvb, offset, length, "Domain: Bad length %u", length); } break; - case TYPE_2_NUM: + case TYPE_STATUS: if (length > 0) { proto_item_set_text(ti, - "Type 2: 0x%02x", + "Status: 0x%02x", tvb_get_guint8(tvb, offset)); proto_tree_add_text(tree, tvb, offset, 1, - "Type 2: 0x%02x", + "Status: 0x%02x", tvb_get_guint8(tvb, offset)); } else { proto_item_set_text(ti, - "Type 2: Bad length %u", + "Status: Bad length %u", length); proto_tree_add_text(tree, tvb, offset, length, - "Type 2: Bad length %u", + "Status: Bad length %u", length); } break; - case TYPE_3_NUM: + case TYPE_DTPTYPE: if (length > 0) { proto_item_set_text(ti, - "Type 3: 0x%02x", + "Dtptype: 0x%02x", tvb_get_guint8(tvb, offset)); proto_tree_add_text(tree, tvb, offset, 1, - "Type 3: 0x%02x", + "Dtptype: 0x%02x", tvb_get_guint8(tvb, offset)); } else { proto_item_set_text(ti, - "Type 3: Bad length %u", + "Dtptype: Bad length %u", length); proto_tree_add_text(tree, tvb, offset, length, - "Type 3: Bad length %u", + "Dtptype: Bad length %u", length); } break; - case SOMEMAC_NUM: + case TYPE_NEIGHBOR: if (length == 6) { const guint8 *macptr=tvb_get_ptr(tvb,offset,length); - proto_item_set_text(ti, "Some MAC: %s", + proto_item_set_text(ti, "Neighbor: %s", ether_to_str(macptr)); /* XXX - resolve? */ proto_tree_add_ether(tree, hf_dtp_some_mac, tvb, offset,length,macptr); } else { proto_item_set_text(ti, - "Some MAC: Bad length %u", + "Neighbor: Bad length %u", length); proto_tree_add_text(tree, tvb, offset, length, - "Some MAC: Bad length %u", + "Neighbor: Bad length %u", length); } break; @@ -211,8 +212,8 @@ proto_register_dtp(void) NULL, 0x0, "", HFILL }}, { &hf_dtp_some_mac, - { "Some MAC", "vtp.some_mac", FT_ETHER, BASE_NONE, - NULL, 0x0, "MAC Address of something", HFILL }}, + { "Neighbor", "vtp.neighbor", FT_ETHER, BASE_NONE, + NULL, 0x0, "MAC Address of neighbor", HFILL }}, }; |