Commit Graph

149 Commits

Author SHA1 Message Date
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
Bill Meier 3933d7591b Cast away a compile warning: "conversion from '__int64' to 'gulong', possible loss of data"
svn path=/trunk/; revision=44112
2012-07-29 19:00:46 +00:00
Bill Meier 7a22f13aa0 Fix crash when "file_name_snooping" & "file_full_name_snooping" prefs enabled.
Crash due to a g_snprintf() incorrect (too large) "max number of bytes" parameter.

Note that g_snprintf() apparently writes to (initializes ?) bytes beyond the
 actual string written.

Fixes Bug #7948: (To be confirmed by the user)
See: https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=7498


svn path=/trunk/; revision=44111
2012-07-29 18:17:17 +00:00
Jeff Morriss 217514e565 Remove a couple set-but-unused variables. I *think* the new tree isn't
particularly useful...

svn path=/trunk/; revision=43577
2012-07-05 23:31:17 +00:00
Jakub Zawadzki c7dbc44bf3 Fix bug #7436
offset returned from dissect_nfs_open_claim4, dissect_nfs_openflag4 were different
when we were building tree and where we didn't.
Fix other similar cases.

svn path=/trunk/; revision=43576
2012-07-05 21:09:34 +00:00
Jakub Zawadzki bf81b42e1e Update Free Software Foundation address.
(COPYING will be updated in next commit)

svn path=/trunk/; revision=43536
2012-06-28 22:56:06 +00:00
Alexis La Goutte 566b6e021b Try to fix some Logic error (Function call argument is an uninitialized value ) Warning found by Clang
svn path=/trunk/; revision=42365
2012-04-30 21:54:45 +00:00
Jakub Zawadzki 8ab67b185e Like r42302 but in other place.
Followup to r42283: the loop which allocates operation summaries may not run
to completion, so don't try to free all the operation summaries.

svn path=/trunk/; revision=42303
2012-04-27 20:49:15 +00:00
Jeff Morriss a8a5721d47 Fix fuzz failure reported in
https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=7209 :

Followup to r42283: the loop which allocates operation summaries may not run
to completion, so don't try to free all the operation summaries.

svn path=/trunk/; revision=42302
2012-04-27 20:43:22 +00:00
Anders Broman 9e506104ed From Evan Huus:
Memory leak in NFS Dissector

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

svn path=/trunk/; revision=42283
2012-04-27 08:24:02 +00:00
Jakub Zawadzki 8a1dc57c03 Remove doubled semicolons and semicolons outside function.
svn path=/trunk/; revision=42053
2012-04-13 20:22:31 +00:00
Jakub Zawadzki 23494db817 Add missing const attribute to some char *
Fix some "assignment discards qualifiers from pointer target type", etc

svn path=/trunk/; revision=41996
2012-04-09 18:44:10 +00:00
Jeff Morriss 17ce01b48d From Weston Andros Adamson via https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=7010 :
While developing SP4_MACH_CRED support for the linux nfs client, I noticed that
wireshark was displaying these bitmasks incorrectly (as fattrs instead of NFS
operations).

I also noticed that BACKCHANNEL_CTL (a required value in the mask for
SP4_MACH_CRED) wasn't in names_nfsv4_operation[], so I added it and verified
that we're not missing any other ops.

svn path=/trunk/; revision=41851
2012-03-30 17:50:08 +00:00
Bill Meier 2df5dc3d53 From Reinhard Speyerer: Fix several misspellings/typos in Wireshark
https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=6967

svn path=/trunk/; revision=41645
2012-03-18 22:24:24 +00:00
Jeff Morriss 3d98787379 From Weston Andros Adamson via https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=6919 :
Both deviceid4 and sessionid4 are currently decoded as rpc_opaque_data - this
means their values are never displayed in the "Packet Detail" section and to
see them you have to select the name in the "Packet Detail" section and look at
the byte range in the "Packet Bytes" section.

