Commit Graph

83 Commits

Author SHA1 Message Date
Guy Harris 3a04908429 Add fields for procedure numbers for NFS V2, V3, and V4, and register
them with the ONC RPC dissector.

svn path=/trunk/; revision=6494
2002-10-24 20:55:03 +00:00
Guy Harris d5f34ad8b2 Add an extra argument to "rpc_init_proc_table()" that can specify an hf_
value for a field to be used for the procedure number for that version
of the protocol; use that field, if specified, instead of just putting
in a generic "rpc.procedure" field.

Have the ypserv dissector register those fields and supply them to
"rpc_init_proc_table()".  Supply -1 for other RPC programs (for now),
meaning "no such field exists".

svn path=/trunk/; revision=6486
2002-10-23 21:17:03 +00:00
Guy Harris a236ba90d0 From Mike Frisch: fix problems with SETCLIENTID and SETCLIENTID_REPLY
decoding.

svn path=/trunk/; revision=6415
2002-10-14 17:08:53 +00:00
Jörg Mayer 7c4176d868 Removed trailing whitespaces from .h and .c files using the
winapi_cleanup tool written by Patrik Stridvall for the wine
project.

svn path=/trunk/; revision=6117
2002-08-28 21:04:11 +00:00
Guy Harris c1f5fff524 From Mike Frisch: add the FATTR4_MOUNTED_ON_FILEID attribute.
svn path=/trunk/; revision=5972
2002-08-08 22:15:07 +00:00
Guy Harris 4eccf96803 From Mike Frisch: fixed LOOKUPP (NFSv4) decoding (previously undefined
operation), added two new NFS4ERR_xxx error codes, and minor fix to ACL
decoding.

svn path=/trunk/; revision=5966
2002-08-07 02:54:22 +00:00
Guy Harris 5ace0a806e From Mike Frisch: fix NFSv4 ACL decoding.
svn path=/trunk/; revision=5957
2002-08-06 05:51:13 +00:00
Guy Harris 0fa475f15c From Mike Frisch: sync the SETCLIENTID args decoder with the latest
nfs4_prot.x.

svn path=/trunk/; revision=5956
2002-08-06 05:43:30 +00:00
Guy Harris b9e44d4a35 Frame numbers are "guint32"s, not signed "int"s.
svn path=/trunk/; revision=5952
2002-08-06 00:58:23 +00:00
Jörg Mayer 173fe5aef4 Replace the types from sys/types.h and netinet/in.h by their glib.h
equivalents for the toplevel directory. The removal of winsock2.h will
hopefully not cause any problems under MSVC++, as those files using
struct timeval still include wtap.h, which still includes winsock2.h.

svn path=/trunk/; revision=5932
2002-08-02 23:36:07 +00:00
Guy Harris 378289f3e2 From Mike Frisch: update the ACL and LOCK/LOCKT/LOCKU decoding
for NFSv4.

svn path=/trunk/; revision=5717
2002-06-20 20:55:49 +00:00
Guy Harris 97a7ae2cba Various fixes from Mike Frisch (remove unused arguments, make variables
unsigned where appropriate).

svn path=/trunk/; revision=5519
2002-05-21 22:31:36 +00:00
Guy Harris a39b66edaf From Mike Frisch: fix most of the TODOs.
Make a pile of things static.

Remove declarations of no-longer-extant routines from "packet-nfs.h".

svn path=/trunk/; revision=5516
2002-05-21 21:13:42 +00:00
Ronnie Sahlberg 3143c595a4 Option to make filtering on nfs fhandles stateful.
When this ption is enabled in Protocols/NFS displayfilters for fhandle fields
such as nfs.fh.{hash|name|full_name} will find both the request and matching
response packets even if the fhandle is only present in one of the packets.
The option supports all NFS and related protocols which use nfs fhandles
including async NLM.
The option will not work with nfs packets containing multiple fhandles in
one PDU, nor will it work if tcp collapses multiple segments/pdus into
one larger segment.
It only works for async NLM if one first enables the MSG/RES stateful
matching for async NLM.

