diff options
author | Gilbert Ramirez <gram@alumni.rice.edu> | 2000-05-11 08:18:09 +0000 |
---|---|---|
committer | Gilbert Ramirez <gram@alumni.rice.edu> | 2000-05-11 08:18:09 +0000 |
commit | 292e38e2c61edcd14bfa30ca3c72bacda1bcbe32 (patch) | |
tree | db4edef02456a48d0f6d505166ac7d70f6c0f644 /packet-isis-snp.c | |
parent | 162800efb308901e0c302517be01226130e39b19 (diff) | |
download | wireshark-292e38e2c61edcd14bfa30ca3c72bacda1bcbe32.tar.gz wireshark-292e38e2c61edcd14bfa30ca3c72bacda1bcbe32.tar.bz2 wireshark-292e38e2c61edcd14bfa30ca3c72bacda1bcbe32.zip |
Add tvbuff class.
Add exceptions routines.
Convert proto_tree_add_*() routines to require tvbuff_t* argument.
Convert all dissectors to pass NULL argument ("NullTVB" macro == NULL) as
the tvbuff_t* argument to proto_tree_add_*() routines.
dissect_packet() creates a tvbuff_t, wraps the next dissect call in
a TRY block, will print "Short Frame" on the proto_tree if a BoundsError
exception is caught.
The FDDI dissector is converted to use tvbuff's.
svn path=/trunk/; revision=1939
Diffstat (limited to 'packet-isis-snp.c')
-rw-r--r-- | packet-isis-snp.c | 20 |
1 files changed, 10 insertions, 10 deletions
diff --git a/packet-isis-snp.c b/packet-isis-snp.c index 6b37ac5f0d..a5ce886790 100644 --- a/packet-isis-snp.c +++ b/packet-isis-snp.c @@ -1,7 +1,7 @@ /* packet-isis-snp.c * Routines for decoding isis complete & partial SNP and their payload * - * $Id: packet-isis-snp.c,v 1.3 2000/04/15 22:11:10 guy Exp $ + * $Id: packet-isis-snp.c,v 1.4 2000/05/11 08:15:17 gram Exp $ * Stuart Stanley <stuarts@mxmail.net> * * Ethereal - Network traffic analyzer @@ -197,14 +197,14 @@ dissect_snp_lsp_entries(const u_char *pd, int offset, guint length, return; } - proto_tree_add_text(tree, offset, 2, "Remaining life : %d", + proto_tree_add_text(tree, NullTVB, offset, 2, "Remaining life : %d", pntohs(&ps->isis_snp_remaining_lifetime)); isis_lsp_decode_lsp_id( "LSP ID ", tree, offset + 2, &ps->isis_snp_lsp_id ); - proto_tree_add_text(tree, offset+10, 4, + proto_tree_add_text(tree, NullTVB, offset+10, 4, "LSP Sequence Number : 0x%04x", pntohl(&ps->isis_snp_sequence_number)); - proto_tree_add_text(tree, offset+14, 2, + proto_tree_add_text(tree, NullTVB, offset+14, 2, "LSP checksum : 0x%02x", pntohs(&ps->isis_snp_checksum)); length -= sizeof ( isis_snp_t ); @@ -253,12 +253,12 @@ isis_dissect_isis_csnp(int type, int header_length, const u_char *pd, ilp = (isis_csnp_t *) &pd[offset]; if (tree) { - ti = proto_tree_add_item(tree, proto_isis_csnp, + ti = proto_tree_add_item(tree, proto_isis_csnp, NullTVB, offset, END_OF_FRAME, NULL); csnp_tree = proto_item_add_subtree(ti, ett_isis_csnp); - proto_tree_add_item(csnp_tree, hf_isis_csnp_pdu_length, + proto_tree_add_item(csnp_tree, hf_isis_csnp_pdu_length, NullTVB, offset, 2, pntohs(&ilp->isis_csnp_pdu_length)); - proto_tree_add_text(csnp_tree, offset + 2, 7, + proto_tree_add_text(csnp_tree, NullTVB, offset + 2, 7, "Source id : %s", print_system_id( pd + offset + 2, 7 ) ); isis_lsp_decode_lsp_id( "Start LSP id ", csnp_tree, offset + 9, @@ -321,12 +321,12 @@ isis_dissect_isis_psnp(int type, int header_length, const u_char *pd, ilp = (isis_psnp_t *) &pd[offset]; if (tree) { - ti = proto_tree_add_item(tree, proto_isis_psnp, + ti = proto_tree_add_item(tree, proto_isis_psnp, NullTVB, offset, END_OF_FRAME, NULL); psnp_tree = proto_item_add_subtree(ti, ett_isis_psnp); - proto_tree_add_item(psnp_tree, hf_isis_psnp_pdu_length, + proto_tree_add_item(psnp_tree, hf_isis_psnp_pdu_length, NullTVB, offset, 2, pntohs(&ilp->isis_psnp_pdu_length)); - proto_tree_add_text(psnp_tree, offset + 2, 7, + proto_tree_add_text(psnp_tree, NullTVB, offset + 2, 7, "Source id: %s", print_system_id( pd + offset + 2, 7 ) ); } |