Commit Graph

94 Commits

Author SHA1 Message Date
Guy Harris a8bc4a0d13 Rename the routines that handle dissector tables with unsigned integer
keys to have _uint in their names, to match the routines that handle
dissector tables with string keys.  (Using _port can confuse people into
thinking they're intended solely for use with TCP/UDP/etc. ports when,
in fact, they work better for things such as Ethernet types, where the
binding of particular values to particular protocols are a lot
stronger.)

svn path=/trunk/; revision=35224
2010-12-20 05:35:29 +00:00
Bill Meier b21ea034b6 Use value_string_ext fcns to access certain value_string arrays;
Sort certain value_string arrays to be in ascending numeric order;
Do minor whitespace cleanup and reformatting of long lines.

svn path=/trunk/; revision=34780
2010-11-04 21:30:42 +00:00
Bill Meier 209109c2fd Define some fcns & vars as static ...
svn path=/trunk/; revision=34458
2010-10-10 20:07:06 +00:00
Jeff Morriss 0ff5638f37 Replace blurbs that match the name (case insensitive) with NULL.
svn path=/trunk/; revision=34227
2010-09-23 21:46:31 +00:00
Jeff Morriss 381664535b As suggested by Kovarththanan Rajaratnam in https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=3548 :
Clean up hf fields some more: mostly removing leading and trailing spaces from names and blurbs.

svn path=/trunk/; revision=34165
2010-09-21 03:14:49 +00:00
Jeff Morriss d643e0366a Remove check_col(). Clean up some spacing/indentation too.
svn path=/trunk/; revision=34142
2010-09-17 02:22:37 +00:00
Jeff Morriss f2cfa4e453 From Cal Turney via https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=5197 :
The NFS dissector (all versions) show access types that have not been requested
to be checked as "not allowed" in the call and reply.  This is incorrect and
misleading.  At present one must manually compare what was requested in order
to assess if access was actually denied for that type.  When there are hundreds
or thousands of these ACCESS requests in a capture, it is not possible or
practical to manually check each one.  

The submitted patch does the following:

* Passes the access mask in the call to the reply for comparison
* Adds filterable fields for each supported (v4) and access type
* Adds a pseudo field, nfs.access_denied
* Lists the access types to be checked in the summary and tree
* Separately lists the supported, denied, and allowed access types in the 
  summary and tree

The changes are applied to all NFS versions.


From me: a couple of small changes to make it compile without warnings.

svn path=/trunk/; revision=34141
2010-09-17 02:03:09 +00:00
Gerald Combs 436ab95472 From Cal Turney via bug 5209:
Decode of SETCLIENTID calls in the Windows x86 version fail with "[Dissector
bug, protocol NFS: STATUS_ACCESS_VIOLATION: dissector accessed an invalid
memory address]".  This error occurs in packet-nfs.c in
dissect_nfs_clientaddr4() where vars 'protocol' and 'universal_ip_address' get
stepped on following the call to scanf().  The b1-b10 vars are declared as
quint8.  While "hh" modifier used in the scanf() is documented in Linux to
correspond to an a signed/unsigned char arg, I cannot find a similar
designation in Windows (MSDN). The Windows C compiler interprets %hhu as
corresponding to a int16 rather than int8.

svn path=/trunk/; revision=34115
2010-09-14 15:43:19 +00:00
Bill Meier aa3ba1a1b5 From Alex Burlyga: Make hf_nfs_slotid4 useful again.
"hf_slotid4 is used for all possible slotid fields in sequence op. This patch
 separates them out and makes it useful for filtering."

See: https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=4995

svn path=/trunk/; revision=33601
2010-07-21 01:43:14 +00:00
Gerald Combs 46bd1dac98 Initialize a variable. Fixes bug 5026.
svn path=/trunk/; revision=33596
2010-07-20 17:16:42 +00:00
Gerald Combs 844e3e122a Use sscanf() to parse clientaddr4 instead of trying to parse it
ourselves. Add support for IPv6 addresses. Fixes bug 5019.

