aboutsummaryrefslogtreecommitdiffstats
path: root/epan/dissectors/packet-nfs.c
AgeCommit message (Collapse)AuthorFilesLines
2015-03-30Eliminate proto_tree_add_text from packet-nfs.cMichael Mann1-814/+516
Various other cleanup while in the neighborhood. Change-Id: I9d8322fd8fb867ad5569db9f781a33825ca34d1b Reviewed-on: https://code.wireshark.org/review/7834 Reviewed-by: Michael Mann <mmann78@netscape.net> Petri-Dish: Michael Mann <mmann78@netscape.net> Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org> Reviewed-by: Anders Broman <a.broman58@gmail.com>
2015-01-07tvb_bytes_to_ep_str -> tvb_bytes_to_strMichael Mann1-2/+2
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>
2014-12-23Deleting unnecessary #includes from dissectors.Martin Mathieson1-2/+0
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-21Cleanup use of #includes in non-generated epan/dissector/*.cBill Meier1-7/+6
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-12Change ENC_NA to ENC_BIG_ENDIAN for all fetches of integral type fields.Bill Meier1-3/+3
Change-Id: Ia4f5735c61eedcbe8354eabd5da05d02e167f25e Reviewed-on: https://code.wireshark.org/review/5734 Reviewed-by: Bill Meier <wmeier@newsguy.com>
2014-12-10NFS: do not duplicate field name in blurbPascal Quantin1-3/+3
Change-Id: I565823e2ba3c712506710f911e118cd48c895523 Reviewed-on: https://code.wireshark.org/review/5698 Reviewed-by: Pascal Quantin <pascal.quantin@gmail.com>
2014-12-10nfs: expert...() shouldn't be called under 'if(tree)'Bill Meier1-3/+7
Change-Id: I4f8c55ea4194d1246ea19368e0f5890ad1248f47 Reviewed-on: https://code.wireshark.org/review/5697 Reviewed-by: Bill Meier <wmeier@newsguy.com>
2014-12-10nfs: decode dCache NFS file handleTigran Mkrtchyan1-1/+70
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-10nfs: fix failure to parse EXCHANGE_ID argumentsJ. Bruce Fields1-8/+7
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-01Use proto_tree_add_bitmask for groups of proto_tree_add_boolean.Michael Mann1-51/+32
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-11-06nfs: parse full setclientid CLID_INUSE replyJ. Bruce Fields1-11/+19
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-06nfs: clean up fh_expire_type dissectionJ. Bruce Fields1-52/+44
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-06nfs: NFSv4.2 SEEK, ALLOCATE, DEALLOCATE supportJ. Bruce Fields1-12/+98
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-06nfs: interpret aclsupport attributeJ. Bruce Fields1-1/+46
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-06nfs: label NFSv4 CREATE symlink arguments more helpfullyJ. Bruce Fields1-1/+1
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-06nfs: fix open result_flagsJ. Bruce Fields1-27/+36
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-10-19Remove unnecessary tvb_ensure_bytes_exist calls.Michael Mann1-1/+0
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-02packet-nfs.c: (trivial) Add dropped/missing newline; Adjust some whitespace.Bill Meier1-169/+170
Change-Id: I2ef3af42a712ced6917d94e1dcf708b3f34d7e82 Reviewed-on: https://code.wireshark.org/review/4431 Reviewed-by: Bill Meier <wmeier@newsguy.com>
2014-09-16Fix spelling: cant-->can't, wont-->won't, etcBill Meier1-1/+1
Change-Id: I4497f1b8b6eab0e576d9dd31b732965f9a6679c6 Reviewed-on: https://code.wireshark.org/review/4124 Reviewed-by: Bill Meier <wmeier@newsguy.com>
2014-09-10Various minor changes:Bill Meier1-9/+9
- 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-09Fix some spelling & grammar.Bill Meier1-1/+1
Change-Id: Iedeaa411caa0823922dd79c27897a2349d4e6907 Reviewed-on: https://code.wireshark.org/review/4054 Reviewed-by: Bill Meier <wmeier@newsguy.com>
2014-07-04convert to proto_tree_add_subtree[_format]Michael Mann1-392/+207
Change-Id: Idd1b20ab32c0960ea52c6f3bc5346462c37c5684 Reviewed-on: https://code.wireshark.org/review/2853 Reviewed-by: Michael Mann <mmann78@netscape.net>
2014-07-04wmemify some nfs functions, fixing much leaked memoryEvan Huus1-61/+43
Bug: 10257 Change-Id: Ia36c03b2be727a37f91eca38af4faf48d1d65436 Reviewed-on: https://code.wireshark.org/review/2840 Reviewed-by: Anders Broman <a.broman58@gmail.com>
2014-06-19Revert "Fixup: tvb_* -> tvb_captured"Michael Mann1-3/+3
https://www.wireshark.org/lists/wireshark-dev/201406/msg00131.html This reverts commit 246fe2ca4c67d8c98caa84e2f57694f6322e2f96. Change-Id: Ib24bae0198c13a84bd7f731bf4af921212109a8f Reviewed-on: https://code.wireshark.org/review/2430 Reviewed-by: Michael Mann <mmann78@netscape.net>
2014-06-18Fixup: tvb_* -> tvb_capturedDario Lombardo1-3/+3
Change-Id: I9209c1271967405c34c1b6fa43e1726a4d3a5a3f Reviewed-on: https://code.wireshark.org/review/2377 Reviewed-by: Anders Broman <a.broman58@gmail.com>
2014-06-18Fixup: tvb_get_string(z) -> tvb_get_string(z)_encDario Lombardo1-4/+4
Change-Id: I63a3704effe3fcab01a193dc39b6a22e9f1cf3fe Reviewed-on: https://code.wireshark.org/review/2376 Reviewed-by: Anders Broman <a.broman58@gmail.com>
2014-03-16NFS: We need to pass data through to the dissect_rpc_list() callbackRonnie Sahlberg1-4/+4
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-04Remove all $Id$ from top of fileAlexis La Goutte1-2/+0
(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-03Create/use extended value_strings; add editor modelines as needed.Bill Meier1-2/+5
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-01-21Harden nfs_name_snoop_add_name against various malformed inputs. Thanks to MosheEvan Huus1-3/+10
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
2013-12-21Add missing includesJakub Zawadzki1-0/+1
svn path=/trunk/; revision=54332
2013-12-20Change G_GINT64_CONSTANT(xxxxU) to G_GUINT64_CONSTANT(xxxx)Jakub Zawadzki1-2/+2
svn path=/trunk/; revision=54314
2013-12-19Rename a couple of to_str functions to have ep_ in the name. This makes itEvan Huus1-2/+2
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-15From Niels de Vos via https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=9557Alexis La Goutte1-0/+44
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-14Fix [-Wmissing-prototypes]Jakub Zawadzki1-0/+3
svn path=/trunk/; revision=54095
2013-12-13Handle NFS4_OP_ILLEGAL (and other potential array bounds errors).Guy Harris1-4/+6
svn path=/trunk/; revision=54058
2013-12-12Create/use an extended value-string;Bill Meier1-1353/+1409
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-11-10Mark a parameter unused.Gerald Combs1-1/+1
svn path=/trunk/; revision=53238
2013-11-10Have rpc_call_info_value be passed through to (sub)dissectors instead of ↵Michael Mann1-164/+151
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-10Add missing includes in order to remove exceptions.h from proto.h (next commit).Jakub Zawadzki1-0/+1
svn path=/trunk/; revision=53230
2013-11-10Add data parameter to dissect_function_t in vsff structure. The intention ↵Michael Mann1-86/+86
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-09Don't include <epan/strutil.h> when not needed.Jakub Zawadzki1-1/+0
svn path=/trunk/; revision=53194
2013-11-05From J. Bruce Fields via ↵Alexis La Goutte1-1/+1
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-10-29From didier gautheron: remove redundant or use faster col_xxx functionsBill Meier1-3/+3
- 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-23#if 0 numerous "unused const variables" (mostly value-string-arrays);Bill Meier1-0/+2
Also; fix a few "set but not used" warnings. svn path=/trunk/; revision=52780
2013-09-30Convert some proto_tree_add_string_format calls to something more appropriate.Michael Mann1-4/+4
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-22emem -> wmem conversion:Pascal Quantin1-6/+6
- 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-21Add _g_ to the names of functions that allocate glib memory. This is a bit moreEvan Huus1-5/+5
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-16Remove a bunch more set-but-no-longer-used variables.Jeff Morriss1-10/+1
svn path=/trunk/; revision=52100
2013-09-16Convert proto_tree_add_uint_format to proto_tree_add_uint_format_value if ↵Michael Mann1-50/+30
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