Commit graph

225 commits

Author SHA1 Message Date
Michael Mann
64a7bac641 tvb_bytes_to_ep_str -> tvb_bytes_to_str
Change-Id: I79c613cbdd8dc939dd4c29ebc477fb6eefd5bfc4
Reviewed-on: https://code.wireshark.org/review/6371
Petri-Dish: Michael Mann <mmann78@netscape.net>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: Michael Mann <mmann78@netscape.net>
2015-01-07 18:16:23 +00:00
Martin Mathieson
7e8a4b0927 Deleting unnecessary #includes from dissectors.
Fourth batch (packet-mac-lte.c -> packet-rtp.c).

Will look at cleaning up and committing script afterwards.

Change-Id: Id921f07f4b274f0cfb77ce81abe4a285fdb8b644
Reviewed-on: https://code.wireshark.org/review/6023
Petri-Dish: Martin Mathieson <martin.r.mathieson@googlemail.com>
Reviewed-by: Martin Mathieson <martin.r.mathieson@googlemail.com>
2014-12-23 17:16:40 +00:00
Bill Meier
b5d7b7ab6e Cleanup use of #includes in non-generated epan/dissector/*.c
Specifically:
- Set packet.h to be the first wireshark #include after
   config.h and "system" #includes.
   packet.h added as an #include in some cases when missing.
- Remove some #includes included (directly/indirectly) in
   packet.h. E.g., glib.h.
   (Done only for those files including packet.h).
- As needed, move "system" #includes to be after config.h and
   before wireshark #includes.
- Rework various #include file specifications for consistency.
- Misc.

Change-Id: Ifaa1a14b50b69fbad38ea4838a49dfe595c54c95
Reviewed-on: https://code.wireshark.org/review/5923
Petri-Dish: Alexis La Goutte <alexis.lagoutte@gmail.com>
Reviewed-by: Bill Meier <wmeier@newsguy.com>
2014-12-21 05:46:22 +00:00
Bill Meier
64cb5104d6 Change ENC_NA to ENC_BIG_ENDIAN for all fetches of integral type fields.
Change-Id: Ia4f5735c61eedcbe8354eabd5da05d02e167f25e
Reviewed-on: https://code.wireshark.org/review/5734
Reviewed-by: Bill Meier <wmeier@newsguy.com>
2014-12-12 15:33:36 +00:00
Pascal Quantin
f64f7c6569 NFS: do not duplicate field name in blurb
Change-Id: I565823e2ba3c712506710f911e118cd48c895523
Reviewed-on: https://code.wireshark.org/review/5698
Reviewed-by: Pascal Quantin <pascal.quantin@gmail.com>
2014-12-10 06:42:42 +00:00
Bill Meier
c449b43a63 nfs: expert...() shouldn't be called under 'if(tree)'
Change-Id: I4f8c55ea4194d1246ea19368e0f5890ad1248f47
Reviewed-on: https://code.wireshark.org/review/5697
Reviewed-by: Bill Meier <wmeier@newsguy.com>
2014-12-10 04:51:14 +00:00
Tigran Mkrtchyan
dff05c9057 nfs: decode dCache NFS file handle
add support for dCache NFS/pNFS
project page: http://www.dcache.org

Bug: 10765
Change-Id: I24a88419ec070305e609d1b49b44994a464eb098
Signed-off-by: Tigran Mkrtchyan <tigran.mkrtchyan@desy.de>
Reviewed-on: https://code.wireshark.org/review/5236
Reviewed-by: Michael Mann <mmann78@netscape.net>
Petri-Dish: Michael Mann <mmann78@netscape.net>
Reviewed-by: Bill Meier <wmeier@newsguy.com>
2014-12-10 04:19:28 +00:00
J. Bruce Fields
8375a669f2 nfs: fix failure to parse EXCHANGE_ID arguments
The exchange_id spo_must_enforce/spo_must_allow bitmaps are exceeding
this arbitrary MAX_BITMAPS constant, causing EXCHANGE_ID parsing to
fail.