svn path=/trunk/; revision=33585
2010-07-19 21:47:51 +00:00
Bill Meier 40c1c5b28b From Ian Schorr: "NFSv4 COMMIT Calls not decoding"
NFSv4 COMMIT Requests are not decoded.  NFS "malformed packet" logic is
tripped.

This was a bug introduced with the changes in bug 4975.  The dissector
erroneously tries to decode 4 bytes past the end of the packet.

A patch is attached that fixes that, as well as adds "Offset" info in the Info
column for COMMIT calls.

https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=4990

svn path=/trunk/; revision=33478
2010-07-09 00:23:27 +00:00
Jeff Morriss 4522f9b0a4 Limit the number of operations to 128 (arbitrary number) to keep us from attempting to mallocate way too much memory. This fixes the fuzz failure reported in bug 4976.
svn path=/trunk/; revision=33456
2010-07-06 14:57:54 +00:00
Guy Harris 80c8a18da7 Use G_GINT64_CONSTANT() to make a 64-bit all-bits-set constant.
svn path=/trunk/; revision=33454
2010-07-06 09:51:28 +00:00
Guy Harris 39f85d188c No need to add a fake field with the opcode as a string - you can just
compare the real opcode field against a string.

svn path=/trunk/; revision=33452
2010-07-06 08:43:07 +00:00
Stig Bjørlykke 8f686e8af0 Try checking for G_MAXUINT64 instead of 0xffffffffffffffff.
svn path=/trunk/; revision=33451
2010-07-06 07:45:38 +00:00
Stig Bjørlykke 22056542a8 Fix the build on OSX.
svn path=/trunk/; revision=33449
2010-07-06 06:40:34 +00:00
Anders Broman 4a16e04cc0 Fix:
packet-nfs.c:699: warning: type defaults to 'int' in declaration of 'nfsv4_operation_tiers'

packet-nfs.c:9583: warning: unused variable 'saved_fh_hash'
packet-nfs.c:9580: warning: unused variable 'name'

svn path=/trunk/; revision=33448
2010-07-06 05:53:18 +00:00
Anders Broman 7bded303a4 Fix "checked api failed"
svn path=/trunk/; revision=33447
2010-07-06 05:46:52 +00:00
Anders Broman a13bf525a8 From Ian Schorr:
NFSv4 usability enhancements (Info column summaries, filterable fields).
https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=4975

svn path=/trunk/; revision=33442
2010-07-06 04:13:54 +00:00
Jeff Morriss 2ee1711957 From Cal Turney via https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=4831 :
Add the data read/write length to the NFS tree so it is filterable.

From me: don't bother incrementing the offset just to decrement it again.
Change the hf info a bit.

(Ideally the RPC dissector would add the length to the tree not as a text
item; that is left for future work.)

svn path=/trunk/; revision=33101
2010-06-05 00:25:46 +00:00
Bill Meier 80562f4620 From Cal Turney: The NFS FH hash (nfs.fh.hash) incorrectly matches multiple filehandles.
"The method used in packet-nfs.c to calculate a 32-bit hash representing the 
 32-byte filehandle is faulty in that the hash often matches multiple
 filehandles."

"This patch uses CRC-32 to calculate the hash.
 We (EMC GNS) have tested this patch for the past two years and we have not
 found a single case where the hash matched more than one filehandle."

See Bug #4839: https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=4839


svn path=/trunk/; revision=33079
2010-06-04 00:45:37 +00:00
Jeff Morriss fa15217ece From Cal Turney via https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=4832 :
Add field 'nfs.ops.count' in the detail pane of NFSv4 calls and replies that
displays the number of operations in NFSv4 COMPOUND requests/replies.

From me: change the blurb wording a bit.

svn path=/trunk/; revision=33069
2010-06-03 02:23:36 +00:00
Jeff Morriss 6d1db36944 From Cal Turney via https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=4830 :
Display the fsid (filesystem ID) in decimal as well as hex in the "attributes"
section of the header in NFSv3/v4 replies.

svn path=/trunk/; revision=33068
2010-06-03 02:15:32 +00:00
Anders Broman 404e77beac From Ian Schorr:
NFS Dissector needs FH support for EMC Celerra.
https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=4813

