aboutsummaryrefslogtreecommitdiffstats
path: root/packet-mount.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-mount.c
parent162800efb308901e0c302517be01226130e39b19 (diff)
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-mount.c')
-rw-r--r--packet-mount.c52
1 files changed, 26 insertions, 26 deletions
diff --git a/packet-mount.c b/packet-mount.c
index bbda07bdbe..349b68b9fb 100644
--- a/packet-mount.c
+++ b/packet-mount.c
@@ -1,7 +1,7 @@
/* packet-mount.c
* Routines for mount dissection
*
- * $Id: packet-mount.c,v 1.13 2000/04/04 06:46:25 guy Exp $
+ * $Id: packet-mount.c,v 1.14 2000/05/11 08:15:23 gram Exp $
*
* Ethereal - Network traffic analyzer
* By Gerald Combs <gerald@zing.org>
@@ -86,7 +86,7 @@ dissect_fhstatus(const u_char *pd, int offset, frame_data *fd, proto_tree *tree)
if (!BYTES_ARE_IN_FRAME(offset,4)) return offset;
status = EXTRACT_UINT(pd, offset+0);
if (tree) {
- proto_tree_add_item(tree, hf_mount_status, offset, 4, status);
+ proto_tree_add_item(tree, hf_mount_status, NullTVB, offset, 4, status);
}
offset += 4;
@@ -139,7 +139,7 @@ dissect_mountlist(const u_char *pd, int offset, frame_data *fd, proto_tree *tree
char* directory;
if (tree) {
- mountlist_item = proto_tree_add_item(tree, hf_mount_mountlist,
+ mountlist_item = proto_tree_add_item(tree, hf_mount_mountlist, NullTVB,
offset+0, END_OF_FRAME, NULL);
if (mountlist_item)
mountlist_tree = proto_item_add_subtree(mountlist_item, ett_mount_mountlist);
@@ -198,7 +198,7 @@ dissect_exportlist(const u_char *pd, int offset, frame_data *fd, proto_tree *tre
char* directory;
if (tree) {
- exportlist_item = proto_tree_add_item(tree, hf_mount_exportlist,
+ exportlist_item = proto_tree_add_item(tree, hf_mount_exportlist, NullTVB,
offset+0, END_OF_FRAME, NULL);
if (exportlist_item)
exportlist_tree = proto_item_add_subtree(exportlist_item, ett_mount_exportlist);
@@ -207,7 +207,7 @@ dissect_exportlist(const u_char *pd, int offset, frame_data *fd, proto_tree *tre
offset = dissect_rpc_string(pd, offset, fd, exportlist_tree, hf_mount_exportlist_directory,&directory);
groups_offset = offset;
if (tree) {
- groups_item = proto_tree_add_item(exportlist_tree, hf_mount_groups,
+ groups_item = proto_tree_add_item(exportlist_tree, hf_mount_groups, NullTVB,
offset+0, END_OF_FRAME, NULL);
if (groups_item)
groups_tree = proto_item_add_subtree(groups_item, ett_mount_groups);
@@ -331,7 +331,7 @@ dissect_mount_pathconf_reply(const u_char *pd, int offset, frame_data *fd,
if (!(pc_mask & (PC_ERROR_LINK_MAX|PC_ERROR_ALL))) {
if (tree) {
proto_tree_add_item(tree,
- hf_mount_pathconf_link_max, offset, 4,
+ hf_mount_pathconf_link_max, NullTVB, offset, 4,
EXTRACT_UINT(pd, offset+0));
}
}
@@ -342,7 +342,7 @@ dissect_mount_pathconf_reply(const u_char *pd, int offset, frame_data *fd,
if (!(pc_mask & (PC_ERROR_MAX_CANON|PC_ERROR_ALL))) {
if (tree) {
proto_tree_add_item(tree,
- hf_mount_pathconf_max_canon, offset + 2, 2,
+ hf_mount_pathconf_max_canon, NullTVB, offset + 2, 2,
(EXTRACT_UINT(pd, offset+0)) & 0xFFFF);
}
}
@@ -354,7 +354,7 @@ dissect_mount_pathconf_reply(const u_char *pd, int offset, frame_data *fd,
if (!(pc_mask & (PC_ERROR_MAX_INPUT|PC_ERROR_ALL))) {
if (tree) {
proto_tree_add_item(tree,
- hf_mount_pathconf_max_input, offset + 2, 2,
+ hf_mount_pathconf_max_input, NullTVB, offset + 2, 2,
(EXTRACT_UINT(pd, offset+0)) & 0xFFFF);
}
}
@@ -365,7 +365,7 @@ dissect_mount_pathconf_reply(const u_char *pd, int offset, frame_data *fd,
if (!(pc_mask & (PC_ERROR_NAME_MAX|PC_ERROR_ALL))) {
if (tree) {
proto_tree_add_item(tree,
- hf_mount_pathconf_name_max, offset + 2, 2,
+ hf_mount_pathconf_name_max, NullTVB, offset + 2, 2,
(EXTRACT_UINT(pd, offset+0)) & 0xFFFF);
}
}
@@ -376,7 +376,7 @@ dissect_mount_pathconf_reply(const u_char *pd, int offset, frame_data *fd,
if (!(pc_mask & (PC_ERROR_PATH_MAX|PC_ERROR_ALL))) {
if (tree) {
proto_tree_add_item(tree,
- hf_mount_pathconf_path_max, offset + 2, 2,
+ hf_mount_pathconf_path_max, NullTVB, offset + 2, 2,
(EXTRACT_UINT(pd, offset+0)) & 0xFFFF);
}
}
@@ -387,7 +387,7 @@ dissect_mount_pathconf_reply(const u_char *pd, int offset, frame_data *fd,
if (!(pc_mask & (PC_ERROR_PIPE_BUF|PC_ERROR_ALL))) {
if (tree) {
proto_tree_add_item(tree,
- hf_mount_pathconf_pipe_buf, offset + 2, 2,
+ hf_mount_pathconf_pipe_buf, NullTVB, offset + 2, 2,
(EXTRACT_UINT(pd, offset+0)) & 0xFFFF);
}
}
@@ -400,35 +400,35 @@ dissect_mount_pathconf_reply(const u_char *pd, int offset, frame_data *fd,
if (!(pc_mask & (PC_ERROR_VDISABLE|PC_ERROR_ALL))) {
if (tree) {
proto_tree_add_item(tree,
- hf_mount_pathconf_vdisable, offset + 3, 1,
+ hf_mount_pathconf_vdisable, NullTVB, offset + 3, 1,
(EXTRACT_UINT(pd, offset+0)) & 0xFF);
}
}
offset += 4;
if (tree) {
- ti = proto_tree_add_item(tree, hf_mount_pathconf_mask,
+ ti = proto_tree_add_item(tree, hf_mount_pathconf_mask, NullTVB,
offset + 2, 2, pc_mask);
mask_tree = proto_item_add_subtree(ti, ett_mount_pathconf_mask);
- proto_tree_add_item(mask_tree, hf_mount_pathconf_error_all,
+ proto_tree_add_item(mask_tree, hf_mount_pathconf_error_all, NullTVB,
offset + 2, 2, pc_mask);
- proto_tree_add_item(mask_tree, hf_mount_pathconf_error_link_max,
+ proto_tree_add_item(mask_tree, hf_mount_pathconf_error_link_max, NullTVB,
offset + 2, 2, pc_mask);
- proto_tree_add_item(mask_tree, hf_mount_pathconf_error_max_canon,
+ proto_tree_add_item(mask_tree, hf_mount_pathconf_error_max_canon, NullTVB,
offset + 2, 2, pc_mask);
- proto_tree_add_item(mask_tree, hf_mount_pathconf_error_max_input,
+ proto_tree_add_item(mask_tree, hf_mount_pathconf_error_max_input, NullTVB,
offset + 2, 2, pc_mask);
- proto_tree_add_item(mask_tree, hf_mount_pathconf_error_name_max,
+ proto_tree_add_item(mask_tree, hf_mount_pathconf_error_name_max, NullTVB,
offset + 2, 2, pc_mask);
- proto_tree_add_item(mask_tree, hf_mount_pathconf_error_path_max,
+ proto_tree_add_item(mask_tree, hf_mount_pathconf_error_path_max, NullTVB,
offset + 2, 2, pc_mask);
- proto_tree_add_item(mask_tree, hf_mount_pathconf_error_pipe_buf,
+ proto_tree_add_item(mask_tree, hf_mount_pathconf_error_pipe_buf, NullTVB,
offset + 2, 2, pc_mask);
- proto_tree_add_item(mask_tree, hf_mount_pathconf_chown_restricted,
+ proto_tree_add_item(mask_tree, hf_mount_pathconf_chown_restricted, NullTVB,
offset + 2, 2, pc_mask);
- proto_tree_add_item(mask_tree, hf_mount_pathconf_no_trunc,
+ proto_tree_add_item(mask_tree, hf_mount_pathconf_no_trunc, NullTVB,
offset + 2, 2, pc_mask);
- proto_tree_add_item(mask_tree, hf_mount_pathconf_error_vdisable,
+ proto_tree_add_item(mask_tree, hf_mount_pathconf_error_vdisable, NullTVB,
offset + 2, 2, pc_mask);
}
offset += 4;
@@ -510,7 +510,7 @@ dissect_mountstat3(const u_char *pd, int offset, frame_data *fd, proto_tree *tre
mountstat3 = EXTRACT_UINT(pd, offset+0);
if (tree) {
- proto_tree_add_item(tree, hfindex, offset, 4, mountstat3);
+ proto_tree_add_item(tree, hfindex, NullTVB, offset, 4, mountstat3);
}
offset += 4;
@@ -535,13 +535,13 @@ dissect_mount3_mnt_reply(const u_char *pd, int offset, frame_data *fd,
offset = dissect_nfs_fh3(pd,offset,fd,tree,"fhandle");
if (!BYTES_ARE_IN_FRAME(offset,4)) return offset;
auth_flavors = EXTRACT_UINT(pd,offset+0);
- proto_tree_add_item(tree,hf_mount_flavors,
+ proto_tree_add_item(tree,hf_mount_flavors, NullTVB,
offset, 4, auth_flavors);
offset += 4;
for (auth_flavor_i = 0 ; auth_flavor_i < hf_mount_flavors ; auth_flavor_i++) {
if (!BYTES_ARE_IN_FRAME(offset,4)) return offset;
auth_flavor = EXTRACT_UINT(pd,offset+0);
- proto_tree_add_item(tree,hf_mount_flavor,
+ proto_tree_add_item(tree,hf_mount_flavor, NullTVB,
offset, 4, auth_flavor);
offset += 4;
}