aboutsummaryrefslogtreecommitdiffstats
path: root/packet-nlm.c
AgeCommit message (Collapse)AuthorFilesLines
2004-02-25Use "tvb_get_string()" instead of allocating a (len+1)-sized buffer,Guy Harris1-5/+2
"tvb_memcpy()"ing to it, and putting in a null terminator; "tvb_get_string()" will check whether all bytes of the string are present before allocating the buffer, so that you don't leak memory if the copy throws an exception, and don't crash if the length is absurdly large. Use "tvb_memdup()" instead of allocating a buffer and "tvb_memcpy()"ing to it, so that an exception is thrown before you try to allocate the buffer (for the same reasons as listed above). Before allocating a buffer used when processing a chunk of data from a packet, get a pointer to the chunk with "tvb_get_ptr()", or check that the data is all there with "tvb_ensure_bytes_exist()", so that an exception is thrown before you try to allocate the buffer (for the same reasons as listed above). Fix up the lengths of the tvbuff used when dissecting ONC RPC opaque data with a particular dissector. svn path=/trunk/; revision=10236
2003-08-17Prettifying the RPC and NFS (v3) layer.Ronnie Sahlberg1-3/+3
Add more text to the COL_INFO line as well as the protocol trees for NFS and RPC svn path=/trunk/; revision=8179
2003-01-28Panic if a preference starts with the name of the module to which itGuy Harris1-2/+2
belongs, as that's redundant. Fix a bunch of cases where that was done, and map the old name to the new name. Instead of marking "mtp3.mtp3_standard" as obsolete, map it to "mtp3.standard". svn path=/trunk/; revision=7030
2002-12-03Cast const pointer arguments to "g_free()" and "g_hash_table_foreach()"Guy Harris1-4/+4
to "gpointer", so that we only get warnings when we turn on the extra GCC warning checks. svn path=/trunk/; revision=6734
2002-12-02Don't cast away constness, and fix variable and structure memberGuy Harris1-8/+10
qualifiers as necessary to ensure that we don't have to. "strcmp()", "strcasecmp()", and "memcmp()" don't return booleans; don't test their results as if they did. Use "guint8", not "guchar", for a pointer to (one or more) 8-bit bytes. Update Michael Tuexen's e-mail address. svn path=/trunk/; revision=6726
2002-11-01Updated all remaining ONC-RPC dissectors to pass the procedure name ↵Ronnie Sahlberg1-6/+105
value_string in the call to prc_init_proc_table() svn path=/trunk/; revision=6528
2002-10-23Add an extra argument to "rpc_init_proc_table()" that can specify an hf_Guy Harris1-5/+5
value for a field to be used for the procedure number for that version of the protocol; use that field, if specified, instead of just putting in a generic "rpc.procedure" field. Have the ypserv dissector register those fields and supply them to "rpc_init_proc_table()". Supply -1 for other RPC programs (for now), meaning "no such field exists". svn path=/trunk/; revision=6486
2002-08-28Removed trailing whitespaces from .h and .c files using theJörg Mayer1-61/+61
winapi_cleanup tool written by Patrik Stridvall for the wine project. svn path=/trunk/; revision=6117
2002-08-02Replace the types from sys/types.h and netinet/in.h by their glib.hJörg Mayer1-5/+1
equivalents for the toplevel directory. The removal of winsock2.h will hopefully not cause any problems under MSVC++, as those files using struct timeval still include wtap.h, which still includes winsock2.h. svn path=/trunk/; revision=5932
2002-05-21Option to make filtering on nfs fhandles stateful.Ronnie Sahlberg1-1/+71
When this ption is enabled in Protocols/NFS displayfilters for fhandle fields such as nfs.fh.{hash|name|full_name} will find both the request and matching response packets even if the fhandle is only present in one of the packets. The option supports all NFS and related protocols which use nfs fhandles including async NLM. The option will not work with nfs packets containing multiple fhandles in one PDU, nor will it work if tcp collapses multiple segments/pdus into one larger segment. It only works for async NLM if one first enables the MSG/RES stateful matching for async NLM. svn path=/trunk/; revision=5515
2002-05-08Added option to match async NLM MSG with RES packets, to print which MSG ↵Ronnie Sahlberg1-1/+299
packet matches which RES packet and v.v as well as (in RES packets) how long the call took to execute. svn path=/trunk/; revision=5417
2002-04-14From Joerg Mayer:Guy Harris1-4/+4
Declares some variables static. Creates a new include file packet-rsvp.h, and make use of it (change some extern decls to #inlcude). Move the file packet-pgm.h into packet-pgm.c as it is not used by anything outside packet-pgm.c. svn path=/trunk/; revision=5162
2002-04-03Removed many senseless pinfo parameters in RPC dissection and the layers above.Uwe Girlich1-50/+50
svn path=/trunk/; revision=5090
2002-01-24Replace a bunch of "tvb_length()" and "tvb_length_remaining()" calls inGuy Harris1-12/+6
arguments to "proto_tree_add_text()", and to "proto_tree_add_XXX()" calls that add FT_NONE or FT_PROTO items to the protocol tree, with -1. Replace some calls to "tvb_length()" or "tvb_length_remaining()" with calls to "tvb_reported_length()" and "tvb_reported_length_remaining()", as those give the actual length of the data in the packet, not just the data that happened to be captured. svn path=/trunk/; revision=4605
2001-12-23From Ronnie Sahlberg: initial NDMPv3 support, and an update to hisGuy Harris1-2/+2
e-mail address. svn path=/trunk/; revision=4444
2001-10-29From Ronnie Sahlberg: FT_UINT64 support, code to handle 64-bit integersGuy Harris1-5/+13
without requiring compiler support for them, and updates to the Diameter, L2TP, NFS, and NLM dissectors to use it and to the ONC RPC dissector to allow ONC RPC subdissectors to use it. svn path=/trunk/; revision=4099
2001-09-14"stat" is the status in an NLM reply; "state" is the lock manager stateGuy Harris1-12/+12
sent over the wire in a lock request. svn path=/trunk/; revision=3933
2001-09-13NLM fix, and change of status monitor callback protocol name to use "_"Guy Harris1-2/+6
rather than "-" ("-" upsets the display filter parser), from Ronnie Sahlberg. svn path=/trunk/; revision=3924
2001-06-18From Joerg Mayer: explicitly fill in all members of aGuy Harris1-20/+20
"header_field_info" structure, including the ones that are later set by the routines to register fields. svn path=/trunk/; revision=3561
2001-05-30There are no more old-style (non-tvbuffified) ONC RPC dissectors, so getGuy Harris1-44/+44
rid of support for them, and remove the "_tvb" from the end of the names of RPC type dissection routines. Update Gerald's e-mail address. svn path=/trunk/; revision=3477
2001-05-23If you put an item into the protocol tree with "dissect_rpc_data_tvb()",Guy Harris1-3/+3
it must be FT_BYTES, not FT_STRING. svn path=/trunk/; revision=3441
2001-02-04Add support for replies to NLMv3 SHARE and UNSHARE requests and to theGuy Harris1-14/+56
remaining NLMv4 requests. svn path=/trunk/; revision=2988
2001-01-28Allow dissectors of ONC RPC-based protocols to register themselvesGuy Harris1-261/+129
either with a table of old-style dissectors or a table of tvbuffified dissectors, and have the RPC dissector pass the appropriate arguments to the dissectors. Finish tvbuffifying the NLM dissector, getting rid of the last traces of old-style dissector code. In those routines in the NFS dissector that take new-style arguments (because they're called from the NLM dissector), make them take an offset as an argument, so they don't assume that they're handed a tvbuff starting at the stuff they're supposed to dissect, and make the versions that take old-style arguments construct a tvbuff and call the versions that take new-style arguments. Do the latter with the routines in "packet-rpc.c" as well. svn path=/trunk/; revision=2943
2001-01-20NLM v2 is allegedly just the same as NLM v1, and NLM v3 is allegedlyGuy Harris1-41/+80
just NLM v1 plus some stuff for use by DOS/Windows clients, according to The Open Group's "XNFS, Version 3W" ("This document describes version 3 which is backward compatible with versions 1 and 2."); copy the NLM v1 table of dissectors to the tables for NLM v2 and NLM v3. Mark all procedures for which we lack reply dissectors and for which there *is* a reply type, or for which we lack call dissectors and for which there is a call type, with /* XXX */. svn path=/trunk/; revision=2921
2001-01-18Put in a URL that will eventually get you to The Open Group's NFS spec,Guy Harris1-14/+21
which includes the NLM spec. Fix a comment to reflect what a null function pointer in a "vsff" table really means. Make the "nlm<N>_proc" arrays static. Fill in the reply dissector pointers for some entries, and flag some of those that need to be filled in with /* XXX */. svn path=/trunk/; revision=2918
2001-01-16Code from Ronnie Sahlberg to complete the NLM dissector.Guy Harris1-89/+502
svn path=/trunk/; revision=2905
2001-01-03Have "proto_register_protocol()" build a list of data structures forGuy Harris1-2/+3
protocols, in addition to adding structures to the list of filterable fields. Give it an extra argument that specifies a "short name" for the protocol, for use in such places as pinfo->current_proto; the dialog box for constructing filters; the preferences tab for the protocol; and so on (although we're not yet using it in all those places). Make the preference name that appears in the preferences file and the command line for the DIAMETER protocol "diameter", not "Diameter"; the convention is that the name in question be all-lower-case. Make some routines and variables that aren't exported static. Update a comment in the ICP dissector to make it clear that the dissector won't see fragments other than the first fragment of a fragmented datagram. svn path=/trunk/; revision=2810
2000-08-14Reversed the latest changes for protocol enable/disable in RPC sub-dissectors.Uwe Girlich1-16/+1
The RPC layer itself handles all this stuff. svn path=/trunk/; revision=2271
2000-08-13Add the "Edit:Protocols..." feature which currently only implementsLaurent Deniel1-1/+16
the following: It is now possible to enable/disable a particular protocol decoding (i.e. the protocol dissector is void or not). When a protocol is disabled, it is displayed as Data and of course, all linked sub-protocols are disabled as well. Disabling a protocol could be interesting: - in case of buggy dissectors - in case of wrong heuristics - for performance reasons - to decode the data as another protocol (TODO) Currently (if I am not wrong), all dissectors but NFS can be disabled (and dissectors that do not register protocols :-) I do not like the way the RPC sub-dissectors are disabled (in the sub-dissectors) since this could be done in the RPC dissector itself, knowing the sub-protocol hfinfo entry (this is why, I've not modified the NFS one yet). Two functions are added in proto.c : gboolean proto_is_protocol_enabled(int n); void proto_set_decoding(int n, gboolean enabled); and two MACROs which can be used in dissectors: OLD_CHECK_DISPLAY_AS_DATA(index, pd, offset, fd, tree) CHECK_DISPLAY_AS_DATA(index, tvb, pinfo, tree) See also the XXX in proto_dlg.c and proto.c around the new functions. svn path=/trunk/; revision=2267
2000-08-08NLM v1 dissector filled with some actual dissectors.Uwe Girlich1-18/+252
svn path=/trunk/; revision=2226
2000-08-02All 4 protocol versions included (as templates but not as decodings).Uwe Girlich1-23/+95
svn path=/trunk/; revision=2195
2000-04-04Use the new split between protocol registration and protocol handoffGuy Harris1-3/+5
registration routines to get rid of the special handling of ONC RPC protocols - dissectors for ONC RPC-based protocols should register their protocol, fields, and ETT values in a protocol registration routine, and register themselves with the ONC RPC dissector in their protocol handoff routine, so that the latter is done after the ONC RPC dissector's protocol registration routine is called, so that the data structures needed when dissectors for ONC RPC protocols register themselves with the ONC RPC dissector have been initialized. Get rid of "init_dissect_rpc()", which initializes said data structures; do that in "proto_register_rpc()" instead. svn path=/trunk/; revision=1789
2000-01-07Fix Gerald's e-mail address.Guy Harris1-2/+2
svn path=/trunk/; revision=1437
1999-11-16Replace the ETT_ "enum" members, declared in "packet.h", withGuy Harris1-2/+8
dynamically-assigned "ett_" integer values, assigned by "proto_register_subtree_array()"; this: obviates the need to update "packet.h" whenever you add a new subtree type - you only have to add a call to "proto_register_subtree_array()" to a "register" routine and an array of pointers to "ett_", if they're not already there, and add a pointer to the new "ett_" variable to the array, if they are there; would allow run-time-loaded dissectors to allocate subtree types when they're loaded. svn path=/trunk/; revision=1043
1999-11-15Fixed rpc dissector to upcase program name.Nathan Neulinger1-2/+2
Fixed nfs and nlm to use a lowercase protocol name so filtering will work. svn path=/trunk/; revision=1035
1999-11-15Uwe Girlich's patches for nfs,mount,portmap and addition of nlm.Nathan Neulinger1-0/+85
svn path=/trunk/; revision=1034