summaryrefslogtreecommitdiff
path: root/packet-lpd.c
diff options
context:
space:
mode:
authorGilbert Ramirez <gram@alumni.rice.edu>2000-05-11 08:18:09 +0000
committerGilbert Ramirez <gram@alumni.rice.edu>2000-05-11 08:18:09 +0000
commit292e38e2c61edcd14bfa30ca3c72bacda1bcbe32 (patch)
treedb4edef02456a48d0f6d505166ac7d70f6c0f644 /packet-lpd.c
parent162800efb308901e0c302517be01226130e39b19 (diff)
downloadwireshark-292e38e2c61edcd14bfa30ca3c72bacda1bcbe32.tar.gz
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-lpd.c')
-rw-r--r--packet-lpd.c14
1 files changed, 7 insertions, 7 deletions
diff --git a/packet-lpd.c b/packet-lpd.c
index 63f2009c5d..f354757101 100644
--- a/packet-lpd.c
+++ b/packet-lpd.c
@@ -2,7 +2,7 @@
* Routines for LPR and LPRng packet disassembly
* Gilbert Ramirez <gram@xiexie.org>
*
- * $Id: packet-lpd.c,v 1.18 2000/04/20 15:24:41 gram Exp $
+ * $Id: packet-lpd.c,v 1.19 2000/05/11 08:15:23 gram Exp $
*
* Ethereal - Network traffic analyzer
* By Gerald Combs <gerald@zing.org>
@@ -104,23 +104,23 @@ dissect_lpd(const u_char *pd, int offset, frame_data *fd, proto_tree *tree)
}
if (tree) {
- ti = proto_tree_add_item(tree, proto_lpd, offset,
+ ti = proto_tree_add_item(tree, proto_lpd, NullTVB, offset,
END_OF_FRAME, NULL);
lpd_tree = proto_item_add_subtree(ti, ett_lpd);
if (lpr_packet_type == response) {
- proto_tree_add_item_hidden(lpd_tree, hf_lpd_response, 0, 0, TRUE);
+ proto_tree_add_item_hidden(lpd_tree, hf_lpd_response, NullTVB, 0, 0, TRUE);
} else {
- proto_tree_add_item_hidden(lpd_tree, hf_lpd_request, 0, 0, TRUE);
+ proto_tree_add_item_hidden(lpd_tree, hf_lpd_request, NullTVB, 0, 0, TRUE);
}
if (lpr_packet_type == request) {
printer = find_printer_string(pd, offset+1, END_OF_FRAME);
if (pd[offset] <= 9 && printer) {
- proto_tree_add_text(lpd_tree, offset, 1,
+ proto_tree_add_text(lpd_tree, NullTVB, offset, 1,
lpd_client_code[pd[offset]]);
- proto_tree_add_text(lpd_tree, offset+1,
+ proto_tree_add_text(lpd_tree, NullTVB, offset+1,
strlen(printer), "Printer/options: %s", printer);
}
else {
@@ -134,7 +134,7 @@ dissect_lpd(const u_char *pd, int offset, frame_data *fd, proto_tree *tree)
int response = pd[offset];
if (response <= 3) {
- proto_tree_add_text(lpd_tree, offset, 1, "Response: %s",
+ proto_tree_add_text(lpd_tree, NullTVB, offset, 1, "Response: %s",
lpd_server_code[response]);
}
else {