svn path=/trunk/; revision=33027
2010-05-31 05:13:27 +00:00
Ronnie Sahlberg 56bd4cd88e Update the dissection of NFSv3 SETATTR Mode bits and dissect each
individual bit with a display filter name.


svn path=/trunk/; revision=32238
2010-03-18 23:04:31 +00:00
Bill Meier a8a673ef42 Fix some indentation.
svn path=/trunk/; revision=31875
2010-02-13 16:28:32 +00:00
Bill Meier 629a186c14 From Mike Sager: NFS: parse RECLAIM_COMPLETE op
See: https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=4469

svn path=/trunk/; revision=31874
2010-02-13 16:25:30 +00:00
Jaap Keuter a264038022 From Alex Burlyga:
Currently parsing of the Exchange_Id is technically correct but hard to read.
This patch updates display inline with data structures specified in RFC 5661.

svn path=/trunk/; revision=31805
2010-02-05 22:02:55 +00:00
Jaap Keuter 3d987f81c5 From Mike Sager:
Dynamically register callback dissector based on the NFSv4.0 SETCLIENTID args
(the equivalent of what had already been done for NFSv4.1 CREATE_SESSION).

Fix CB_LAYOUTRECALL dissecting: the recall type wasn't getting parsed, so some
of the layout recall info wasn't being displayed.

Parse CB_SEQUENCE's referring call lists.

svn path=/trunk/; revision=31804
2010-02-05 21:37:21 +00:00
Bill Meier 9b568ea691 Fix gcc -Wshadow warnings
svn path=/trunk/; revision=31561
2010-01-19 00:37:39 +00:00
Guy Harris 8e236e55de For fields of type FT_ABSOLUTE_TIME, have the "display" value be one of
ABSOLUTE_TIME_LOCAL or ABSOLUTE_TIME_UTC, indicating whether to display
the date/time in local time or UTC. (int)ABSOLUTE_TIME_LOCAL ==
(int)BASE_NONE, so there's no source or binary compatiblity issue,
although we might want to eliminate BASE_NONE at some point and have the
BASE_ values used with integral types start at 0, so that you can't
specify BASE_NONE for an integral field.

svn path=/trunk/; revision=31319
2009-12-19 03:17:44 +00:00
Anders Broman 88bb44a51e From Jakub Zawadzki:
Cleanup dissector code - use proper memory functions.
https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=4164

svn path=/trunk/; revision=30691
2009-10-25 11:43:30 +00:00
Bill Meier 94f28dd8f9 (FWIW) One step towards including stdio.h & stdlib.h only when req'd.
svn path=/trunk/; revision=29568
2009-08-26 19:27:49 +00:00
Gerald Combs bad647581b Initialize a variable and remove a check_col.
svn path=/trunk/; revision=29127
2009-07-16 22:24:31 +00:00
Stig Bjørlykke 4d8dd01e8e Changed flags_set_truth -> tfs_set_notset
svn path=/trunk/; revision=28989
2009-07-07 14:54:15 +00:00
Anders Broman 9952ce524f From Radek Vokál:
Support for new NFSv4 features.
https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=3258

svn path=/trunk/; revision=28919
2009-07-02 16:54:20 +00:00
Stig Bjørlykke b228488bc0 From Kovarththanan Rajaratnam via bug 3548:
(1) Trailing/leading spaces are removed from 'name's/'blurb's
(2) Duplicate 'blurb's are replaced with NULL
(3) Empty ("") 'blurb's are replaced with NULL
(4) BASE_NONE, NULL, 0x0 are used for 'display', 'strings' and 'bitmask' fields
    for FT_NONE, FT_BYTES, FT_IPv4, FT_IPv6, FT_ABSOLUTE_TIME, FT_RELATIVE_TIME,
    FT_PROTOCOL, FT_STRING and FT_STRINGZ field types
(5) Only allow non-zero value for 'display' if 'bitmask' is non-zero