Even in the case of attributes we may need more than 4 words soon, even
if we don't I'm not sure if it's actually illegal to zero-pad them out
to something longer, and even if that is illegal I don't think it's
really helpful of wireshark to stop parsing.

Keep the constant just as a sanity check but make it really large.

Ping-Bug: 10649
Change-Id: I3dff3ebde2d7f74f8cbe60a92c853463da66ae6a
Reviewed-on: https://code.wireshark.org/review/5144
Reviewed-by: Evan Huus <eapache@gmail.com>
Reviewed-by: Michael Mann <mmann78@netscape.net>
2014-12-10 04:08:23 +00:00
Michael Mann
4f9af8608c Use proto_tree_add_bitmask for groups of proto_tree_add_boolean.
Part 2 of many

Change-Id: I50815e7738b011382392f3078a7107d3d9eec4ec
Reviewed-on: https://code.wireshark.org/review/5542
Reviewed-by: Michael Mann <mmann78@netscape.net>
Petri-Dish: Michael Mann <mmann78@netscape.net>
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2014-12-01 08:52:03 +00:00
J. Bruce Fields
28e19b6b23 nfs: parse full setclientid CLID_INUSE reply
Note there can be some extra data in the CLID_INUSE case.

(Future work: dissect_nfs_clientaddr4 could use some improvement.)

Ping-Bug: 10649
Change-Id: I92f34c6cc7a9328458f1e4391b04009f5e47290b
Reviewed-on: https://code.wireshark.org/review/5141
Reviewed-by: Bruce Fields <jbrucefields@gmail.com>
Reviewed-by: Michael Mann <mmann78@netscape.net>
2014-11-06 20:33:14 +00:00
J. Bruce Fields
d0c031ff19 nfs: clean up fh_expire_type dissection
This is a bit simpler and makes the field searchable.

Ping-Bug: 10649
Change-ID: I68386f987c419c0b6cbc181f29c6bce6c04fcfdb
Reviewed-on: https://code.wireshark.org/review/5145
Petri-Dish: Michael Mann <mmann78@netscape.net>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: Michael Mann <mmann78@netscape.net>
2014-11-06 03:05:26 +00:00
J. Bruce Fields
060cc68924 nfs: NFSv4.2 SEEK, ALLOCATE, DEALLOCATE support
NFSv4.2 is still a draft, but these three ops are implemented at least
for Linux now and are very unlikely to change any further.

Ping-Bug: 10649
Change-Id: Ia2917de59fb2b0ed7191c9f362b7eb60756d7634
Reviewed-on: https://code.wireshark.org/review/5143
Petri-Dish: Michael Mann <mmann78@netscape.net>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: Michael Mann <mmann78@netscape.net>
2014-11-06 01:38:31 +00:00
J. Bruce Fields
67c9ff0332 nfs: interpret aclsupport attribute
It's not an interesting attribute but I've occasionally been annoyed by
having to look it up just to verify a server isn't doing something nuts.

Ping-Bug: 10649
Change-Id: I660b62039075a4044946e590ee75ed5690290bc5
Reviewed-on: https://code.wireshark.org/review/5146
Reviewed-by: Michael Mann <mmann78@netscape.net>
2014-11-06 01:04:31 +00:00
J. Bruce Fields
5431032def nfs: label NFSv4 CREATE symlink arguments more helpfully
Currently it's hard to tell which field is the name of the symlink and
which is the target; both are labeled just "Name".

Ping-Bug: 10649
Change-Id: I1322a3652ffbcee920a6808dcc5613cefe8d8588
Reviewed-on: https://code.wireshark.org/review/5142
Reviewed-by: Michael Mann <mmann78@netscape.net>
2014-11-06 00:52:35 +00:00
J. Bruce Fields
ed7b9e6fa2 nfs: fix open result_flags
The protocol values here are all wrong, and miss new flags from rfc
5661.

