diff options
author | Guy Harris <guy@alum.mit.edu> | 2001-04-08 19:32:05 +0000 |
---|---|---|
committer | Guy Harris <guy@alum.mit.edu> | 2001-04-08 19:32:05 +0000 |
commit | 376056336cb799d511ef653ab433687414f8a807 (patch) | |
tree | 445b03cc0553cd59e4e068b52f02edc55e19340c /packet-isis-clv.c | |
parent | 69a945b5cefcb4b0ad3c1fd8486981fa5babe733 (diff) | |
download | wireshark-376056336cb799d511ef653ab433687414f8a807.tar.gz wireshark-376056336cb799d511ef653ab433687414f8a807.tar.bz2 wireshark-376056336cb799d511ef653ab433687414f8a807.zip |
OSI network layer over PPP support, fix to P2P ISIS processing, and ISIS
hostname TLV support, from Hannes Gredler.
svn path=/trunk/; revision=3271
Diffstat (limited to 'packet-isis-clv.c')
-rw-r--r-- | packet-isis-clv.c | 49 |
1 files changed, 48 insertions, 1 deletions
diff --git a/packet-isis-clv.c b/packet-isis-clv.c index 4b36e0f37c..5c55d4d967 100644 --- a/packet-isis-clv.c +++ b/packet-isis-clv.c @@ -1,7 +1,7 @@ /* packet-isis-clv.c * Common CLV decode routines. * - * $Id: packet-isis-clv.c,v 1.8 2000/08/11 13:35:17 deniel Exp $ + * $Id: packet-isis-clv.c,v 1.9 2001/04/08 19:32:03 guy Exp $ * Stuart Stanley <stuarts@mxmail.net> * * Ethereal - Network traffic analyzer @@ -172,6 +172,53 @@ isis_dissect_authentication_clv(const u_char *pd, int offset, guint length, } } } + +/* + * Name: isis_dissect_hostname_clv() + * + * Description: + * dump the hostname information found in TLV 137 + * pls note that the hostname is not null terminated + * + * Input: + * u_char * : packet data + * int : offset into packet data where we are. + * guint : length of clv we are decoding + * frame_data * : frame data (complete frame) + * proto_tree * : protocol display tree to fill out. May be NULL + * char * : Password meaning + * + * Output: + * void, but we will add to proto tree if !NULL. + */ + + +void +isis_dissect_hostname_clv(const u_char *pd, int offset, + guint length, frame_data *fd, proto_tree *tree ) { + char sbuf[256*6]; + char *s = sbuf; + int hlen = length; + int old_offset = offset; + + + if ( !tree ) return; /* nothing to do! */ + + memcpy ( s, &pd[offset], hlen); + sbuf[hlen] = 0; /* don't forget null termination */ + + if ( hlen == 0 ) { + sprintf ( sbuf, "--none--" ); + } + + proto_tree_add_text ( tree, NullTVB, old_offset, hlen, + "Hostname: %s", sbuf ); +} + + + + + /* * Name: isis_dissect_ip_int_clv() * |