Commit Graph

115 Commits

Author SHA1 Message Date
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
Stig Bjørlykke b091b8d26c Rewrote to use g_strlcpy and g_strlcat.
svn path=/trunk/; revision=24525
2008-03-01 17:23:39 +00:00
Stig Bjørlykke 677eb18d20 Rewrote some prohibited APIs in epan/dissectors/ (sprintf, strcpy, strcat).
If we get some truncated strings we probably overwrote some buffers...

svn path=/trunk/; revision=24249
2008-02-02 17:25:40 +00:00
Jaap Keuter 38f3dff73b From Alex Burlyga:
When parsing nfsv4 GETATTR reply in attribute fs_location wireshark displays incorrect content for the attribute value. It looks like instead of parsing as rpc arrays, value gets parsed as 
rpc linked list. This patch which fixes the problem
I also noticed that FATTR4_MOUNTED_ON_FILEID attribute is not getting parsed, so I added parsing for that as well.

svn path=/trunk/; revision=23917
2007-12-18 22:41:25 +00:00
Jaap Keuter 054ed14e67 Header field array and whitespace cleanup.
svn path=/trunk/; revision=23588
2007-11-25 19:20:32 +00:00
Stig Bjørlykke 0cb8d7e554 From Alex Burlyga:
It looks like in dissect_nfs_open_claim_delegate_cur4() instead of dissection
stateid we are doing something wierd and dissecting uint64 instead(remnants of 
rfc3010 where stateid was 64 bit number?). We already have function for
dissecting stateids, so just a matter of making a different call. 

From me:
Also deleted the hf_nfs_stateid4_delegate_stateid entry.

svn path=/trunk/; revision=23571
2007-11-24 22:45:57 +00:00
Stig Bjørlykke 6c090a68bf From J. Bruce Fields:
Add basic support for NFSv4.1, as of about draft 13 of the current spec.
The protocol is not completely finished yet, and future patches will be
needed to bring it up to date.

From me:
- Add a check for valid pointers in nfsv4_operation_ett
- Always increase offset when calling dissect_nfs_devices4
- Added a default case in dissect_rpc_secparms4

svn path=/trunk/; revision=23570
2007-11-24 22:09:01 +00:00
Anders Broman 94859ac29b Apply yet another set of the optimization patches:
if tree is not NULL then proto_xxx_add_yyy functions can't return NULL.
Remove always true tests.

svn path=/trunk/; revision=23404
2007-11-08 22:39:01 +00:00
Stig Bjørlykke 37dc09ec79 Use given length when decoding fhandles as unknown.
svn path=/trunk/; revision=23051
2007-10-02 16:46:49 +00:00
Ronnie Sahlberg 622f19843c start prettifying nfsv4
svn path=/trunk/; revision=22791
2007-09-05 00:29:31 +00:00
Ronnie Sahlberg 4f9c68984e make hf_nfs_nfsstat externaly visible so other dissectors can use nfs
status codes


svn path=/trunk/; revision=22123
2007-06-18 00:01:24 +00:00
Ronnie Sahlberg ab740c7f6d add some missing error codes
svn path=/trunk/; revision=22118
2007-06-17 17:39:30 +00:00
Guy Harris e5f3d4af31 Better hash function for file handles, as suggested by Brent Callaghan
(the old one was mapping file handles that differed only by one bit to
the same hash value; the new one mapped them to different hash values).

svn path=/trunk/; revision=22065
2007-06-08 02:45:30 +00:00
Guy Harris 5a43799a17 Use G_GINT64_MODIFIER, rather than the PRI[douxX]64 macros, for GLib
routines and routines using those routines.  GLib might use different
modifiers for 64-bit quantities than the platform's C library does.

svn path=/trunk/; revision=21990
2007-05-29 18:52:42 +00:00
Guy Harris b98d651b21 In calls to the emem_tree routines, forcibly align items not known to be
aligned on 32-bit boundaries.

svn path=/trunk/; revision=21611
2007-04-28 21:09:20 +00:00
Ulf Lamping 7994794ad9 fix a lot more warnings
svn path=/trunk/; revision=21142
2007-03-23 01:29:52 +00:00
Jaap Keuter b536022566 From J. Bruce Fields:
Fix an obvious error in the nfs4 stateid parsing.  The stateid is used in a number of common operations (such as open and setattr), so this caused a lot of misparsing.

svn path=/trunk/; revision=20700
2007-02-03 20:31:40 +00:00
Ronnie Sahlberg d8c269be98 From Alex B
Added support for upcoming Netapp's ONTAP-GX nfsv3 filehandle.

