Commit graph

200 commits

Author SHA1 Message Date
Ronnie Sahlberg
51f26ab49a NFS: We need to pass data through to the dissect_rpc_list() callback
Change-Id: Iace7c6dfb81f0a98bbae304346906a5e82c82812
Signed-off-by: Ronnie Sahlberg <ronniesahlberg@gmail.com>
Reviewed-on: https://code.wireshark.org/review/679
Reviewed-by: Evan Huus <eapache@gmail.com>
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2014-03-16 18:01:19 +00:00
Alexis La Goutte
296591399f Remove all $Id$ from top of file
(Using sed : sed -i '/^ \* \$Id\$/,+1 d')

Fix manually some typo (in export_object_dicom.c and crc16-plain.c)

Change-Id: I4c1ae68d1c4afeace8cb195b53c715cf9e1227a8
Reviewed-on: https://code.wireshark.org/review/497
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2014-03-04 14:27:33 +00:00
Bill Meier
4ddd7a637e Create/use extended value_strings; add editor modelines as needed.
Change-Id: I36ebee937ddd1c5ccbfa36f284a4794bc63631dc
Reviewed-on: https://code.wireshark.org/review/482
Reviewed-by: Bill Meier <wmeier@newsguy.com>
Tested-by: Bill Meier <wmeier@newsguy.com>
2014-03-03 21:15:13 +00:00
Evan Huus
f4ab2b2b00 Harden nfs_name_snoop_add_name against various malformed inputs. Thanks to Moshe
Kaplan for the report.

Fixes https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=9672 and some
other cases in the same vein.

svn path=/trunk/; revision=54875
2014-01-21 18:48:01 +00:00
Jakub Zawadzki
deb2b236f2 Add missing includes
svn path=/trunk/; revision=54332
2013-12-21 17:23:17 +00:00
Jakub Zawadzki
064082e68a Change G_GINT64_CONSTANT(xxxxU) to G_GUINT64_CONSTANT(xxxx)
svn path=/trunk/; revision=54314
2013-12-20 22:39:32 +00:00
Evan Huus
a6415ece0a Rename a couple of to_str functions to have ep_ in the name. This makes it
obvious that the returned string is ephemeral, and opens up the original names
in the API for versions that take a wmem pool (and thus can work in any scope).

svn path=/trunk/; revision=54249
2013-12-19 15:49:09 +00:00
Alexis La Goutte
1c85671ed2 From Niels de Vos via https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=9557
Add support for dissecting Gluster/NFS file handles

The nfs dissector has support for dissecting several types (depending on the NFS-server) of file-handles. GlusterFS/NFS can not be dissected yet

svn path=/trunk/; revision=54121
2013-12-15 16:16:38 +00:00
Jakub Zawadzki
715e2d6699 Fix [-Wmissing-prototypes]
svn path=/trunk/; revision=54095
2013-12-14 16:09:57 +00:00
Guy Harris
cbeaa89644 Handle NFS4_OP_ILLEGAL (and other potential array bounds errors).
svn path=/trunk/; revision=54058
2013-12-13 20:31:02 +00:00
Bill Meier
09d84f308d Create/use an extended value-string;
Localize some vars;
Remove some unneeded initializers;
Reformat some hf[] entries;
Reformat a long commenty for readability;
Break up some long lines;
Use consistent indentation;
Rework/add whitespace;
Fix inconsistent editor modelines.


svn path=/trunk/; revision=53990
2013-12-12 21:11:30 +00:00
Gerald Combs
640d152c45 Mark a parameter unused.
svn path=/trunk/; revision=53238
2013-11-10 17:51:00 +00:00
Michael Mann
fe52a15217 Have rpc_call_info_value be passed through to (sub)dissectors instead of using pinfo->private_data.
This was acheived by adding a void* data parameter to the dissect_function_t typedef in packet-rpc.h (r53213).  After converting the pinfo->private_data, I'm not sure if it would be better to change the void* data pointer to be a rpc_call_info_value* explicitly. Not all "dissector functions" use it, but it would certainly save a lot of casting...

