Commit Graph

83 Commits

Author SHA1 Message Date
Guy Harris 61aefd7470 Don't use "fd->pkt_len" when checking to see if you've run off the end
of the packet, use "pi.captured_len" - "fd->pkt_len" may include data
that isn't in the capture, due to a short snapshot length.

Don't use "fd->cap_len" when checking to see if you've run off the end
of the packe, use "pi.captured_len" - "fd->cap_len" isn't adjusted to
reflect any length fields, but "pi.captured_len" is (removing, for
example, Ethernet padding from the packet).

Use "END_OF_FRAME" rather than "pi.captured_len - offset", to make it a
bit clearer what's being done.

In the V.120 dissector, use "tvb_length()" when adding the top-level
protocol tree entry for V.120, as it's a tvbuffified dissector.

svn path=/trunk/; revision=2214
2000-08-06 07:22:38 +00:00
Guy Harris 4793e45e75 Add some error values that, whilst they're not in the NFS V2 spec, are,
as I remember, issued by some NFS V2 servers (EXDEV, for one, can almost
certainly be issued by most V2 servers).

svn path=/trunk/; revision=2201
2000-08-03 19:27:19 +00:00
Uwe Girlich f7f6b5175a File handle dissection works now with the old Linux user-land nfsd too.
svn path=/trunk/; revision=2134
2000-07-13 13:09:25 +00:00
Uwe Girlich 1d2ef1cf60 Start of a NFS file handle dissection. ReliantUNIX and Linux knfsd handles
are correctly dissected.

svn path=/trunk/; revision=2133
2000-07-13 05:48:50 +00:00
Guy Harris 5592101b43 Use "dissect_rpc_list()" to dissect NFS READDIR/READDIRPLUS reply lists
and portmapper DUMP reply lists, rather than duplicating what
"dissect_rpc_list()" does.

svn path=/trunk/; revision=2060
2000-06-12 08:47:34 +00:00
Guy Harris 283ce59938 Add routines for adding items to a protocol tree that take arguments of
a particular type, rather than taking a varargs list, along the lines of
the "proto_tree_add_XXX_format()" routines.

Replace most calls to "proto_tree_add_item()" and
"proto_tree_add_item_hidden()" with calls to those routines.

Rename "proto_tree_add_item()" and "proto_tree_add_item_hidden()" to
"proto_tree_add_item_old()" and "proto_tree_add_item_hidden_old()", and
add new "proto_tree_add_item()" and "proto_tree_add_item_hidden()"
routines that don't take the item to be added as an argument - instead,
they fetch the argument from the packet whose tvbuff was handed to them,
from the offset handed to them.

svn path=/trunk/; revision=2031
2000-05-31 05:09:07 +00:00
Gilbert Ramirez 292e38e2c6 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
2000-05-11 08:18:09 +00:00
Guy Harris 5f0fc518c7 Use the new split between protocol registration and protocol handoff
registration routines to get rid of the special handling of ONC RPC
protocols - dissectors for ONC RPC-based protocols should register their
protocol, fields, and ETT values in a protocol registration routine, and
register themselves with the ONC RPC dissector in their protocol handoff
routine, so that the latter is done after the ONC RPC dissector's
protocol registration routine is called, so that the data structures
needed when dissectors for ONC RPC protocols register themselves with
the ONC RPC dissector have been initialized.

Get rid of "init_dissect_rpc()", which initializes said data structures;
do that in "proto_register_rpc()" instead.

svn path=/trunk/; revision=1789
2000-04-04 06:46:41 +00:00
Guy Harris 0b8378e622 When dissecting an NFS file handle, show the raw bytes of the file
handle data (snoop does this, and it's somewhat convenient if you're
trying to see whether, say, an ACCESS call is acting on the file whose
file handle you got back from a previous MOUNT request).

Boost the maximum number of bytes worth of hex data shown by
"bytes_to_str()" from 10 to 16, so that we can show the file handle 16
bytes per line (as snoop does).

svn path=/trunk/; revision=1744
2000-03-23 00:38:11 +00:00
Gilbert Ramirez e29f2705bf Change dfilter_init() to check for empty-string abbreviations and for
duplicate abbreviations. All mods to packet-*.c files are fixes to remove
those cases.

svn path=/trunk/; revision=1733
2000-03-20 22:52:48 +00:00
Gilbert Ramirez f6e92a9e93 Break proto_tree_add_item_format() into multiple functions:
proto_tree_add_protocol_format()
	proto_tree_add_uint_format()
	proto_tree_add_ipxnet_format()
	proto_tree_add_ipv4_format()
	proto_tree_add_ipv6_format()
	proto_tree_add_bytes_format()
	proto_tree_add_string_format()
	proto_tree_add_ether_format()
	proto_tree_add_time_format()
	proto_tree_add_double_format()
	proto_tree_add_boolean_format()
If using GCC 2.x, we can check the print-format against the variable args
passed in. Regardless of compiler, we can now check at run-time that the
field type passed into the function corresponds to what that function
expects (FT_UINT, FT_BOOLEAN, etc.)

Note that proto_tree_add_protocol_format() does not require a value field,
since the value of a protocol is always NULL. It's more intuitive w/o the
vestigial argument.