Ping-Bug: 10649
Change-Id: I03fb2b521b415dbca5d4b77eda609eb8084da57c
Reviewed-on: https://code.wireshark.org/review/5140
Reviewed-by: Michael Mann <mmann78@netscape.net>
2014-11-06 00:47:26 +00:00
Michael Mann
5e4e17ca5e Remove unnecessary tvb_ensure_bytes_exist calls.
All of the calls removed are followed by proto_tree_add_xxx calls of the same offset/length of the tvb_ensure_bytes_exist call.  The proto_tree_add_xxx calls should throw the exception, so we don't need the "double check".
There are probably more calls that can be removed, these were just obvious as first glance, spurred mostly by noticing the (ab)use in packet-wsp.c

Change-Id: I37cee347c8cf8ab0559e21562c802d3b37f4871e
Reviewed-on: https://code.wireshark.org/review/4833
Petri-Dish: Michael Mann <mmann78@netscape.net>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: Alexis La Goutte <alexis.lagoutte@gmail.com>
2014-10-19 15:26:43 +00:00
Bill Meier
0299aa3521 packet-nfs.c: (trivial) Add dropped/missing newline; Adjust some whitespace.
Change-Id: I2ef3af42a712ced6917d94e1dcf708b3f34d7e82
Reviewed-on: https://code.wireshark.org/review/4431
Reviewed-by: Bill Meier <wmeier@newsguy.com>
2014-10-02 22:29:51 +00:00
Bill Meier
b14bf98c06 Fix spelling: cant-->can't, wont-->won't, etc
Change-Id: I4497f1b8b6eab0e576d9dd31b732965f9a6679c6
Reviewed-on: https://code.wireshark.org/review/4124
Reviewed-by: Bill Meier <wmeier@newsguy.com>
2014-09-16 13:51:51 +00:00
Bill Meier
cc286bad25 Various minor changes:
- Create/use some extended value_strings
- Remove unneeded #includes;
- Do whitespace changes;
- Add editor modelines.

Change-Id: I2e1ea37dddfd5e8656c90c0d45a6596c4912bb2c
Reviewed-on: https://code.wireshark.org/review/4065
Reviewed-by: Bill Meier <wmeier@newsguy.com>
2014-09-10 16:17:29 +00:00
Bill Meier
93cc6f004f Fix some spelling & grammar.
Change-Id: Iedeaa411caa0823922dd79c27897a2349d4e6907
Reviewed-on: https://code.wireshark.org/review/4054
Reviewed-by: Bill Meier <wmeier@newsguy.com>
2014-09-09 19:43:27 +00:00
Michael Mann
93517043e9 convert to proto_tree_add_subtree[_format]
Change-Id: Idd1b20ab32c0960ea52c6f3bc5346462c37c5684
Reviewed-on: https://code.wireshark.org/review/2853
Reviewed-by: Michael Mann <mmann78@netscape.net>
2014-07-04 16:46:14 +00:00
Evan Huus
7e970c32f4 wmemify some nfs functions, fixing much leaked memory
Bug: 10257
Change-Id: Ia36c03b2be727a37f91eca38af4faf48d1d65436
Reviewed-on: https://code.wireshark.org/review/2840
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2014-07-04 07:59:04 +00:00
Michael Mann
14824e6adf Revert "Fixup: tvb_* -> tvb_captured"
https://www.wireshark.org/lists/wireshark-dev/201406/msg00131.html

This reverts commit 246fe2ca4c.

Change-Id: Ib24bae0198c13a84bd7f731bf4af921212109a8f
Reviewed-on: https://code.wireshark.org/review/2430
Reviewed-by: Michael Mann <mmann78@netscape.net>
2014-06-19 18:25:59 +00:00
Dario Lombardo
246fe2ca4c Fixup: tvb_* -> tvb_captured
Change-Id: I9209c1271967405c34c1b6fa43e1726a4d3a5a3f
Reviewed-on: https://code.wireshark.org/review/2377
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2014-06-18 14:14:58 +00:00
Dario Lombardo
971ffd683e Fixup: tvb_get_string(z) -> tvb_get_string(z)_enc
Change-Id: I63a3704effe3fcab01a193dc39b6a22e9f1cf3fe
Reviewed-on: https://code.wireshark.org/review/2376
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2014-06-18 14:13:58 +00:00
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