svn path=/trunk/; revision=53232
2013-11-10 16:39:46 +00:00
Jakub Zawadzki
ae59b09443 Add missing includes in order to remove exceptions.h from proto.h (next commit).
svn path=/trunk/; revision=53230
2013-11-10 15:59:37 +00:00
Michael Mann
af0819f942 Add data parameter to dissect_function_t in vsff structure. The intention here is to use it to replace some pinfo->private_data.
I didn't realize how expansive this change would be, so committing it now before replacing the pinfo->private_data, so if something needs to be reverted, all of this is not lost.

svn path=/trunk/; revision=53213
2013-11-10 03:20:04 +00:00
Jakub Zawadzki
7b89063243 Don't include <epan/strutil.h> when not needed.
svn path=/trunk/; revision=53194
2013-11-09 14:58:28 +00:00
Alexis La Goutte
bb362a8059 From J. Bruce Fields via https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=9383
Incorrect FATTR4_SECURITY_LABEL value

We got this constant wrong.
See http://tools.ietf.org/html/draft-ietf-nfsv4-minorversion2-dot-x-19 and http://marc.info/?l=linux-nfs&m=138359828516861&w=2

svn path=/trunk/; revision=53086
2013-11-05 08:40:55 +00:00
Bill Meier
0ad98563a2 From didier gautheron: remove redundant or use faster col_xxx functions
- when the text parameter is constant col_add_str() and col_set_str() are equivalent but col_set_str() is faster.
- same for  replace col_append_fstr and col_append_str
- remove col_clear() when it's redundant:
    + before a col_set/col_add if the dissector can't throw an exception.
- replace col_append() after a col_clear() with faster col_add... or col_set

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


svn path=/trunk/; revision=52948
2013-10-29 14:09:20 +00:00
Bill Meier
9874da2fcb #if 0 numerous "unused const variables" (mostly value-string-arrays);
Also; fix a few "set but not used" warnings.

svn path=/trunk/; revision=52780
2013-10-23 06:29:11 +00:00
Michael Mann
cf80442912 Convert some proto_tree_add_string_format calls to something more appropriate.
There seem to be several cases of proto_tree_add_string_format where a "string" value/filter doesn't really make sense because it's always empty, and is just being used as a "filterable subtree header (placeholder)".  They appear to be more for "presense" than "value" and should probably be FT_NONE, although I'd almost argue for removing the filter in favor of  proto_tree_add_text.

svn path=/trunk/; revision=52296
2013-09-30 15:21:09 +00:00
Pascal Quantin
a0c53ffaa1 emem -> wmem conversion:
- ep_tvb_get_bits() -> wmem_packet_tvb_get_bits()
- tvb_g_memdup()/ep_tvb_memdup() -> tvb_memdup()
- tvb_fake_unicode()/tvb_get_ephemeral_faked_unicode() -> tvb_get_faked_unicode()
- tvb_get_g_string()/tvb_get_ephemeral_string()/tvb_get_seasonal_string() -> tvb_get_string()
- tvb_get_g_unicode_string()/tvb_get_ephemeral_unicode_string() -> tvb_get_unicode_string()
- tvb_get_ephemeral_string_enc() -> tvb_get_string_enc()
- update docs accordingly

svn path=/trunk/; revision=52172
2013-09-22 15:50:55 +00:00
Evan Huus
6df83e8078 Add _g_ to the names of functions that allocate glib memory. This is a bit more
explicit, and frees up the "generic" names (like tvb_memdup) for new signatures
that take the appropriate wmem pool.

Majority of the conversion done with sed.

svn path=/trunk/; revision=52164
2013-09-21 17:04:41 +00:00
Jeff Morriss
cc7a3cf06c Remove a bunch more set-but-no-longer-used variables.
svn path=/trunk/; revision=52100
2013-09-16 14:08:43 +00:00
Michael Mann
346f803d42 Convert proto_tree_add_uint_format to proto_tree_add_uint_format_value if hf_ field name is the first part of the formatted string. This was all manual inspection and most cases were either:
1. Case sensitivity differences between hf_ field name and formatted string.
2. Unnecessary whitespace between hf_ field name and colon in formatted string

There are cases where the hf_ field name doesn't quite match the proto_tree_add_uint_format, but it's close enough that one of them should be "right", I'm just not sure which is, I just know the string in proto_tree_add_uint_format is the one displayed.