svn path=/trunk/; revision=5515
2002-05-21 10:17:30 +00:00
Uwe Girlich 2ca7ff7848 Removed many senseless pinfo parameters in RPC dissection and the layers above.
svn path=/trunk/; revision=5090
2002-04-03 13:24:13 +00:00
Guy Harris d124f3f5e4 Updates from Mike Frisch.
svn path=/trunk/; revision=4895
2002-03-07 05:51:11 +00:00
Guy Harris b25db1028e From Mike Frisch: remove debug printf statements.
svn path=/trunk/; revision=4883
2002-03-06 04:02:02 +00:00
Guy Harris eae952ee35 Updates from Mike Frisch.
svn path=/trunk/; revision=4840
2002-03-01 22:14:22 +00:00
Guy Harris f6563d402e If you compile with IBM's compiler on AIX 5.1, the compiler apparently
somehow doesn't like the structure member name "fh_len", for some reason
(probably some #define in some header file); change that (and other
"fh_len" variables) to "fh_length" instead.

svn path=/trunk/; revision=4705
2002-02-06 22:54:01 +00:00
Guy Harris 92915713d3 Allow a length of -1 to be specified when adding FT_NONE and FT_PROTOCOL
items to the protocol tree; it's interpreted as "the rest of the data in
the tvbuff".  This can be used if

	1) the item covers the entire packet or the remaining payload in
	   the packet

or

	2) the item's length won't be known until it's dissected, and
	   will be then set with "proto_item_set_len()" - if an
	   exception is thrown in the dissection, it means the item ran
	   *past* the end of the tvbuff, so saying it runs to the end of
	   the tvbuff is reasonable.

