Commit Graph

179 Commits

Author SHA1 Message Date
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
Pascal Quantin 77a71eb936 From Cal Turney via https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=8575 :
Fix description of ACE4_APPEND_DATA

svn path=/trunk/; revision=48814
2013-04-11 08:41:28 +00:00
Evan Huus a0d107beec Remove decode_enumerated_bitfield and decode_enumerated_bitfield_shifted.
Effectively inline the only remain call (and replace a static buffer with ep
memory). Much of the NFS dissector needs to be converted to use named fields
at which point this code can go away, but that's a much bigger job.

Also, add modelines to packet-nfs.c and mark some internal value_string
functions as WS_DLL_LOCAL.

svn path=/trunk/; revision=48635
2013-03-29 02:34:23 +00:00
Pascal Quantin 85048f5a96 From Ed Beroset via https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=8416 :
Remove C++ incompatibilities from packet-nfs.c

svn path=/trunk/; revision=48172
2013-03-07 18:09:23 +00:00
Bill Meier 96a24cc79f Fix spelling/typos found using a list of commonly misspelled words.
The misspellings were mostly in comments but some were
in text strings visible to the user.


svn path=/trunk/; revision=47899
2013-02-26 04:42:26 +00:00
Bill Meier d3a7f4b817 Use '#if 0 ... #endif' rather than /** ... **/ to comment out
unused hf[] entries (which I should have done in the first place).

svn path=/trunk/; revision=47390
2013-01-31 18:31:28 +00:00
Bill Meier 329f6e8cc0 Initialize some hf_... vars to -1;
(Reduces the number of checkhf false positives)

svn path=/trunk/; revision=47310
2013-01-26 21:42:36 +00:00
Bill Meier 0960e508e4 Comment out cases of unused hf array entries found by checkhf.
svn path=/trunk/; revision=47302
2013-01-26 18:54:53 +00:00
Guy Harris 8ed7a73e22 Fix a bunch of warnings.
Cast away some implicit 64-bit-to-32-bit conversion errors due to use of
sizeof.

Cast away some implicit 64-bit-to-32-bit conversion errors due to use of
strtol() and strtoul().

Change some data types to avoid those implicit conversion warnings.

When assigning a constant to a float, make sure the constant isn't a
double, by appending "f" to the constant.

Constify a bunch of variables, parameters, and return values to
eliminate warnings due to strings being given const qualifiers.  Cast
away those warnings in some cases where an API we don't control forces
us to do so.

Enable a bunch of additional warnings by default.  Note why at least
some of the other warnings aren't enabled.

randpkt.c and text2pcap.c are used to build programs, so they don't need
to be in EXTRA_DIST.

If the user specifies --enable-warnings-as-errors, add -Werror *even if
the user specified --enable-extra-gcc-flags; assume they know what
they're doing and are willing to have the compile fail due to the extra
GCC warnings being treated as errors.

svn path=/trunk/; revision=46748
2012-12-26 05:57:06 +00:00
Pascal Quantin 4ffc5d699b From J. Bruce Fields via https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=8103 :
Add parsing of free_stateid, why_no_delegation, backchannel_ctl, secinfo_no_name and destroy_session fields to NFSv4.1 dissector

svn path=/trunk/; revision=46596
2012-12-18 20:58:01 +00:00
Alexis La Goutte 4c58eabc9a Remove unused ett_nfs_security_label variable
svn path=/trunk/; revision=46560
2012-12-16 15:34:13 +00:00
Alexis La Goutte baf4a0ed5a From Steve Dickson via https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=8081
Added the Labled NFS protocol dissector for NFS v4.1

Signed-off-by: Steve Dickson <steved@redhat.com>

svn path=/trunk/; revision=46505
2012-12-11 23:23:20 +00:00
Jeff Morriss 0266cceef3 Make all enum_val_t's const.
svn path=/trunk/; revision=46292
2012-11-29 20:15:37 +00:00
Michael Mann 99d0404b73 replaced decode_enumerated_bitfield calls with itemized filters
svn path=/trunk/; revision=45176
2012-09-27 16:49:31 +00:00
Guy Harris 9636d1655d Put the individual property flags under the properties item, rather than
at the top level.

svn path=/trunk/; revision=45159
2012-09-26 20:43:58 +00:00
Michael Mann 97c808c75c replaced decode_boolean_bitfield calls with itemized filters
svn path=/trunk/; revision=45152
2012-09-26 18:10:29 +00:00
Jeff Morriss 2552c750e5 We always HAVE_CONFIG_H so don't bother checking whether we have it or not.
svn path=/trunk/; revision=45017
2012-09-20 02:03:38 +00:00
Michael Mann fd6b314416 parse nfsv4.1 SEQUENCE status flags (https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=7726)
svn path=/trunk/; revision=44970
2012-09-18 14:12:17 +00:00
Michael Mann 5dd7371960 more ephemeral memory cleanup
svn path=/trunk/; revision=44496
2012-08-14 17:58:41 +00:00
Bill Meier 2479be037f Use consistent indentation.
svn path=/trunk/; revision=44122
2012-07-29 21:59:25 +00:00
Bill Meier c68e50e0e8 g_assert --> DISSECTOR_ASSERT
svn path=/trunk/; revision=44117
2012-07-29 20:19:38 +00:00
Bill Meier 4e1bad0218 Fix a typo :(
svn path=/trunk/; revision=44113
2012-07-29 19:05:18 +00:00