aboutsummaryrefslogtreecommitdiffstats
path: root/epan/dissectors/packet-rpc.c
AgeCommit message (Collapse)AuthorFilesLines
2014-03-16NFS: We need to pass data through to the dissect_rpc_list() callbackRonnie Sahlberg1-2/+3
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-01-14Don't cast away constness.Guy Harris1-2/+2
svn path=/trunk/; revision=54765
2013-12-21fix some warnings.Jakub Zawadzki1-8/+7
svn path=/trunk/; revision=54334
2013-12-12- Make local functions static.Anders Broman1-0/+2
- Forward declaration of register functions. svn path=/trunk/; revision=53958
2013-11-29Rename some of pint.h macros to match common style (bits number on the end).Jakub Zawadzki1-2/+2
pntohs -> pntoh16 pntohl -> pntoh32 pletohs -> pletoh16 pletohl -> pletoh32 phtons -> phton16 phtonl -> phton32 svn path=/trunk/; revision=53652
2013-11-10Have rpc_call_info_value be passed through to (sub)dissectors instead of ↵Michael Mann1-2/+0
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-13/+14
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-09include <wsutil/pint.h> only when needed.Jakub Zawadzki1-0/+1
svn path=/trunk/; revision=53196
2013-11-02Remove rpc_defrag.hMichael Mann1-2/+6
Move the #defines to packet-rpc.h and pull the functions into packet-rpc.c since they aren't used by any dissectors. svn path=/trunk/; revision=53040
2013-11-02Pass struct tcpinfo into all TCP subdissectors instead of through ↵Michael Mann1-20/+19
pinfo->private_data. svn path=/trunk/; revision=53036
2013-10-29From didier gautheron: remove redundant or use faster col_xxx functionsBill Meier1-2/+1
- 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-09-22emem -> wmem conversion:Pascal Quantin1-1/+1
- 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-15Convert proto_tree_add_uint_format to proto_tree_add_uint_format_value if ↵Michael Mann1-15/+13
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-08-31More wmem.Evan Huus1-40/+39
svn path=/trunk/; revision=51619
2013-07-17Remove fragment_data, add fragment_head, fragment_item - for now alias it to ↵Jakub Zawadzki1-4/+4
the same structure. This is begin of work to split fragment head and fragments items. svn path=/trunk/; revision=50708
2013-07-14Rewrite reassemble API to use TVBs instead of raw data.Jakub Zawadzki1-2/+1
(it seems to be working for TCP ^^) svn path=/trunk/; revision=50580
2013-05-31Get rid of most of the if(tree) checks: the proto_tree_add_*() functionsJeff Morriss1-72/+49
don't need them any more and, as shown in https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=3290#c16 we really want to check if we're looking at something beyond the end of the TVB (in order to break out of very long loops). svn path=/trunk/; revision=49645
2013-03-22Don't wire into the reassembly code the notion that reassemblies shouldGuy Harris1-6/+15
be done on flows from one address to another; reassembly for protocols running atop TCP should be done on flows from one TCP endpoint to another. We do this by: adding "reassembly table" as a data structure; associating hash tables for both in-progress reassemblies and completed reassemblies with that data structure (currently, not all reassemblies use the latter; they might keep completed reassemblies in the first table); having functions to create and destroy keys in that table; offering standard routines for doing address-based and address-and-port-based flow processing, so that dissectors not needing their own specialized flow processing can just use them. This fixes some mis-reassemblies of NIS YPSERV YPALL responses (where the second YPALL response is processed as if it were a continuation of a previous response between different endpoints, even though said response is already reassembled), and also allows the DCE RPC-specific stuff to be moved out of epan/reassembly.c into the DCE RPC dissector. svn path=/trunk/; revision=48491
2013-03-14From beroset:Anders Broman1-31/+31
changed implicit casts to explicit and substituted se_new for se_alloc https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=8416 svn path=/trunk/; revision=48288
2013-02-27Move show_exception() and show_reported_bounds_error() toGuy Harris1-21/+17
epan/show_exception.c, as it's used outside epan/dissectors/packet-frame.c. Update their callers to include <epan/show_exception.h> to get their declaration. Add a CATCH_NONFATAL_ERRORS macro that catches all exceptions that, if there's more stuff in the packet to dissect after the dissector call that threw the exception, doesn't mean you shouldn't go ahead and dissect that stuff. Use it in all those cases, including ones where BoundsError was inappropriately being caught (you want those passed up to the top level, so that the packet is reported as having been cut short in the capture process). Add a CATCH_BOUNDS_ERRORS macro that catches all exceptions that correspond to running past the end of the data for a tvbuff; use it rather than explicitly catching those exceptions individually, and rather than just catching all exceptions (the only place that DissectorError should be caught, for example, is at the top level, so dissector bugs show up in the protocol tree). Don't catch and then immediately rethrow exceptions without doing anything else; just let the exceptions go up to the final catcher. Use show_exception() to report non-fatal errors, rather than doing it yourself. If a dissector is called from Lua, catch all non-fatal errors and use show_exception() to report them rather than catching only ReportedBoundsError and adding a proto_malformed item. Don't catch exceptions when constructing a trailer tvbuff in packet-ieee8023.c - just construct it after the payload has been dissected, and let whatever exceptions that throws be handled at the top level. Avoid some TRY/CATCH/ENDTRY cases by using checks such as tvb_bytes_exist() before even looking in the tvbuff. svn path=/trunk/; revision=47924
2012-12-27From Pawel Dziepak:dissect_rpc_array causes assertion fault when array is ↵Anders Broman1-7/+8
empty. https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=8145 svn path=/trunk/; revision=46805
2012-12-26Fix a bunch of warnings.Guy Harris1-4/+4
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-10-26Create SET_ADDRESS_HF that takes an additional hf_ value that can beEvan Huus1-3/+3
used to override the filter generated from the address column. Fixes https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=7728 (again). svn path=/trunk/; revision=45792
2012-10-26Revert revision 44921.Evan Huus1-3/+3
See discussion on https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=7728 svn path=/trunk/; revision=45791
2012-09-20We always HAVE_CONFIG_H so don't bother checking whether we have it or not.Jeff Morriss1-3/+1
svn path=/trunk/; revision=45017
2012-09-15From Pontus Fuchs via https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=7728Evan Huus1-3/+3
Make right-click + apply-as-filter work in the packet list for non-ethernet frames (such as ieee 802.11 frames). svn path=/trunk/; revision=44921
2012-09-10Initial commit to support yet another method of passing data between dissectors.Jakub Zawadzki1-2/+2
Add new parameter 'data' to heur_dissector_t and new_dissector_t, for now it's always NULL svn path=/trunk/; revision=44860
2012-09-07From Robert Bullen via ↵Jeff Morriss1-0/+2
https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=7683 : The reassembled fragments tree in the Packet Details view is awesome, but it lacks one thing: a field that exposes the reassembled data. tcp.data already exists for exposing a single TCP segment's payload as a byte array. It would be handy to have something similar for a single application layer PDU when TCP segment reassembly is involved. I propose tcp.reassembled.data, named and placed after the already existing field tcp.reassembled.length. My primary use case for this feature is outputting tcp.reassembled.data with tshark for further processing with a script. The attached patch implements this very feature. Because the reassembled fragment tree code is general purpose, i.e. not specific to just TCP, any dissector that relies upon it can add a similar field very cheaply. In that vein I've also implemented ip.reassembled.data and ipv6.reassembled.data, which expose reassembled fragment data as a single byte stream for IPv4 and IPv6, respectively. All other protocols that use the reassembly code have been left alone, other than inserting NULL into their initializer lists for the newly introduced struct field reassemble.h:fragment_items.hf_reassembled_data. svn path=/trunk/; revision=44802
2012-06-28Update Free Software Foundation address.Jakub Zawadzki1-1/+1
(COPYING will be updated in next commit) svn path=/trunk/; revision=43536
2012-05-31From Niels de Vos via https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=7306 :Pascal Quantin1-2/+15
RPC: show the AUTH_GLUSTERFS/lk_owner as hex svn path=/trunk/; revision=42940
2012-05-21From Evan Huus via https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=7271 :pascal1-1/+1
Remove useless null check svn path=/trunk/; revision=42741
2012-05-15Remove unneeded includes (ctype.h, stdio.h);Bill Meier1-1/+2
In one case, define our own size for a string buffer (instead of using a magic constant 'BUFSIZ'); In a few cases: do some whitespace, indentation & reformatting cleanup. svn path=/trunk/; revision=42634
2012-05-11Remove useless '+0' in proto_tree_add_* function callspascal1-70/+70
svn path=/trunk/; revision=42574
2012-05-11From Niels de Vos:pascal1-0/+17
Add dissection of AUTH_GLUSTERFS as used in GlusterFS-3.3 https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=7244 svn path=/trunk/; revision=42573
2012-05-11From Niels de Vos:pascal1-66/+51
Add a helper function to dissect AUTH_UNIX groups Fix hf_rpc_auth_lk_owner entry https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=7244 svn path=/trunk/; revision=42572
2012-05-10Get rid of remaining Booleans-as-encoding-arguments inGuy Harris1-1/+1
proto_tree_add_item() calls. svn path=/trunk/; revision=42537
2012-04-25From Niels de Vos:pascal1-0/+72
dissect AUTH_RSA as Gluster AUTH-flavor https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=7190 svn path=/trunk/; revision=42244
2012-03-30Fix compiler warnings (set but not used).Jörg Mayer1-7/+7
Remove whitespace at end of line. svn path=/trunk/; revision=41845
2012-03-29ONC-RPC: After we have dissected the decrypted PDU, update offset to reflect ↵Ronnie Sahlberg1-0/+1
that we have eaten all these bytes or rpc will think there was un-dissected data remaining and will show it as an extra "data" field. svn path=/trunk/; revision=41833
2012-03-29ONC-RPC: Add decryption of GSSAPI protected NFS and other ONC based protocolsRonnie Sahlberg1-38/+98
svn path=/trunk/; revision=41822
2012-03-28ONC-RPC: When a GSS context is destroyed, that NULL procedure call does not ↵Ronnie Sahlberg1-3/+7
carry neither a verifier nor a payload. Stop decoding the packed immediately after the credentials so that we dont incorrectly flag these packets as malformed. svn path=/trunk/; revision=41817
2012-03-28remove a header include that was used when debugging and forgotten to be ↵Ronnie Sahlberg1-1/+0
removed from previous commit svn path=/trunk/; revision=41814
2012-03-28ONC-RPC: add tracking of GSSAPI authentication contextsRonnie Sahlberg1-13/+123
Add traking of when GSS authentication contexts are created and when they are destroyed so that it is easy to "click on created in link" in a SecNFS packet to get to where the kerberos blob for authentication is Add context created in/destroyed in to the decode so you can quickly jump to where the authantiation happened to check the decrypted krb5 credentials svn path=/trunk/; revision=41813
2011-10-26Fix proto_tree_add_item() encoding args.Bill Meier1-5/+5
svn path=/trunk/; revision=39618
2011-10-21For proto_tree_add_item(..., proto_xxx, ...)use ENC_NA as the encoding arg.Bill Meier1-2/+2
Also: remove trailing whitespace for a number of files. svn path=/trunk/; revision=39503
2011-10-04Use ENC_NA as encoding for proto_tree_add_item() calls which directly ↵Bill Meier1-2/+2
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-09-21Fix ex "modeline" so it works;Bill Meier1-1/+1
See https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=5748 svn path=/trunk/; revision=39081
2011-05-17As suggested by Chris: use val_to_str_const() instead of match_strval() plus aJeff Morriss1-5/+1
NULL-return check. Use val_to_str_const instead of val_to_str() in a couple places where the string is constant. Use val_to_str() instead of blindly passing the return value from match_strval() into a format routine (to ensure a non-NULL string pointer). A couple of these were cases where it could not actually return NULL, but I changed it for consistency. Store the return value of match_strval() rather than calling it repeatedly. svn path=/trunk/; revision=37204