The attached patch (against today's SVN) adds dissectors for both so these
values are displayed in the "Packet Detail" section.

svn path=/trunk/; revision=41417
2012-03-08 03:57:48 +00:00
Chris Maynard 5debb5c5e3 Fix memory leaks involving tvb_get_string[z]().
svn path=/trunk/; revision=40312
2011-12-28 16:36:57 +00:00
Bill Meier 6c809fc444 In certain cases, don't reference a tvb when displaying a hidden,generated field.
svn path=/trunk/; revision=40208
2011-12-15 16:01:25 +00:00
Bill Meier 13f09ee27f Fix a tvb memory leak;
Essentially: generate tvbuffs as needed; don't save them for later reuse
               with the result they are never freed.

Also:
- move a struct from packet-nfs.h to packet-nfs.c since it's only used locally;
- reformat some long lines.

svn path=/trunk/; revision=40205
2011-12-14 22:01:38 +00:00
Chris Maynard 91398db56b Append each op name to the operations sub-tree so you don't necessarily have to expand the tree to see which ops are present. I think it makes more sense to append the names here rather than at the top level which was done to resolve bug 6078, but for now, I leave them appended in both places.
svn path=/trunk/; revision=39837
2011-11-14 20:38:05 +00:00
Chris Maynard 23193d4747 In the unlikely case that there are no ops, don't append anything. Also, comma-separate them.
svn path=/trunk/; revision=39770
2011-11-08 23:08:12 +00:00
Jeff Morriss f5e838b602 Remove comma at the end of several enumerator lists.
svn path=/trunk/; revision=39700
2011-11-01 01:23:10 +00:00
Alexis La Goutte ece3e6d974 Fix Dead Store (Dead assignement/Dead increment) Warning found by Clang
svn path=/trunk/; revision=39651
2011-10-28 11:20:19 +00:00
Bill Meier 20e3e0b5b5 Fix some proto_tree_add_item() encoding args;
In some files:
 Remove a few unneeded #includes;
 Do some whitespace/indentation cleanup

svn path=/trunk/; revision=39635
2011-10-27 15:59:12 +00:00
Bill Meier 54b72021bb Fix encoding arg for various fcn calls:
- proto_tree_add_bits_item
 - proto_tree_add_bits_ret_val
 - proto_tree_add_bitmask
 - tvb_get_bits
 - tvb_get_bits16
 - tvb_get_bits24
 - tvb_get_bits32
 - tvb_get_bits64


svn path=/trunk/; revision=39539
2011-10-24 19:57:53 +00:00
Bill Meier 4e57694d4a Convert 'encoding' parameter of certain proto_tree_add_item() calls in non-autogenerated epan/dissectors:
Specifically:  Replace FALSE|0 and TRUE|1 by ENC_BIG_ENDIAN|ENC_LITTLE_ENDIAN as
 the encoding parameter for proto_tree_add_item() calls which directly reference
 an item in hf[] which has a type of:
    FT_UINT8
    FT_UINT16
    FT_UINT24
    FT_UINT32
    FT_UINT64
    FT_INT8
    FT_INT16
    FT_INT24
    FT_INT32
    FT_INT64
    FT_FLOAT
    FT_DOUBLE


svn path=/trunk/; revision=39288
2011-10-06 03:35:44 +00:00
Bill Meier 94f36ca4ff Use ENC_NA as encoding for proto_tree_add_item() calls which directly reference an hf item (in hf[] with types:
FT_NONE
   FT_BYTES
   FT_IPV6
   FT_IPXNET
   FT_OID

Note: Encoding field set to ENC_NA only if the field was previously TRUE|FALSE|ENC_LITTLE_ENDIAN|ENC_BIG_ENDIAN

svn path=/trunk/; revision=39260
2011-10-04 22:44:31 +00:00
Stig Bjørlykke 5359494b1f Second try to move crc routines to libwsutil.
This time keep the tvb routines in epan.

Now we can use common crc routines outside epan.

svn path=/trunk/; revision=38810
2011-08-31 09:00:54 +00:00
Stig Bjørlykke 71f903b956 Revert r38800, as the crc routines contains some tvb functions.
svn path=/trunk/; revision=38803
2011-08-30 14:17:40 +00:00
Stig Bjørlykke 4132d40e50 Move all crc routines to libwsutil.
This way we can use the crc routines in wiretap.

svn path=/trunk/; revision=38800
2011-08-30 13:46:42 +00:00
Anders Broman 4b85603c80 From Jeremy Jones:
Add support for decoding NFSv4.1 OP_BIND_CONN_TO_SESSION.
https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=6182

svn path=/trunk/; revision=38306
2011-08-02 05:18:58 +00:00
Bill Meier b17543e2c0 Fix gcc 4.6 "set but not used [-Wunused-but-set-variable]" warnings.
svn path=/trunk/; revision=38049
2011-07-15 19:07:25 +00:00