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-tacacs.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-tacacs.c')
-rw-r--r-- | packet-tacacs.c | 26 |
1 files changed, 13 insertions, 13 deletions
diff --git a/packet-tacacs.c b/packet-tacacs.c index ec5dad5527..d070d6984d 100644 --- a/packet-tacacs.c +++ b/packet-tacacs.c @@ -1,7 +1,7 @@ /* packet-tacacs.c * Routines for cisco tacacs/tacplus/AAA packet dissection * - * $Id: packet-tacacs.c,v 1.3 2000/04/08 07:07:39 guy Exp $ + * $Id: packet-tacacs.c,v 1.4 2000/05/11 08:15:52 gram Exp $ * * Ethereal - Network traffic analyzer * By Gerald Combs <gerald@zing.org> @@ -68,23 +68,23 @@ dissect_tacacs(const u_char *pd, int offset, frame_data *fd, proto_tree *tree) if (tree) { - ti = proto_tree_add_item(tree, proto_tacacs, offset, END_OF_FRAME, NULL); + ti = proto_tree_add_item(tree, proto_tacacs, NullTVB, offset, END_OF_FRAME, NULL); tacacs_tree = proto_item_add_subtree(ti, ett_tacacs); - proto_tree_add_item(tacacs_tree, hf_tacacs_version, 0, 0, "XTacacs"); + proto_tree_add_item(tacacs_tree, hf_tacacs_version, NullTVB, 0, 0, "XTacacs"); if (pi.match_port == pi.destport) { - proto_tree_add_item_hidden(tacacs_tree, hf_tacacs_request, + proto_tree_add_item_hidden(tacacs_tree, hf_tacacs_request, NullTVB, offset, END_OF_FRAME, TRUE); - proto_tree_add_text(tacacs_tree, offset, + proto_tree_add_text(tacacs_tree, NullTVB, offset, END_OF_FRAME, "Request: <opaque data>" ); } else { - proto_tree_add_item_hidden(tacacs_tree, hf_tacacs_response, + proto_tree_add_item_hidden(tacacs_tree, hf_tacacs_response, NullTVB, offset, END_OF_FRAME, TRUE); - proto_tree_add_text(tacacs_tree, offset, + proto_tree_add_text(tacacs_tree, NullTVB, offset, END_OF_FRAME, "Response: <opaque data>"); } } @@ -106,23 +106,23 @@ dissect_tacplus(const u_char *pd, int offset, frame_data *fd, proto_tree *tree) if (tree) { - ti = proto_tree_add_item(tree, proto_tacacs, offset, END_OF_FRAME, NULL); + ti = proto_tree_add_item(tree, proto_tacacs, NullTVB, offset, END_OF_FRAME, NULL); tacacs_tree = proto_item_add_subtree(ti, ett_tacacs); - proto_tree_add_item(tacacs_tree, hf_tacacs_version, 0, 0, "Tacacs+"); + proto_tree_add_item(tacacs_tree, hf_tacacs_version, NullTVB, 0, 0, "Tacacs+"); if (pi.match_port == pi.destport) { - proto_tree_add_item_hidden(tacacs_tree, hf_tacacs_request, + proto_tree_add_item_hidden(tacacs_tree, hf_tacacs_request, NullTVB, offset, END_OF_FRAME, TRUE); - proto_tree_add_text(tacacs_tree, offset, + proto_tree_add_text(tacacs_tree, NullTVB, offset, END_OF_FRAME, "Request: <opaque data>" ); } else { - proto_tree_add_item_hidden(tacacs_tree, hf_tacacs_response, + proto_tree_add_item_hidden(tacacs_tree, hf_tacacs_response, NullTVB, offset, END_OF_FRAME, TRUE); - proto_tree_add_text(tacacs_tree, offset, + proto_tree_add_text(tacacs_tree, NullTVB, offset, END_OF_FRAME, "Response: <opaque data>"); } } |