summaryrefslogtreecommitdiff
path: root/epan/dissectors/packet-bmp.c
diff options
context:
space:
mode:
authorEbben Aries <exa@fb.com>2015-03-04 19:13:43 -0800
committerAlexis La Goutte <alexis.lagoutte@gmail.com>2015-03-05 15:39:48 +0000
commit23c6a0f97f4eb24d532c50e57cc4d77b76bb8b81 (patch)
tree8cd5c01e166e786edea05d4ae69e9c8e22934f43 /epan/dissectors/packet-bmp.c
parent3948d82872a5d04bd2f7fc07d27df53a52fabccd (diff)
downloadwireshark-23c6a0f97f4eb24d532c50e57cc4d77b76bb8b81.tar.gz
[bmp] Support for decoding of BGP Peer Distinguisher
re-utilize decode_bgp_rd() logic from packet-bgp Change-Id: I588a58e0b2f7da5d3c9b86b28abb9c5b29e0dc8f Reviewed-on: https://code.wireshark.org/review/7537 Reviewed-by: Alexis La Goutte <alexis.lagoutte@gmail.com>
Diffstat (limited to 'epan/dissectors/packet-bmp.c')
-rw-r--r--epan/dissectors/packet-bmp.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/epan/dissectors/packet-bmp.c b/epan/dissectors/packet-bmp.c
index c7db2abf5a..e13fb4061d 100644
--- a/epan/dissectors/packet-bmp.c
+++ b/epan/dissectors/packet-bmp.c
@@ -32,6 +32,7 @@
#include <epan/prefs.h>
#include "packet-tcp.h"
+#include "packet-bgp.h"
void proto_register_bmp(void);
void proto_reg_handoff_bmp(void);
@@ -414,6 +415,7 @@ static void
dissect_bmp_peer_header(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo, int offset, guint8 bmp_type, guint16 len)
{
guint8 flags;
+ proto_item *item = NULL;
proto_item *ti = NULL;
proto_item *subtree = NULL;
@@ -435,7 +437,8 @@ dissect_bmp_peer_header(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo, int
proto_tree_add_bitmask(subtree, tvb, offset, hf_peer_flags, ett_bmp_peer_flags, peer_flags, ENC_NA);
offset += 1;
- proto_tree_add_item(subtree, hf_peer_distinguisher, tvb, offset, 8, ENC_NA);
+ item = proto_tree_add_item(subtree, hf_peer_distinguisher, tvb, offset, 8, ENC_NA);
+ proto_item_set_text(item, "Peer Distinguisher: %s", decode_bgp_rd(tvb, offset));
offset += 8;
if (flags & BMP_PEER_FLAG_IPV6) {
@@ -690,7 +693,7 @@ proto_register_bmp(void)
{ "Reserved", "bmp.peer.flags.reserved", FT_BOOLEAN, 8,
TFS(&tfs_set_notset), BMP_PEER_FLAG_RES, NULL, HFILL }},
{ &hf_peer_distinguisher,
- { "Peer Distinguisher", "bmp.peer.distinguisher", FT_NONE, BASE_NONE,
+ { "Peer Distinguisher", "bmp.peer.distinguisher", FT_BYTES, BASE_NONE,
NULL, 0x0, NULL, HFILL }},
{ &hf_peer_ipv4_address,
{ "Address", "bmp.peer.ip.addr", FT_IPv4, BASE_NONE,