Fixed a proto_tree_add_item_format-related bug in packet-isis-hello.c
Fixed a variable usage bug in packet-v120.c. (ett_* was used instead of hf_*)

Checked in Guy's fix for the function declearation for proto_tree_add_text()
and proto_tree_add_notext().

svn path=/trunk/; revision=1713
2000-03-12 04:48:32 +00:00
Guy Harris f249c7f2dc Fix some "proto_tree_add_text()" calls.
svn path=/trunk/; revision=1696
2000-03-07 05:28:39 +00:00
Uwe Girlich 0c64bc4400 Corrected a SEGFAULT in v2 readdir reply, v3 readdir reply, and v3 readdirplus
reply. It came in with the new dissect_rpc_string() with gives the string
back.

svn path=/trunk/; revision=1570
2000-01-26 09:52:42 +00:00
Guy Harris 167999e61e Give "dissect_rpc_string()" an extra "char **" argument; if it's
non-null, it returns through that argument a pointer to the displayed
version of the string, otherwise it just frees that string.

Use that to put, in the tree item for READDIR and READDIRPLUS reply
directory entry items, the file name from the directory entry.

svn path=/trunk/; revision=1521
2000-01-22 05:49:08 +00:00
Uwe Girlich 28b71348de Last dissectors for NFS v3 are finally done.
svn path=/trunk/; revision=1508
2000-01-18 11:56:15 +00:00
Guy Harris 7a943b7810 Fix Gerald's e-mail address.
svn path=/trunk/; revision=1437
2000-01-07 22:05:43 +00:00
Uwe Girlich 2043db7cca New NFS v3 dissector (READDIR). 5 functions are still missing.
svn path=/trunk/; revision=1354
1999-12-16 08:38:12 +00:00
Uwe Girlich f71e02dca0 More dissectors for NFS v3. Still 7 functions are missing.
NFS reply status now searchable with the filter expression nfs.status.

svn path=/trunk/; revision=1330
1999-12-14 11:53:19 +00:00
Uwe Girlich bda3df9c67 More v3 dissectors added. 11 function are still missing.
svn path=/trunk/; revision=1282
1999-12-10 10:52:40 +00:00
Uwe Girlich 634f274cb7 More v3 dissector routines. 14 functions are still missing.
svn path=/trunk/; revision=1259
1999-12-09 12:54:10 +00:00
Uwe Girlich 4fe563a6a2 More v3 dissector routines. 25 functions still missing.
svn path=/trunk/; revision=1258
1999-12-09 10:10:29 +00:00
Uwe Girlich a76ce4a97a NFS v2 ist ready.
svn path=/trunk/; revision=1228
1999-12-06 09:57:34 +00:00
Uwe Girlich 5734ebe43c many new dissectors in the NVF v2 area
svn path=/trunk/; revision=1183
1999-12-02 10:24:02 +00:00
Uwe Girlich 172047e2c6 ACCESS call,reply added.
svn path=/trunk/; revision=1154
1999-11-29 13:16:57 +00:00
Uwe Girlich ca3bcfd404 Some more RPC functions dissected.
svn path=/trunk/; revision=1153
1999-11-29 11:52:40 +00:00
Uwe Girlich 9593366e69 NFS v2 setattr call: non-set values are marked as such.
svn path=/trunk/; revision=1116
1999-11-26 13:32:58 +00:00
Gilbert Ramirez aeb4ec481a Add terminating NULL record to value_string nfs2_mode_names to prevent
segfault.

svn path=/trunk/; revision=1100
1999-11-23 17:52:04 +00:00
Gilbert Ramirez f8f41fe3c6 Added Uwe's update to RPC.
svn path=/trunk/; revision=1069
1999-11-19 13:09:56 +00:00
Guy Harris a7aba0a288 Replace the ETT_ "enum" members, declared in "packet.h", with
dynamically-assigned "ett_" integer values, assigned by
"proto_register_subtree_array()"; this:

	obviates the need to update "packet.h" whenever you add a new
	subtree type - you only have to add a call to
	"proto_register_subtree_array()" to a "register" routine and an
	array of pointers to "ett_", if they're not already there, and
	add a pointer to the new "ett_" variable to the array, if they
	are there;

	would allow run-time-loaded dissectors to allocate subtree types
	when they're loaded.

svn path=/trunk/; revision=1043
1999-11-16 11:44:20 +00:00
Nathan Neulinger 64ed7bcc3c Fixed rpc dissector to upcase program name.
Fixed nfs and nlm to use a lowercase protocol name so filtering will work.

svn path=/trunk/; revision=1035
1999-11-15 14:32:16 +00:00
Nathan Neulinger b72c0d1f60 Uwe Girlich's patches for nfs,mount,portmap and addition of nlm.
svn path=/trunk/; revision=1034
1999-11-15 14:17:20 +00:00
Guy Harris 0978f3c2de Updates to the ONC RPC and NFS code, from Uwe Girlich.
svn path=/trunk/; revision=976
1999-11-05 07:16:23 +00:00
Guy Harris dc6963e2d4 Uwe Girlich's ONC RPC and NFS dissectors.
svn path=/trunk/; revision=946
1999-10-29 01:11:23 +00:00