aboutsummaryrefslogtreecommitdiffstats
path: root/packet-mount.c
Commit message (Collapse)AuthorAgeFilesLines
* Set the svn:eol-style property on all text files to "native", so thatGuy Harris2004-07-181-1/+1
| | | | | | | | | they have LF at the end of the line on UN*X and CR/LF on Windows; hopefully this means that if a CR/LF version is checked in on Windows, the CRs will be stripped so that they show up only when checked out on Windows, not on UN*X. svn path=/trunk/; revision=11400
* Prettify NFSv2 decorate COL_INFO and the tree pane as has already been ↵Ronnie Sahlberg2003-09-281-2/+2
| | | | | | done for v3 svn path=/trunk/; revision=8560
* Prettifying the RPC and NFS (v3) layer.Ronnie Sahlberg2003-08-171-2/+2
| | | | | | Add more text to the COL_INFO line as well as the protocol trees for NFS and RPC svn path=/trunk/; revision=8179
* Fix several buffer and integer overflow issues discovered by Timo Sirainen.Gerald Combs2003-04-281-11/+13
| | | | | | | | | | | | | | | | | | | | | | | | | tvbuff.c: Lots of existing code assumes that you can safely do the following: #define MAX_BUF 64 guint8 *buf[MAX_BUF]; ... tvb_get_nstringz0 (tvb, offset, MAX_BUF, buf, &bytes_copied); In reality, tvb_get_nstringz*() can potentially write one byte past "buf". Modify _tvb_get_nstringz() not to do that. packet-ppp.c: Check for a valid BAP suboption length. packet-mount.c: Fix a possible integer overflow in dissect_group(). svn path=/trunk/; revision=7590
* Typo fixes, from Brian Ginsbach.Guy Harris2002-11-141-2/+2
| | | | svn path=/trunk/; revision=6622
* From Brian Ginsbach: add a new "dissect_rpc_bytes()" routine to allowGuy Harris2002-11-131-2/+329
| | | | | | | fixed-length opaque data to be dissected, and add support for SGI's variant of the ONC RPC mount protocol. svn path=/trunk/; revision=6620
* Updated all remaining ONC-RPC dissectors to pass the procedure name ↵Ronnie Sahlberg2002-11-011-4/+46
| | | | | | value_string in the call to prc_init_proc_table() svn path=/trunk/; revision=6528
* Add an extra argument to "rpc_init_proc_table()" that can specify an hf_Guy Harris2002-10-231-4/+4
| | | | | | | | | | | | 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
* Removed trailing whitespaces from .h and .c files using theJörg Mayer2002-08-281-19/+19
| | | | | | | winapi_cleanup tool written by Patrik Stridvall for the wine project. svn path=/trunk/; revision=6117
* Replace the types from sys/types.h and netinet/in.h by their glib.hJörg Mayer2002-08-021-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
* From Ronnie Sahlberg: dissect_mount_dirpath_call()Uwe Girlich2002-04-151-8/+19
| | | | | | | The sprintf() thingy failed to properly null terminate the string thus causing damage. svn path=/trunk/; revision=5165
* Removed many senseless pinfo parameters in RPC dissection and the layers above.Uwe Girlich2002-04-031-15/+15
| | | | svn path=/trunk/; revision=5090
* Allow a length of -1 to be specified when adding FT_NONE and FT_PROTOCOLGuy Harris2002-01-201-4/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | items to the protocol tree; it's interpreted as "the rest of the data in the tvbuff". This can be used if 1) the item covers the entire packet or the remaining payload in the packet or 2) the item's length won't be known until it's dissected, and will be then set with "proto_item_set_len()" - if an exception is thrown in the dissection, it means the item ran *past* the end of the tvbuff, so saying it runs to the end of the tvbuff is reasonable. Convert a number of "proto_tree_add_XXX()" calls using "tvb_length_remaining()", values derived from the result of "tvb_length()", or 0 (in the case of items whose length is unknown) to use -1 instead (using 0 means that if an exception is thrown, selecting the item highlights nothing; using -1 means it highlights all the data for that item that's available). In some places where "tvb_length()" or "tvb_length_remaining()" was used to determine how large a packet is, use "tvb_reported_length()" or "tvb_reported_length_remaining()", instead - the first two calls indicate how much captured data was in the packet, the latter two calls indicate how large the packet actually was (and the fact that using the latter could cause BoundsError exceptions to be thrown is a feature - if such an exception is thrown, the frame really *was* short, and it should be tagged as such). Replace some "proto_tree_add_XXX()" calls with equivalent "proto_tree_add_item()" calls. Fix some indentation. svn path=/trunk/; revision=4578
* From Ronnie Sahlberg: file handle to file name resolution in NFS andGuy Harris2002-01-121-1/+19
| | | | | | related protocols. svn path=/trunk/; revision=4533
* From Heikki Vatiainen: fix to previous checkin (I guess some platformsGuy Harris2001-07-121-5/+5
| | | | | | | allow the redefinition of "strlen", as it compiled on at least some platforms). svn path=/trunk/; revision=3697
* Include <string.h> to declare string functions that we use.Guy Harris2001-07-121-1/+2
| | | | svn path=/trunk/; revision=3695
* From Joerg Mayer: explicitly fill in all members of aGuy Harris2001-06-181-30/+30
| | | | | | | "header_field_info" structure, including the ones that are later set by the routines to register fields. svn path=/trunk/; revision=3561
* There are no more old-style (non-tvbuffified) ONC RPC dissectors, so getGuy Harris2001-05-301-13/+13
| | | | | | | | | 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
* If we do "offset = dissect_rpc_XXX_tvb(...)", we have to do soGuy Harris2001-04-071-8/+3
| | | | | | | | | | regardless of whether the protocol tree argument is null or not; otherwise, we don't end up updating the offset field correctly if the argument is null. (The "dissect_rpc_XXX_tvb(...)" routines won't try to add something to the tree if their "tree" argument is null, so it's safe to call them with a null "tree" argument.) svn path=/trunk/; revision=3270
* Update from Ronnie Sahlberg to use the list of mount status replies withGuy Harris2001-03-151-6/+9
| | | | | | V1 and V2 as well. svn path=/trunk/; revision=3137
* Tvbuffification, and various enhancements, from Ronnie Sahlberg.Guy Harris2001-03-131-171/+178
| | | | svn path=/trunk/; revision=3126
* Allow dissectors of ONC RPC-based protocols to register themselvesGuy Harris2001-01-281-9/+9
| | | | | | | | | | | | | | | | | | | 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
* Fix comments to reflect what a null function pointer in a "vsff" tableGuy Harris2001-01-181-2/+2
| | | | | | | | really means. Make the "XXX_proc" arrays static. svn path=/trunk/; revision=2920
* Have "proto_register_protocol()" build a list of data structures forGuy Harris2001-01-031-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | 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
* Reversed the latest changes for protocol enable/disable in RPC sub-dissectors.Uwe Girlich2000-08-141-40/+2
| | | | | | The RPC layer itself handles all this stuff. svn path=/trunk/; revision=2271
* Add the "Edit:Protocols..." feature which currently only implementsLaurent Deniel2000-08-131-2/+40
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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
* Add routines for adding items to a protocol tree that take arguments ofGuy Harris2000-05-311-26/+26
| | | | | | | | | | | | | | | | | a particular type, rather than taking a varargs list, along the lines of the "proto_tree_add_XXX_format()" routines. Replace most calls to "proto_tree_add_item()" and "proto_tree_add_item_hidden()" with calls to those routines. Rename "proto_tree_add_item()" and "proto_tree_add_item_hidden()" to "proto_tree_add_item_old()" and "proto_tree_add_item_hidden_old()", and add new "proto_tree_add_item()" and "proto_tree_add_item_hidden()" routines that don't take the item to be added as an argument - instead, they fetch the argument from the packet whose tvbuff was handed to them, from the offset handed to them. svn path=/trunk/; revision=2031
* Add tvbuff class.Gilbert Ramirez2000-05-111-26/+26
| | | | | | | | | | | | | | | Add exceptions routines. Convert proto_tree_add_*() routines to require tvbuff_t* argument. Convert all dissectors to pass NULL argument ("NullTVB" macro == NULL) as the tvbuff_t* argument to proto_tree_add_*() routines. dissect_packet() creates a tvbuff_t, wraps the next dissect call in a TRY block, will print "Short Frame" on the proto_tree if a BoundsError exception is caught. The FDDI dissector is converted to use tvbuff's. svn path=/trunk/; revision=1939
* Use the new split between protocol registration and protocol handoffGuy Harris2000-04-041-1/+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
* Change dfilter_init() to check for empty-string abbreviations and forGilbert Ramirez2000-03-201-2/+2
| | | | | | | duplicate abbreviations. All mods to packet-*.c files are fixes to remove those cases. svn path=/trunk/; revision=1733
* New dissector functions for mount DUMP and EXPORT replies.Uwe Girlich2000-03-091-11/+163
| | | | svn path=/trunk/; revision=1706
* Give "dissect_rpc_string()" an extra "char **" argument; if it'sGuy Harris2000-01-221-2/+2
| | | | | | | | | | non-null, it returns through that argument a pointer to the displayed version of the string, otherwise it just frees that string. Use that to put, in the tree item for READDIR and READDIRPLUS reply directory entry items, the file name from the directory entry. svn path=/trunk/; revision=1521
* Fix Gerald's e-mail address.Guy Harris2000-01-071-2/+2
| | | | svn path=/trunk/; revision=1437
* Some more RPC functions dissected.Uwe Girlich1999-11-291-3/+42
| | | | svn path=/trunk/; revision=1153
* Mount V2.Guy Harris1999-11-201-11/+322
| | | | | | | | | Add EXPORTALL, which is identical to EXPORT. Make static and/or const a number of things that can be made static or const. svn path=/trunk/; revision=1078
* Make various "value_string" tables "const"; this allows the compiler toGuy Harris1999-11-191-5/+4
| | | | | | | | | stuff them into shared read-only space. Put the "VALS()" cast macro into the initialization of an "hf_register_info" array. svn path=/trunk/; revision=1072
* Added Uwe's update to RPC.Gilbert Ramirez1999-11-191-2/+86
| | | | svn path=/trunk/; revision=1069
* Replace the ETT_ "enum" members, declared in "packet.h", withGuy Harris1999-11-161-2/+7
| | | | | | | | | | | | | | | | | 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
* Got rid of dissect_rpc_string routine, renamed dissect_rpc_string_item toNathan Neulinger1999-11-151-2/+2
| | | | | | | | | | | | dissect_rpc_string. Replaced only instance of this routine being called. Added display filtering to rpc dissector. Replaced most instances of proto_tree_add_text with proto_tree_add_item. Added program version and procedure to the program tree in addition to it being in the RPC tree. svn path=/trunk/; revision=1037
* Uwe Girlich's patches for nfs,mount,portmap and addition of nlm.Nathan Neulinger1999-11-151-9/+36
| | | | svn path=/trunk/; revision=1034
* Added mount dissector.Nathan Neulinger1999-11-111-0/+86
Added stat dissector. Enhancements to portmap dissector. Added rpc_prog_name function to packet-rpc to retrieve the name of an rpc program. This should likely eventually be modified to use the /etc/rpc or rpc.bynumber NIS maps in addition to the programs that are registered within ethereal. svn path=/trunk/; revision=1016