Alex.




svn path=/trunk/; revision=19875
2006-11-10 23:36:57 +00:00
Ronnie Sahlberg 6fee9a41f0 From Alex Burlyga
This patch adds support for dissecting ontap's nfsv4 filehandle,
as well as some updates to nfsv3 filehandle as well in the nfs
dissector.

Alex.


checked in with minor changes


svn path=/trunk/; revision=19345
2006-09-28 07:52:46 +00:00
Ronnie Sahlberg 8ce8e719e0 rename some structures and defines from the se_tree to the emem_tree prefix
svn path=/trunk/; revision=18894
2006-08-14 08:29:29 +00:00
Gerald Combs 1f8334d9e9 Two more bugs from Ilja van Sprundel.
packet-ndmp.c:
  Fix our payload length check.

packet-nfs.c:
  Check for a maximum bitmap length.

Fix up whitespace.

svn path=/trunk/; revision=18699
2006-07-10 19:54:41 +00:00
Ronnie Sahlberg 332df10d7e coverity warning 177 deadcode
replace overly convoluted code with much simpler code.

stateid is a simple 16 byte structure and there is no need to make it more complex than it is.



svn path=/trunk/; revision=18555
2006-06-23 09:02:54 +00:00
Ronnie Sahlberg f27bb044dd two things have irritated me immensly with nfs filehandles
1, (minor) the heuristics are too weak and everyting is always decoded either as netapp filehandles or one of the others   even when just capturing ibetween say two classic unix boxens
2, (major) you can not filter on specific subfields of the filehandle


observation: 5 people or less in the world care about implementation specific storage of data inside an opaque blob.


remove the too weak heuristics for nfs filehandles.
make decoding of filehandles accorrding to specific implementations controlled by a preference setting.
default this setting to "unknown"

display unknown filehandles using proto_tree_add_item()  FT_BYTES/BASE_HEX to make it fitlerable instead of a useless proto_tree_add_text()


wiki needs to be updated tomorrow


svn path=/trunk/; revision=18530
2006-06-21 09:45:50 +00:00
Ronnie Sahlberg feab79e328 change a whole bunch of ethereal into wireshark
svn path=/trunk/; revision=18196
2006-05-21 04:49:01 +00:00
Ronnie Sahlberg 2376539aab the hash,name,fullname of an nfs filehandle are all
generated items

mark them as generated items in the dissect pane


svn path=/trunk/; revision=17785
2006-04-02 23:24:00 +00:00
Ronnie Sahlberg d9227587f0 prettify dissection of nfsv3 fattr3 structure
put useful info like type,mode,uid,gid on the expansion lines so we dont have to open the expansion to see these values.

allow it to push this info multiple expansion lines upward
and optionally (such as for GETATTR replies) put this info in the info column as well




svn path=/trunk/; revision=17783
2006-04-02 21:04:11 +00:00
Ronnie Sahlberg 329b915b66 coverity bug 139
actually allow dissection of RELEASE_LOCKOWNER call
instead of letting it hang as dead code



svn path=/trunk/; revision=17626
2006-03-14 08:11:18 +00:00
Ronnie Sahlberg 27de4cfd39 give se_trees names so that it is easier to debug and to log how often certain trees are accessed
svn path=/trunk/; revision=17587
2006-03-11 13:02:41 +00:00
Ronnie Sahlberg b4c4d56509 remove some harmless but redundant code
coverity  cid 31


svn path=/trunk/; revision=17516
2006-03-08 08:35:13 +00:00
Ronnie Sahlberg 07c2845fe7 get rid of another slow hashtable and one global variable and
replace it with a better and memleak free se_tree



svn path=/trunk/; revision=17480
2006-03-06 14:30:34 +00:00
Ronnie Sahlberg 51f8a228f6 replace one hashtable storing filehandles with a new se tree
this should make it quite a bit faster than before.



svn path=/trunk/; revision=17479
2006-03-06 13:45:30 +00:00
Ronnie Sahlberg 4caa47a1ac replace a g_malloc()/g_free() pair with ep_alloc() instead
svn path=/trunk/; revision=17478
2006-03-06 10:39:31 +00:00
Ronnie Sahlberg 745994c364 add helper to build (red/black) trees from a key that is a vector of guin32 arrays.
test this functionality by calling these vector insert/lookup tree functions from the nfs dissector for when filehandles are used as a key.

