diff options
author | Gerald Combs <gerald@wireshark.org> | 2008-03-13 23:45:48 +0000 |
---|---|---|
committer | Gerald Combs <gerald@wireshark.org> | 2008-03-13 23:45:48 +0000 |
commit | 106968d7e89cc3b714ee1c0879559bd819262eb6 (patch) | |
tree | 147913d51ebc061895aab658941fd3e7bf814557 /epan/dissectors/packet-isis-clv.c | |
parent | f8e75ecd329f0f06e58ea805bf1f72e1b4e8f0b1 (diff) |
From Hariharan Ananthakrishnan:
I have added two new display filters to support filtering based on LSP-ID and
hostname for ISIS protocol.
svn path=/trunk/; revision=24621
Diffstat (limited to 'epan/dissectors/packet-isis-clv.c')
-rw-r--r-- | epan/dissectors/packet-isis-clv.c | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/epan/dissectors/packet-isis-clv.c b/epan/dissectors/packet-isis-clv.c index 7aceb4b414..10655d8914 100644 --- a/epan/dissectors/packet-isis-clv.c +++ b/epan/dissectors/packet-isis-clv.c @@ -231,6 +231,7 @@ isis_dissect_ip_authentication_clv(tvbuff_t *tvb, proto_tree *tree, int offset, * proto_tree * : protocol display tree to fill out. May be NULL * int : offset into packet data where we are. * int : length of clv we are decoding + * int : tree id to use for proto tree. * * Output: * void, but we will add to proto tree if !NULL. @@ -239,7 +240,7 @@ isis_dissect_ip_authentication_clv(tvbuff_t *tvb, proto_tree *tree, int offset, void isis_dissect_hostname_clv(tvbuff_t *tvb, proto_tree *tree, int offset, - int length) + int length, int tree_id) { if ( !tree ) return; /* nothing to do! */ @@ -247,9 +248,10 @@ isis_dissect_hostname_clv(tvbuff_t *tvb, proto_tree *tree, int offset, proto_tree_add_text ( tree, tvb, offset, length, "Hostname: --none--" ); } else { - proto_tree_add_text ( tree, tvb, offset, length, - "Hostname: %.*s", length, - tvb_get_ptr(tvb, offset, length) ); + const char* value = tvb_get_ptr(tvb, offset, length); + proto_tree_add_string_format ( tree, tree_id, + tvb, offset, length, + value, "Hostname: %.*s", length, value); } } |