svn path=/trunk/; revision=52098
2013-09-16 10:39:06 +00:00
Evan Huus
be2ebb1934 Remove unused variables, fix typos.
svn path=/trunk/; revision=52046
2013-09-15 02:26:20 +00:00
Michael Mann
b38ee917b1 Convert proto_tree_add_uint_format to proto_tree_add_uint_format_value if hf_ field name is the first part of the formatted string. This was done with a perl script on the dissectors directory (packet-*.c), followed by manual inspection of the output. The manual inspection yielded a few cases that really should have been proto_tree_add_uint or proto_tree_add_item, so I updated them accordingly.
The script didn't catch as many as I would have liked, but it's a start.

The most common (ab)use of proto_tree_add_uint_format was for appending strings to CRC/checksum values to note good or bad CRC/checksum.

svn path=/trunk/; revision=52045
2013-09-15 01:48:30 +00:00
Michael Mann
9e3f9b449f expert_add_info_format_text -> expert_add_info_format
svn path=/trunk/; revision=51852
2013-09-09 00:44:09 +00:00
Evan Huus
d11c7d5480 Always initialize the hash when dissecting nfsv3 file handle. Fixes the recent
valgrind fuzz failure.

svn path=/trunk/; revision=51746
2013-09-04 11:46:01 +00:00
Evan Huus
c0763b00bd More wmem.
svn path=/trunk/; revision=51619
2013-08-31 16:17:31 +00:00
Michael Mann
6880359a5f Batch of filterable expert infos.
svn path=/trunk/; revision=51486
2013-08-23 03:17:34 +00:00
Anders Broman
d312f171cd From Cal Turney:
Fix: If the FH length is not 32 or 40, the packet is decoded as "Unknown", a warning is displayed in Expert, and the rest of the packet is decoded. In addition, changed "Celerra" to "Celerra|VNX".

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

svn path=/trunk/; revision=50718
2013-07-18 04:40:03 +00:00
Jeff Morriss
58b3567ccb From Cal Turney via https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=8920 :
Changed FATTR4_DISSECT_VALUES arg to FATTR4_BITMAP_ONLY in calls to 
dissect_nfs4_fattrs() in cases NFS4_OP_OPEN and NFS4_OP_CREATE of
dissect_nfs4_response_op().

svn path=/trunk/; revision=50602
2013-07-15 04:00:20 +00:00
Bill Meier
8d5bbb4146 Define certain 'const char *...' arrays as static.
Reduces code memory usage and execution time.
(See SVN #50271)


svn path=/trunk/; revision=50292
2013-07-01 13:03:23 +00:00
Pascal Quantin
faecb6b9a8 Fix https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=8853 :
Add a missing subtree initialization

svn path=/trunk/; revision=50171
2013-06-26 16:23:54 +00:00
Evan Huus
eba26b89a4 From Niels de Vos via https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=8810
Use value_string array names_nfs4_operation_ext for nfs.main_opname, just like
nfs.opname does.

svn path=/trunk/; revision=49992
2013-06-17 22:41:43 +00:00
Michael Mann
ea177a2575 Batch of filterable expert infos
svn path=/trunk/; revision=49596
2013-05-27 17:30:43 +00:00
Alexis La Goutte
71f1f8b9d3 Fix indents (Use Spaces) Add Modelines
svn path=/trunk/; revision=49156
2013-05-04 08:12:25 +00:00
Evan Huus
c17893650c Silence a false-positive warning from older GCCs:
'acetype4' may be used uninitialized in this function

svn path=/trunk/; revision=49076
2013-04-27 15:00:52 +00:00
Evan Huus
132ee18259 From Cal Turney via https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=8605
Numerous improvements to NFS ACL/ACE dissection. For a complete list see
comment #11 of the bug.

From me:
- fix an infinite loop caught by fuzzing
- fix an out-of-bounds memory access caught by valgrind
- add missing {0,NULL} terminator to value_string array

svn path=/trunk/; revision=49074
2013-04-27 13:59:46 +00:00
Evan Huus
df0bbb4ffc Fix https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=8611
svn path=/trunk/; revision=49030
2013-04-25 13:57:02 +00:00
Evan Huus
e9f9ca4298 Fix format string typo causing
https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=8607

svn path=/trunk/; revision=49015
2013-04-24 14:05:30 +00:00
Alexis La Goutte
679decdac6 Fix warning: 'attr_mask_offset' may be used uninitialized in this function in Mac OS X
svn path=/trunk/; revision=48975
2013-04-22 18:29:34 +00:00
Alexis La Goutte
8a12090715 From Cal Turney via https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=8601 NFSv4 attribute and READDIR modifications
*  "dissect_nfs4_attribute()" was eliminated because the values dissection
   portion of that routine was identical to the "dissect_nfs_attributes()"
   routine.  The code in "dissect_nfs4_bitmap4()" and
   "dissect_nfs4_attrlist4()" was also similar so those routines
   were also eliminated and their code incorporated in dissect_nfs_fattr4s().
   These measures have reduced the size of 'packet-nfs.c' by almost 400 lines.

*  Attributes were relabeled according to RFC 5661 (NFS4v1).
    o “mand_attr” (REQUIRED attribute) header was changed to "reqd_attr”.
    o “recc_attr” (RECOMMENDED attributes) header was changed to “reco_attr”
      because "recommended" only has one ‘c’. =)