svn path=/trunk/; revision=28770
2009-06-18 21:30:42 +00:00
Anders Broman b666a7942e More size_t casts.
svn path=/trunk/; revision=27887
2009-03-29 18:26:06 +00:00
Bill Meier a8f30cbca1 Fix some typos and spelling (mostly in text strings)
svn path=/trunk/; revision=27037
2008-12-17 17:23:37 +00:00
Uwe Girlich 1977b53d0c - Added support for little endian SVR4 NFS file handles (Solaris x86).
- Added support for the optional "flag" field in the SVR4 NFS file handle
  (checked with OpenSolaris, NFSv3 and NFSv4).

When the server file system is UFS, the SVR4 decoding works fine. ZFS still
needs some work.

I'm one of the "5 people or less in the world" (see checkin comment r18530),
who care about the inner structure of NFS file handles. I may even re-enable
the heuristics to determine the file handle type automatically, but the old
NETAPP heuristics was definitely much too weak.

svn path=/trunk/; revision=26871
2008-11-28 09:25:54 +00:00
Uwe Girlich c38eb2f027 Remove all the NFS "fhandle to name" related warnings.
svn path=/trunk/; revision=26852
2008-11-26 13:19:51 +00:00
Jaap Keuter 8b1a8faf1b From Alex:
NFSV4 parsing of the GETATTR reply is broken. I'm not sure what is going on,
but I re-wrote the GETATTR parsing anyways and my version of the parsing does not 
exibit the same problems.

svn path=/trunk/; revision=26304
2008-09-30 07:06:32 +00:00
Gerald Combs 6c8f59f916 Add a cast to try to fix compilation on Windows.
svn path=/trunk/; revision=26300
2008-09-30 02:55:13 +00:00
Ronnie Sahlberg 617dac4e04 there exists clients (linux) that sends a SETCLIENTID specifying the
callback address/port with only 2 octets (high/low port)  i.e. witout 
specifying the ip address.


this caused wireshark to corrupt memory when trying to 0-terminate the 
original string after the fourth '.'   which happened to be beyond the 
end of the string.



svn path=/trunk/; revision=26296
2008-09-29 21:06:12 +00:00
Ronnie Sahlberg e0e1c45922 in nfs name to filehandle mappings
when we check and ignore the two names "." and ".."
we must do so for both methods a caller can provide the name :
offset into a tvb, as well as a char* to a string.

also add ->full_name in the dissection to the replies  so that fh 
matches
both request and reply and not ->name



svn path=/trunk/; revision=25941
2008-08-06 06:45:44 +00:00
Anders Broman d0c26a3c21 From Alex <burlyga :
Better display of callback info for NFSv4 SETCLIENTID op

svn path=/trunk/; revision=25883
2008-07-31 09:32:03 +00:00
Jeff Morriss 6946f1878f From https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=2723
Tigran Mkrtchyan: decode and display fattr4_fs_layout_types.

Thijs Stuurman: Synchronize names used by wireshark with those used in
latest pnfs draft.

J. Bruce Fields: Use large default max_rpc_tcp_pdu_size setting
The linux server will do up to 1M these days, so the current default is
very likely to discard all reads and writes from such a server.
Thanks to Jim Rees for catching this.

Jeff Morriss: limit the max_rpc_tcp_pdu_size increase to 4M instead of the 16M
proposed.  Memory is cheap but still not unlimited.

svn path=/trunk/; revision=25769
2008-07-19 20:17:42 +00:00
Stig Bjørlykke 963ed71cfc From J. Bruce Fields (bug 2634):
The attached patches bring the wireshark code up to date with the latest
NFSv4.1 protocol drafts (in ietf last call now, so hopefully not too much more
of this will be required).

They also cover more of the protocol, and do some minor cleanup (e.g. remove
some operations which were really only used by one prototype implementation,
and never part of the protocol.)

A few ops and attributes are still missing.

svn path=/trunk/; revision=25727
2008-07-12 19:53:53 +00:00
Bill Meier b3aa52f573 Fix some of the Errors/warnings detected by checkapi.
svn path=/trunk/; revision=25307
2008-05-15 12:54:27 +00:00