these vector functions could also be used to efficiently store conversations :
se_tree_key_t[6] = {
	{ addr_len/4,   &src_addr },
	{ addr_len/4,	&dst_addr },
	{ 1,		&src_port32 },
	{ 1,		&dst_port32 },
	{ 1,		&protocol32 },
	{ 0, NULL }
}


(the nfs dissector needs a LOT of work. It is very painful to work with 
very large nfs traces with all the memory it wastes (and eats) as well as how slow all the tables make it)



svn path=/trunk/; revision=17477
2006-03-06 10:25:19 +00:00
Jörg Mayer f9a57f08d1 Bill Meier:
Spelling fixes.

svn path=/trunk/; revision=16956
2006-01-05 13:01:08 +00:00
Ronnie Sahlberg b0cdcf40ab get rid of the last two strcpy from epan/dissectors
svn path=/trunk/; revision=16342
2005-10-27 10:11:22 +00:00
Ronnie Sahlberg 05dbe84db8 gmemchunk -> se_alloc() improvements
svn path=/trunk/; revision=15326
2005-08-12 23:57:01 +00:00
Jörg Mayer 54861853a8 More char -> const char warning fixes
svn path=/trunk/; revision=15155
2005-07-30 07:13:27 +00:00
Ronnie Sahlberg 6aaaedd633 we no longer need to g_free() teh string returned by dissect_rpc_string.
when checking the calls in packet-ndmp.c  we must have had a memleak there since it never freed those strings.



svn path=/trunk/; revision=15005
2005-07-23 00:22:02 +00:00
Guy Harris a42c4bc656 Have separate fields for NFSv2, NFSv3, and NFSv4 return statuses, using
the names in the v2, v3, and v4 specs for values, so that they display
correctly and can be filtered on correctly.

Have "nfs.status" as a hidden field, with a name table giving just "OK"
and "ERR_" values, and having items for v2, v3, and v4 status values
(the only collision is that the v3 JUKEBOX error is the v4 DELAY error),
so that filters on "nfs.status" will still work, but will now be able to
filter symbolically on values from v2, v3, and v4.

Show 33 status values in the Info column and the summary entry using the
table of v3 status values and names, not the table of v2 status values
and names.

Fix some v3 dissectors to use the v3 return status field rather than the
v2 return status field.

svn path=/trunk/; revision=14831
2005-07-02 08:18:17 +00:00
Guy Harris ab797734dd Get rid of the private "my_match_strval()" routine in many dissectors;
add a "match_strval_idx()" routine that does the same thing, and have
"match_strval()" call it.

Make those routines, and "val_to_str()", return a "const" pointer. 
Update dissectors as necessary to squelch compiler warnings produced by
that.

Use "val_to_str()" rather than using "match_strval()" and then, if the
result is null, substituting a specific string.  Clean up some other
"match_strval()"/"val_to_str()" usages.

Add a null pointer check in the NDPS dissector's "attribute_value()"
routine, as it's not clear that "global_attribute_name" won't be null at
that point.

Make some global variables in the AFS4INT dissector local.

Make some routines not used outside the module they're in static.

Make some tables "static const".

Clean up white space.

Fix Gerald's address in some files.

svn path=/trunk/; revision=14786
2005-06-26 19:56:52 +00:00
Ronnie Sahlberg 1d2c39cc60 make file name snooping use information from READDIRPLUS replies when building the filehandle to name mapping
svn path=/trunk/; revision=14074
2005-04-14 06:45:32 +00:00
Ulf Lamping 78ff68d4b5 a lot of warnings removed, most of them about pointer to int casts without using the appropriate GLib macros
svn path=/trunk/; revision=12832
2004-12-25 13:49:30 +00:00
Guy Harris bbe7f89742 Move prefs.c and prefs.h into the epan subdirectory.
svn path=/trunk/; revision=12115
2004-09-27 22:55:15 +00:00
Guy Harris c68f62210f Add "tvb_get_ntoh64()" and "tvb_get_letoh64()" routines to fetch 64-bit
integers.

Make FT_INT64 and FT_UINT64 add numerical values, rather than byte-array
values, to the protocol tree, and add routines to add specified 64-bit
integer values to the protocol tree.

Use those routines in the RSVP dissector.

svn path=/trunk/; revision=11796
2004-08-22 00:31:58 +00:00
Gilbert Ramirez 669db206cb Move dissectors to epan/dissectors directory.
Also move ncp222.py, x11-fields, process-x11-fields.pl,
make-reg-dotc, and make-reg-dotc.py.

Adjust #include lines in files that include packet-*.h
files.

svn path=/trunk/; revision=11410
2004-07-18 18:06:47 +00:00