aboutsummaryrefslogtreecommitdiffstats
path: root/epan/dissectors/packet-ndmp.c
AgeCommit message (Collapse)AuthorFilesLines
2009-08-16Switch a bunch of dissectors over to using tvb_new_subset_remaining()krj1-2/+2
git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@29446 f5534014-38df-0310-8fa8-9805f1628bb7
2009-08-09Don't guard col_clear with col_checkkrj1-3/+1
git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@29346 f5534014-38df-0310-8fa8-9805f1628bb7
2009-08-09Don't guard col_set_str (COL_PROTOCOL) with col_checkkrj1-4/+2
git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@29340 f5534014-38df-0310-8fa8-9805f1628bb7
2009-07-29From Chris Costa: Fix Bug 3786: "NDMP fragmentation fails when final ↵wmeier1-3/+3
fragment is very small". (See https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=3786) git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@29236 f5534014-38df-0310-8fa8-9805f1628bb7
2009-07-27Improve defragmentation:wmeier1-51/+92
1. Prevent tcpencap (ipsec-tcp) from incorrectly dissecting NDMP PDU fragments; (Essentially: register NDMP as the dissector for the conversation); Allows correct NDMP fragment reassembly whether or not the TCP "Try heuristic sub-dissectors first" preference is enabled. Fixes Bug #3755 (https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=3755) 2. Use a registered init routine to init the fragment and reassembled tables each time a complete capture dissection is (re)started. Fixes a crash. 3. Don't register on TCP port 10000 since the tcpencap dissector needs to own this port. (The NDMP dissector is a heuristic dissector). 4. Strengthen the heuristic checking slightly. 5. Other minor changes. git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@29208 f5534014-38df-0310-8fa8-9805f1628bb7
2009-07-03Set save_fragmented regardless of whether we're reassembling or not, asguy1-3/+4
we restore it regardless of whether we're reassembling or not. git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@28938 f5534014-38df-0310-8fa8-9805f1628bb7
2009-07-03Fix:etxrab1-2/+2
packet-ndmp.c:562: warning: unused parameter 'pinfo' git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@28936 f5534014-38df-0310-8fa8-9805f1628bb7
2009-07-03From Chris Costa:etxrab1-40/+366
NDMP fragmentation fix. https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=3395 git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@28935 f5534014-38df-0310-8fa8-9805f1628bb7
2009-06-18From Kovarththanan Rajaratnam via bug 3548:stig1-39/+39
(1) Trailing/leading spaces are removed from 'name's/'blurb's (2) Duplicate 'blurb's are replaced with NULL (3) Empty ("") 'blurb's are replaced with NULL (4) BASE_NONE, NULL, 0x0 are used for 'display', 'strings' and 'bitmask' fields for FT_NONE, FT_BYTES, FT_IPv4, FT_IPv6, FT_ABSOLUTE_TIME, FT_RELATIVE_TIME, FT_PROTOCOL, FT_STRING and FT_STRINGZ field types (5) Only allow non-zero value for 'display' if 'bitmask' is non-zero git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@28770 f5534014-38df-0310-8fa8-9805f1628bb7
2009-05-19Avoid crash when not reassembling multiple TCP segments.stig1-5/+5
(check for valid pointers, in this case: ndmp_conv_data->task) This fixes the crash in bug #3470. git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@28409 f5534014-38df-0310-8fa8-9805f1628bb7
2009-05-08The convention is to use TFS(...) when specifying a true_false_string with ↵wmeier1-3/+1
an FT_BOOLEAN field; Also: use the global true_false_string tfs_yes_no in place of a static local string. git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@28321 f5534014-38df-0310-8fa8-9805f1628bb7
2009-05-01From Reinhard Speyerer:jake1-1/+1
This patch fixes several misspellings/typos in Wireshark SVN revision 28201. git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@28217 f5534014-38df-0310-8fa8-9805f1628bb7
2009-04-09From Chris Costa:etxrab1-12/+16
Patch for NDMP tape_get_state dissector. https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=3394 git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@28018 f5534014-38df-0310-8fa8-9805f1628bb7
2008-10-31Fix some "format not a string literal and no format arguments" warnings.stig1-1/+1
git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@26647 f5534014-38df-0310-8fa8-9805f1628bb7
2007-09-28add a function to test if a packet is ndmp or notsahlberg1-8/+22
git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@23007 f5534014-38df-0310-8fa8-9805f1628bb7
2007-09-28ndmp and tcp encapsulation of esp both use port 10000sahlberg1-0/+6
make ndmp a heuristic dissector so it will "win" over tcp esp if the packets look like ndmp and if "preferences/tcp/heuristic dissectors first has been chosen" git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@23006 f5534014-38df-0310-8fa8-9805f1628bb7
2007-03-27Fix a warning in packet-bittorrent.c I didn't fix right the first time and ↵sfisher1-1/+1
try to get the Win32 buildbot going again in packet-ndmp.c. git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@21238 f5534014-38df-0310-8fa8-9805f1628bb7
2007-03-11Fix bug 552:morriss1-34/+34
http://bugs.wireshark.org/bugzilla/show_bug.cgi?id=552 by enforcing that header fields have names of length > 0. This should fix the display of those fields and also make them filterable (which was the subject of the bug). Abbreviations are (still) optional: if they are empty then the field is not filterable. Update README.developer with this information. Add header field names in several dissectors where they were missing. In packet-arp.c give "packet-storm-detected" a name (as above) but also set it as _GENERATED. Also remove trailing white space from all the files checked in. git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@21018 f5534014-38df-0310-8fa8-9805f1628bb7
2006-10-31change the signature for the get_pdu_len() function pointer passed to ↵sahlberg1-1/+1
tcp_dissect_pdus() to also include a packet_info pointer. there are many reasons why some protocols actually need to be able to access the pinfo structure while determining the pdu size git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@19751 f5534014-38df-0310-8fa8-9805f1628bb7
2006-10-14set both read/write flags in ndmp scsi and also always set the expected ↵sahlberg1-0/+6
length to whatever length is transported inside the ndmp pdu this fixes a regression caused by the recent scsi data in/out reassembly code which made the scsi dissector fail to dissect data in/out over ndmp correctly if scsi reassembly was enabled git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@19525 f5534014-38df-0310-8fa8-9805f1628bb7
2006-10-13pass the relative data offset of data in/out pdu's to the scsi data in/out ↵sahlberg1-1/+3
dissector (dissect_scsi_payload) so that we can later add reassembly of data pdu's and also (if reassembly is disabled) only dissect the initial (offset==0) data pdu. dissect_scsi_payload() does not yet use this parameter. now that we have both data offset and expected data length/bidir expected data length and also the read/write flags availabe we have what we need to reassemble data in/out pdus (modulo overflow/underflow but those are so rare we can worry about them later). ndmp: ndmp conceptually always has a data in and a data out phase and never fragment the data into smaller pdu's os that dissector always report offset as 0. git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@19511 f5534014-38df-0310-8fa8-9805f1628bb7
2006-10-12wireshark does not yet consume enough memory for me to be happysahlberg1-0/+3
pass conversation form the transports up to the scsi layer add tracking of conversation specific info to scsi osd add tracking of conversation+lun specific info to scsi osd for scsi osd add tracking of PARTITIONS and display in which frame they were created/removed git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@19505 f5534014-38df-0310-8fa8-9805f1628bb7
2006-10-11add a task_flags bitmap and two lengths (data and bidirectional data)sahlberg1-0/+3
so that the two scsi transports FCP and ISCSI can provide the expected data transfer lengths to SCSI to allow SCSI reassembly. NDMP does not really need these hints since for NDMP (and also iscsi-lite) there is conceptually always both data in and data out phases and there is never any fragmentation. git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@19493 f5534014-38df-0310-8fa8-9805f1628bb7
2006-10-11move the ITL and the ITLQ structure to packet-scsi.h where it belongssahlberg1-1/+0
git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@19492 f5534014-38df-0310-8fa8-9805f1628bb7
2006-09-30add an extra_data pointer to the itlq structure where specific ↵sahlberg1-0/+1
commandsets/cdbs can hang additional data that are unique to that commandset/cdb make the scsi osd service action and getsetattributetype use this facility furhter enhancements to scsi osd git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@19374 f5534014-38df-0310-8fa8-9805f1628bb7
2006-08-14rename some structures and defines from the se_tree to the emem_tree prefixsahlberg1-4/+4
git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@18894 f5534014-38df-0310-8fa8-9805f1628bb7
2006-07-10Two more bugs from Ilja van Sprundel.gerald1-11/+11
packet-ndmp.c: Fix our payload length check. packet-nfs.c: Check for a maximum bitmap length. Fix up whitespace. git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@18699 f5534014-38df-0310-8fa8-9805f1628bb7
2006-06-30from aaron christensensahlberg1-1/+14
fix dissection of get_auth_attr git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@18619 f5534014-38df-0310-8fa8-9805f1628bb7
2006-06-17allocate the correct size of buffer to store the itlq structure for scsisahlberg1-1/+1
we used the wrong size which caused emem to complain that the canary value had been stomped upon. another win for the canary feature. thanks gerald git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@18491 f5534014-38df-0310-8fa8-9805f1628bb7
2006-06-17make ndmp track itl structuressahlberg1-6/+32
everytime a ndmp_[scsi|tape]_open is seen create a new itl we need an itl structure to be able to know what commandset a certain device is using. git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@18490 f5534014-38df-0310-8fa8-9805f1628bb7
2006-05-21change a whole bunch of ethereal into wiresharksahlberg1-2/+2
git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@18196 f5534014-38df-0310-8fa8-9805f1628bb7
2006-05-09Make top_tree static. This allows ethereal to be built on Mac OS X.tuexen1-1/+1
git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@18113 f5534014-38df-0310-8fa8-9805f1628bb7
2006-05-08use request/response tracking structure from NDMP and hang a scsi itlq nexus ↵sahlberg1-32/+35
off it so that cdb/datain/dataout/response tracking for scsi forks also for the ndmp transport. git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@18105 f5534014-38df-0310-8fa8-9805f1628bb7
2006-05-08add tracking of request/response and responsetime to ndmpsahlberg1-0/+69
we need this in order to be able to provide proper itlq structures to the scsi dissector so that response data from scsi is dissected properly. git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@18104 f5534014-38df-0310-8fa8-9805f1628bb7
2006-04-26add tracking of ndmp conversations and use this to track the version used if ↵sahlberg1-45/+64
we have seen the CONNECT_OPEN request. rename the preference to DEFAULT protocol version to indicate it is only used for those conversation where we have not automatically detected the version used. git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@18003 f5534014-38df-0310-8fa8-9805f1628bb7
2006-04-26 NOTIFY_[DATA|MOVER]_HALTED requests no longer take an XDR string containing ↵sahlberg1-4/+29
the reason for version 4 of ndmp and forward. git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@18002 f5534014-38df-0310-8fa8-9805f1628bb7
2006-04-24change the signature for dissect_scsi_snsinfo() to take itlq and itl structuressahlberg1-1/+11
update the comment in packet-scsi.c to reflect that it is the transport now that is responsible to track itl and itlq data make scsi tapable git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@17974 f5534014-38df-0310-8fa8-9805f1628bb7
2006-04-22the scsi transports (fc/fcp and iscsi) now track both itl and itlqsahlberg1-13/+0
structures for scsi. we no longer need the scsi_task_id structure passed by pinfo->private_data so get rid of it. we no longer need the (broken by design) scsi_task_data hash table since this has been replaced byt hte itl and itlq structures and tracking git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@17952 f5534014-38df-0310-8fa8-9805f1628bb7
2006-04-21remover the lun parameter from dissect_scsi_cdb/payload since this is now ↵sahlberg1-2/+21
part of the exchange data in itlq remove the two fields opcode and devtype from the scsi_task_data structure since these are also part of the itlq and itl structures git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@17949 f5534014-38df-0310-8fa8-9805f1628bb7
2006-04-21updates to get the fc and scsi dissectorssahlberg1-2/+2
and get rid of some breakage in the design let the scsi transport keep track of itl (initiator, target, lun) matching and let it pass a itl structure to scsi that is persistent across packets. let scsi use this itl structure to track device type for a specific itl instead of the (must have been) broken hashtable. update both iscsi and fc to track the itl structure for scsi and schange the scsi signature to accept itl as a parameter. more to come. git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@17942 f5534014-38df-0310-8fa8-9805f1628bb7
2006-04-07make dissect_scsi_rsp() take an exchange structure as parameter instead of ↵sahlberg1-0/+1
just a lun. this finally allows us to have scsi.time for scsi transactions but we need to cleanup and refactor the other three scsi entrypoints before we should implement scsi srt to make the other three also take an exchange data structure as parameter from their transports (and get rid of the pinfo->private_data ) git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@17838 f5534014-38df-0310-8fa8-9805f1628bb7
2006-03-20waste a couple of bytes per tcp conversation and make the tree for ↵sahlberg1-0/+1
acked_packets (i.e. packets that have interesting tcp properties such as being retransmissions etc) hang off the per conversation tcpd struct instead of being global. while this should improve performance by unmeasurably little it does have the sideeffect that once we finish the rewrite tcp analysis might actually work and work well even for tcp over tcp tunnelling. this also means that if you include packet-tcp.h you also need to include emem.h . git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@17681 f5534014-38df-0310-8fa8-9805f1628bb7
2005-09-28fix #480: Change defaults for all reassembling settings to ONulfl1-1/+1
I've changed all settings I could find to TRUE. It might be reasonable to change some protocol settings back to FALSE, if reassembling fails very often. git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@16048 f5534014-38df-0310-8fa8-9805f1628bb7
2005-09-17Move some headers for stuff defined by a dissector into epan/dissectorsguy1-9/+7
- and rename smb.h to packet-smb.h, as it's packet-smb.c's header file. git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@15845 f5534014-38df-0310-8fa8-9805f1628bb7
2005-09-17Move a pile of protocol-related headers from the top-level sourceguy1-1/+1
directory to the epan directory. Some of them should perhaps ultimately be moved to epan/dissectors, if they pertain only to stuff exported by a particular dissector. Fix Gerald's e-mail address in files we're moving. git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@15844 f5534014-38df-0310-8fa8-9805f1628bb7
2005-08-05More char -> const char warning fixesjmayer1-1/+1
git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@15218 f5534014-38df-0310-8fa8-9805f1628bb7
2005-05-29remove offset and len from the signature of dissect_scsi_payload()sahlberg1-2/+13
git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@14473 f5534014-38df-0310-8fa8-9805f1628bb7
2005-05-29make all callers of dissect_scsi_cdb() first create a new subset tvbsahlberg1-1/+11
change the signature for dissect_scsi_cdb since we no longer need to pass offset over. git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@14472 f5534014-38df-0310-8fa8-9805f1628bb7
2005-05-12Fix a routine to return the value it's supposed to return.guy1-0/+1
git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@14354 f5534014-38df-0310-8fa8-9805f1628bb7
2005-04-29add the missing MODE field in mover_get_state that was introduced in version 4.sahlberg1-5/+13
also change bytes_left_to_read to be a INT64 and not a UINT64. It iss supposed to be an UINT64 but some implementations are buggy and it is easier to make sense of this field one for those buggy clients if it is printed as an INT64. This change/violation will not affect any correct/valid NDMP implementation or how ethereal decodes its output unless your entire backup is > 2**63 bytes in size. git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@14228 f5534014-38df-0310-8fa8-9805f1628bb7