aboutsummaryrefslogtreecommitdiffstats
path: root/packet-ndmp.c
AgeCommit message (Collapse)AuthorFilesLines
2003-04-21Make "first_pdu" an argument rather than a global in the ONC RPCGuy Harris1-10/+16
dissector - including the ONC RPC-over-TCP record marking code, which is also used by NDMP. That means that the NDMP dissector can, like the ONC RPC dissector, put into the Info column items for all the NDMP messages dissected for a frame; make it do so. svn path=/trunk/; revision=7516
2002-08-28Removed trailing whitespaces from .h and .c files using theJörg Mayer1-75/+75
winapi_cleanup tool written by Patrik Stridvall for the wine project. svn path=/trunk/; revision=6117
2002-08-20Have "dissect_scsi_cdb()" take an argument that's a SCSI device type,Guy Harris1-9/+40
for the benefit of dissectors such as the NDMP dissector that can at least supply a reasonable guess for the device type; more than one type of device can be opened on the same host over NDMP, so the scheme currently used by the SCSI dissector to remember device types in INQUIRY replies won't work. Have the iSCSI dissector supply SCSI_DEV_UNKNOWN, and have the NDMP dissector supply SCSI_DEV_SMC for NDMP_SCSI_EXECUTE_CDB (under the assumption that it's operating on a media changer) and supply SCSI_DEV_SSC for NDMP_TAPE_EXECUTE_CDB (under the assumption that it's operating on a tape device). Fix memory leaks in the SCSI dissector. Fix the dissectors for the SSC READ(6) and WRITE(6) CDBs to dissect the transfer length as a 24-bit quantity. svn path=/trunk/; revision=6035
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-06-05Updated NDMP and ONC RPC services to use the new function to displayRonnie Sahlberg1-2/+2
fregment trees. svn path=/trunk/; revision=5627
2002-05-01Mark unused arguments as such.Guy Harris1-80/+96
svn path=/trunk/; revision=5329
2002-04-29Removal (or, at least, #ifdeffing out) of unused variables andGuy Harris1-3/+1
functions, from David Frascone. svn path=/trunk/; revision=5288
2002-04-03Removed many senseless pinfo parameters in RPC dissection and the layers above.Uwe Girlich1-55/+55
svn path=/trunk/; revision=5090
2002-02-18Add support for reassembling RPC-over-TCP fragments, and do that in bothGuy Harris1-112/+108
RPC and NDMP. Show the RPC-over-TCP fragment header as a tree with bitfields below it. Add a routine to show a reported bounds error as an "Unreassembled Packet" or a "Malformed Packet" depending on whether "pinfo->fragmented" is set, and have NBNS and RPC use that. Add "ett_ndmp_file_stats" to the list of ett_ values to be initialized (it wasn't in that list, and wasn't getting initialized). When freeing up various hash tables and memory chunks in the RPC dissector, zero out the pointers to them, just to make sure we don't try to free them again. Always destroy the TCP segment key and address memory chunks in "tcp_desegment_init()", regardless of whether TCP desegmentation is enabled - we don't *allocate* them if TCP desegmentation isn't enabled, but we should free them even if it's not enabled. Also, when we free them, set the pointers to them to null, so we don't double-free them. Supply to subdissectors called from the TCP dissector the sequence number of the first byte handed to the sub dissector. svn path=/trunk/; revision=4753
2002-02-13Have the private data for the SCSI dissection routines be a pointer to aGuy Harris1-62/+203
structure containing a 32-bit conversation ID (which uniquely identifies conversations between a SCSI initiator and target) and a 32-bit task ID (which uniquely identifies a task within that conversation). Have the NDMP dissector create conversations when it sees an "execute CDB" request, and use the conversation index as the conversation ID and the sequence number for requests and reply sequence for replies as the task ID. Have it use "dissect_scsi_payload()" to dissect the payload of "execute CDB" requests and replies. svn path=/trunk/; revision=4726
2002-02-12Dissect "execute CDB" requests and replies.Guy Harris1-20/+197
Get rid of extra trailing white space in some protocol tree items. svn path=/trunk/; revision=4725
2002-02-03Catch ReportedBoundsError exceptions when dissecting NDMP messages, andGuy Harris1-9/+38
report the error but don't re-throw the exception; that way, we can continue to dissect additional NDMP messages in the frame or reassembled chunk of data, even if one of them happens to be too short for what's in it. svn path=/trunk/; revision=4692
2002-01-24Replace a bunch of "tvb_length()" and "tvb_length_remaining()" calls inGuy Harris1-3/+3
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
2002-01-21Convert some "col_add_str()" calls to "col_set_str()".Guy Harris1-2/+2
svn path=/trunk/; revision=4592
2002-01-21Include files from the "epan" directory and subdirectories thereof withGuy Harris1-2/+2
"epan/..." pathnames, so as to avoid collisions with header files in any of the directories in which we look (e.g., "proto.h", as some other package has its own "proto.h" file which it installs in the top-level include directory). Don't add "-I" flags to search "epan", as that's no longer necessary (and we want includes of "epan" headers to fail if the "epan/" is left out, so that we don't re-introduce includes lacking "epan/"). svn path=/trunk/; revision=4586
2002-01-20Allow a length of -1 to be specified when adding FT_NONE and FT_PROTOCOLGuy Harris1-5/+5
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
2002-01-18Put one NDMP top-level protocol tree item in for every NDMP PDU (whichGuy Harris1-36/+33
means *no* top-level tree item if we don't find any NDMP PDUs). Check for desegmentation before checking anything else, so that we don't fail to desegment merely because we have, for example, only the record marker in the first TCP segment (I've seen a capture where the first TCP segment of an NDMP message has only the record marker). svn path=/trunk/; revision=4572
2002-01-18Make the default for NDMP desegmentation TRUE, as is the case for mostGuy Harris1-2/+2
other protocols running atop TCP (and which should be the case for *all* of them, if it isn't so already; there's already a flag to control desegmentation in TCP, and it should, by default, be possible to turn that on and get desegmentation of all protocols). svn path=/trunk/; revision=4568
2002-01-15Fix some preferences to eliminate the extra copy of the protocol name atGuy Harris1-2/+2
the beginning, and to use underscores rather than periods where the preference's name really isn't part of a hierarchical namespace. Use "%u" rather than "%d" to print unsigned quantities. svn path=/trunk/; revision=4543
2002-01-05From Ronnie Sahlberg: use size from encapsulation instead of how manyGuy Harris1-25/+29
bytes were dissected since there can be padding bytes after the ndmp pdu and to the end of what size said it would be, and some other cleanups. svn path=/trunk/; revision=4486
2002-01-05Additional sanity checks, from Ronnie Sahlberg.Guy Harris1-26/+57
svn path=/trunk/; revision=4485
2002-01-04Further updates from Ronnie Sahlberg.Guy Harris1-15/+56
svn path=/trunk/; revision=4483
2002-01-04Most of NDMP, from Ronnie Sahlberg.Guy Harris1-55/+2530
svn path=/trunk/; revision=4479
2001-12-23From Ronnie Sahlberg: initial NDMPv3 support, and an update to hisGuy Harris1-0/+522
e-mail address. svn path=/trunk/; revision=4444