*  In order to be able to list the attribute names horizontally in the
   "Attr mask[x]" header (e.g., "Attr mask[0]: 0x0010111a (TYPE, CHANGE, SIZE,
   FSID, ACL, FILEID)", “FATTR4_” was removed from the attribute names
   (e.g., “FATTR4_TYPE (1)” is now “TYPE (1)”.  Note that RFC 5661 does not
   define them with a “FATTR4” prefix.

*  In GETATTR responses, the “resok4” and “obj_attributes” subtrees were
   eliminated because they are neither actual fields nor serve any practical
   purpose.

*  The READDIR "Directory Listing" subtree was reformatted. "Filename" was
   changed to "Entry" because entries can also be directories.
   "Value Follows", "cookie", and "Attr mask[n]" were moved within each entry.
   If an Entry header is left-clicked all the fields of that entry are
   highlighted in the Hex pane. If it is right-clicked the 'nfs.name'
   field (filter) can be obtained. Finally, the "attr_vals:<DATA>" (text)
   subtree was eliminated because it appears to serve no useful purpose and
   clutters the tree.

svn path=/trunk/; revision=48966
2013-04-22 17:31:15 +00:00
Evan Huus
c2c68fc2b9 s/mfs/nfs/
svn path=/trunk/; revision=48935
2013-04-19 18:19:05 +00:00
Evan Huus
7a173f9b0d From Cal Turney via https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=8581
Major NFS dissector cleanup. Consistent naming, spacing, line wrapping,
variable initialization, ...

For full details see comment #18 of the bug.

svn path=/trunk/; revision=48934
2013-04-19 18:16:50 +00:00
Evan Huus
2290bf6575 From J. Bruce Fields via https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=8584
Support for NFSv4.1 open access modes including delegation wants.

svn path=/trunk/; revision=48871
2013-04-16 02:03:01 +00:00
Evan Huus
cb4d9f982e Don't use seasonal memory for NFS file tracking tables (at least I think that's
what these are). It gets freed slightly before we need to access it in order to
correctly free other glib memory.

Discovered accidentally while valgrinding the capture from
https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=8584

svn path=/trunk/; revision=48870
2013-04-16 01:58:28 +00:00
Evan Huus
f7fbe1ccda From J. Bruce Fields via https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=8582
Fix a few misc. issues with NFS CB_SEQUENCE decoding.

svn path=/trunk/; revision=48868
2013-04-15 23:26:57 +00:00
Evan Huus
ddb1685c93 From J. Bruce Fields via https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=8580
Add support for the NFSv4.1 test_stateid operation.

svn path=/trunk/; revision=48849
2013-04-14 23:04:50 +00:00
Pascal Quantin
fc153bf23b From Cal Turney via https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=8576 :
Add ACE4_INHERITED_ACE flag and NFS4ERR_DELEG_REVOKED error code.
Replace NFS4ERR_NODEV error code by NFS4ERR_DQUOT error code.
See RFC 5661 for details.

svn path=/trunk/; revision=48825
2013-04-11 20:00:28 +00:00