Convert a number of "proto_tree_add_XXX()" calls using
"tvb_length_remaining()", values derived from the result of
"tvb_length()", or 0 (in the case of items whose length is unknown) to
use -1 instead (using 0 means that if an exception is thrown, selecting
the item highlights nothing; using -1 means it highlights all the data
for that item that's available).

In some places where "tvb_length()" or "tvb_length_remaining()" was used
to determine how large a packet is, use "tvb_reported_length()" or
"tvb_reported_length_remaining()", instead - the first two calls
indicate how much captured data was in the packet, the latter two calls
indicate how large the packet actually was (and the fact that using the
latter could cause BoundsError exceptions to be thrown is a feature - if
such an exception is thrown, the frame really *was* short, and it should
be tagged as such).

Replace some "proto_tree_add_XXX()" calls with equivalent
"proto_tree_add_item()" calls.

Fix some indentation.

svn path=/trunk/; revision=4578
2002-01-20 22:12:39 +00:00
Uwe Girlich 164e11c137 From Ronnie Sahlberg:
this fixes the bug that nfs name snooping did not work for nfs v2.

svn path=/trunk/; revision=4541
2002-01-14 13:16:31 +00:00
Uwe Girlich eebc0a4a66 NFSv3 fsstat reply label texts explanded. "afiles" and similar names were not
really that useful.

svn path=/trunk/; revision=4540
2002-01-14 12:22:58 +00:00
Guy Harris 354b4b74d0 From Ronnie Sahlberg: file handle to file name resolution in NFS and
related protocols.

svn path=/trunk/; revision=4533
2002-01-12 10:24:47 +00:00
Guy Harris 425fce6e92 Thou shalt not use C++-style comments in C code, for they upset some C
compilers.

svn path=/trunk/; revision=4284
2001-11-27 07:41:39 +00:00
Guy Harris d82c74d757 From Ronnie Sahlberg: FT_UINT64 support, code to handle 64-bit integers
without requiring compiler support for them, and updates to the
Diameter, L2TP, NFS, and NLM dissectors to use it and to the ONC RPC
dissector to allow ONC RPC subdissectors to use it.

svn path=/trunk/; revision=4099
2001-10-29 21:13:13 +00:00
Guy Harris e5eee0bd76 Updates from Mike Frisch to reflect NFSv4 protocol changes.
svn path=/trunk/; revision=4098
2001-10-29 20:49:28 +00:00
Guy Harris 92d94edd0c Times in NFS done as FT_ABSOLUTE_TIME and FT_RELATIVE_TIME fields, from
Ronnie Sahlberg.

svn path=/trunk/; revision=3938
2001-09-14 08:22:29 +00:00
Guy Harris decbfd0226 Labels must be followed by statements; GCC may let you get away without
the statement, but MSVC++ doesn't.

svn path=/trunk/; revision=3574
2001-06-19 08:33:00 +00:00
Uwe Girlich 61f8385703 NFS file handle analysing works now for kernel based NFS v3 servers of
Linux 2.4.0 too.

svn path=/trunk/; revision=3569
2001-06-18 16:38:22 +00:00
Guy Harris 8412393197 From Joerg Mayer: explicitly fill in all members of a
"header_field_info" structure, including the ones that are later set by
the routines to register fields.

svn path=/trunk/; revision=3561
2001-06-18 02:18:27 +00:00
Guy Harris abd9fc125f There are no more old-style (non-tvbuffified) ONC RPC dissectors, so get
rid of support for them, and remove the "_tvb" from the end of the names
of RPC type dissection routines.

Update Gerald's e-mail address.

svn path=/trunk/; revision=3477
2001-05-30 06:01:02 +00:00
Guy Harris e38a3ef330 Tvbuffified NFS dissector, from Mike Frisch, plus some registered-field
cleanups.

svn path=/trunk/; revision=3476
2001-05-30 04:40:27 +00:00
Guy Harris a61d43b6d5 If you put an item into the protocol tree with "dissect_rpc_data()",
it must be FT_BYTES, not FT_STRING.

svn path=/trunk/; revision=3440
2001-05-23 19:13:37 +00:00
Guy Harris 64a43e1c0e Fixes to Lemon to get it to compile on platforms (such as some versions
of Tru64 UNIX) that define TRUE and FALSE.

Fixes to some Tru64 compiler warnings.

svn path=/trunk/; revision=3120
2001-03-09 04:35:25 +00:00
Gilbert Ramirez 697cd22723 Fix a decode problem with failed NFSv4 SETATTR operations.
From Mike Frisch.

svn path=/trunk/; revision=3109
2001-03-06 18:27:07 +00:00
Guy Harris 22e8d3d18f Update from Mike Frisch.
svn path=/trunk/; revision=3095
2001-03-02 21:54:02 +00:00
Guy Harris fdcd7c35b0 NFSv4 updates from Mike Frisch to fix some cosmetic issues when
displaying XDR arrays.

svn path=/trunk/; revision=3065
2001-02-21 23:53:25 +00:00
Guy Harris cb58c92d1d Updates from Mike Frisch.
svn path=/trunk/; revision=3029
2001-02-13 18:28:29 +00:00
Guy Harris 776490b1db Further NFSV4 updates from Mike Frisch.
svn path=/trunk/; revision=3010
2001-02-09 18:26:04 +00:00
Guy Harris fc9ed1d58b Updates from Mike Frisch.
svn path=/trunk/; revision=2998
2001-02-07 22:10:49 +00:00
Guy Harris b2ae96ed4d Allow dissectors of ONC RPC-based protocols to register themselves
either with a table of old-style dissectors or a table of tvbuffified
dissectors, and have the RPC dissector pass the appropriate arguments to
the dissectors.

Finish tvbuffifying the NLM dissector, getting rid of the last traces of
old-style dissector code.

In those routines in the NFS dissector that take new-style arguments
(because they're called from the NLM dissector), make them take an
offset as an argument, so they don't assume that they're handed a tvbuff
starting at the stuff they're supposed to dissect, and make the versions
that take old-style arguments construct a tvbuff and call the versions
that take new-style arguments.  Do the latter with the routines in
"packet-rpc.c" as well.

svn path=/trunk/; revision=2943
2001-01-28 03:39:48 +00:00
Guy Harris 8c14ddcd0f Fix comments to reflect what a null function pointer in a "vsff" table
really means.

Make the "XXX_proc" arrays static.

svn path=/trunk/; revision=2920
2001-01-18 09:55:10 +00:00
Gilbert Ramirez 5b7f184296 Ensure that all value_string arrays end in {0, NULL}. Dissectors got away
with not terminating their arrays because they knew the limits of the
value used to look up strings in the value_string array, but the
dfilter_expr_dlg does not know these limits and must rely on the terminating
{0, NULL} record.

Also, in SNA fixed a bug in which a field should have been defined as FT_UINT8
but was defined as FT_BOOLEAN.

In WTP, fixed a value string which had duplicate keys.

svn path=/trunk/; revision=2817
2001-01-03 16:41:08 +00:00
Guy Harris 0e7c1de08a Have "proto_register_protocol()" build a list of data structures for
protocols, in addition to adding structures to the list of filterable
fields.  Give it an extra argument that specifies a "short name" for the
protocol, for use in such places as

	pinfo->current_proto;

	the dialog box for constructing filters;

	the preferences tab for the protocol;

and so on (although we're not yet using it in all those places).

Make the preference name that appears in the preferences file and the
command line for the DIAMETER protocol "diameter", not "Diameter"; the
convention is that the name in question be all-lower-case.

Make some routines and variables that aren't exported static.

Update a comment in the ICP dissector to make it clear that the
dissector won't see fragments other than the first fragment of a
fragmented datagram.

svn path=/trunk/; revision=2810
2001-01-03 06:56:03 +00:00
Guy Harris a810e733e6 NFS V4 support, from Mike Frisch.
svn path=/trunk/; revision=2725
2000-12-01 00:38:20 +00:00
Guy Harris 99c98f9e74 Move "bytes_to_str()" to "strutil.c" from "packet.c" - it's just a
string formatter, like "format_text()", and, as "tvbuff.c" now calls it
(*vide infra*), we don't want to have to make "tvbuff.c" drag "packet.h"
in just to declare "bytes_to_str()".  It's now declared in "strutil.h",
so include it in modules that use "bytes_to_str()" and weren't already
including it.

Add a "tvb_bytes_to_str()" wrapper that calls "tvb_get_ptr()" to get a
pointer to a chunk of N bytes at a given offset in a tvbuff and then
hands that chunk to "bytes_to_str()".  Convert the code that was doing
that to use "tvb_bytes_to_str()" instead (which caught what I suspect is
a bug in the Q.2931 dissector, where it was handing an offset of 0 to
"tvb_get_ptr()" - a cut-and-pasteo, I think).

Tvbuffify the ARP dissector.

svn path=/trunk/; revision=2634
2000-11-13 07:19:37 +00:00
Guy Harris 6dc7a7ac4f Don't set the text on a V2 READDIR entry if there's no entry.
svn path=/trunk/; revision=2380
2000-08-27 02:03:31 +00:00
Guy Harris a0d9061db6 Get rid of an unused variable.
svn path=/trunk/; revision=2278
2000-08-15 21:27:46 +00:00
Uwe Girlich 2452ceac2b Much cleaner tvb start code for file handle dissection.
svn path=/trunk/; revision=2272
2000-08-14 13:21:15 +00:00
Uwe Girlich b485f8e951 Several new RPC dissecting function introduced. Interface to
existing functions changed. So NFS was also necessary to change.

svn path=/trunk/; revision=2225
2000-08-08 06:19:52 +00:00