aboutsummaryrefslogtreecommitdiffstats
path: root/epan/dissectors/packet-cdp.c
diff options
context:
space:
mode:
authorOliver <cellotape@gmail.com>2019-08-03 00:58:19 +0100
committerAlexis La Goutte <alexis.lagoutte@gmail.com>2019-08-03 14:45:57 +0000
commitfc926c0e97a99b9161372b0103e8e0b345393129 (patch)
treee144adbad7311b92de8e04878d6aacb7ad089a2b /epan/dissectors/packet-cdp.c
parent048af39e47d11265fe25848482517351a774ab13 (diff)
CDP: Expand dissection of capabilites
Adds four extra capability definitions that could exist in a CDP packet. Useful for identifying phones. Change-Id: I2b542a8a079a8483d8c1ee10df60c8df0933af95 Reviewed-on: https://code.wireshark.org/review/34169 Petri-Dish: Anders Broman <a.broman58@gmail.com> Reviewed-by: Alexis La Goutte <alexis.lagoutte@gmail.com>
Diffstat (limited to 'epan/dissectors/packet-cdp.c')
-rw-r--r--epan/dissectors/packet-cdp.c24
1 files changed, 24 insertions, 0 deletions
diff --git a/epan/dissectors/packet-cdp.c b/epan/dissectors/packet-cdp.c
index 15f530bc68..661537e30d 100644
--- a/epan/dissectors/packet-cdp.c
+++ b/epan/dissectors/packet-cdp.c
@@ -62,6 +62,10 @@ static int hf_cdp_capabilities_switch = -1;
static int hf_cdp_capabilities_host = -1;
static int hf_cdp_capabilities_igmp_capable = -1;
static int hf_cdp_capabilities_repeater = -1;
+static int hf_cdp_capabilities_voip_phone = -1;
+static int hf_cdp_capabilities_remote = -1;
+static int hf_cdp_capabilities_cvta = -1;
+static int hf_cdp_capabilities_mac_relay = -1;
static int hf_cdp_spare_poe_tlv = -1;
static int hf_cdp_spare_poe_tlv_poe = -1;
static int hf_cdp_spare_poe_tlv_spare_pair_arch = -1;
@@ -1167,6 +1171,10 @@ dissect_capabilities(tvbuff_t *tvb, int offset, int length, proto_tree *tree)
proto_tree_add_item(capabilities_tree, hf_cdp_capabilities_host, tvb, offset, 4, ENC_BIG_ENDIAN);
proto_tree_add_item(capabilities_tree, hf_cdp_capabilities_igmp_capable, tvb, offset, 4, ENC_BIG_ENDIAN);
proto_tree_add_item(capabilities_tree, hf_cdp_capabilities_repeater, tvb, offset, 4, ENC_BIG_ENDIAN);
+ proto_tree_add_item(capabilities_tree, hf_cdp_capabilities_voip_phone , tvb, offset, 4, ENC_BIG_ENDIAN);
+ proto_tree_add_item(capabilities_tree, hf_cdp_capabilities_remote, tvb, offset, 4, ENC_BIG_ENDIAN);
+ proto_tree_add_item(capabilities_tree, hf_cdp_capabilities_cvta, tvb, offset, 4, ENC_BIG_ENDIAN);
+ proto_tree_add_item(capabilities_tree, hf_cdp_capabilities_mac_relay, tvb, offset, 4, ENC_BIG_ENDIAN);
}
static void
@@ -1361,6 +1369,22 @@ proto_register_cdp(void)
{"Repeater", "cdp.capabilities.repeater", FT_BOOLEAN, 32,
TFS(&tfs_yes_no), 0x40, NULL, HFILL }},
+ { &hf_cdp_capabilities_voip_phone,
+ {"VoIP Phone", "cdp.capabilities.voip_phone", FT_BOOLEAN, 32,
+ TFS(&tfs_yes_no), 0x80, NULL, HFILL }},
+
+ { &hf_cdp_capabilities_remote,
+ {"Remotely Managed Device", "cdp.capabilities.remote", FT_BOOLEAN, 32,
+ TFS(&tfs_yes_no), 0x0100, NULL, HFILL }},
+
+ { &hf_cdp_capabilities_cvta,
+ {"CVTA/STP Dispute Resolution/Cisco VT Camera", "cdp.capabilities.cvta", FT_BOOLEAN, 32,
+ TFS(&tfs_yes_no), 0x0200, NULL, HFILL }},
+
+ { &hf_cdp_capabilities_mac_relay,
+ {"Two Port Mac Relay", "cdp.capabilities.mac_relay", FT_BOOLEAN, 32,
+ TFS(&tfs_yes_no), 0x0400, NULL, HFILL }},
+
{ &hf_cdp_spare_poe_tlv,
{ "Spare Pair PoE", "cdp.spare_poe_tlv", FT_UINT8, BASE_HEX,
NULL, 0x0, NULL, HFILL }