aboutsummaryrefslogtreecommitdiffstats
path: root/epan/dissectors/packet-smb.c
AgeCommit message (Collapse)AuthorFilesLines
2011-10-24Fix encoding arg for various fcn calls:wmeier1-1/+1
- proto_tree_add_bits_item - proto_tree_add_bits_ret_val - proto_tree_add_bitmask - tvb_get_bits - tvb_get_bits16 - tvb_get_bits24 - tvb_get_bits32 - tvb_get_bits64 git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@39539 f5534014-38df-0310-8fa8-9805f1628bb7
2011-10-21For proto_tree_add_item(..., proto_xxx, ...)use ENC_NA as the encoding arg.wmeier1-1/+1
Also: remove trailing whitespace for a number of files. git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@39503 f5534014-38df-0310-8fa8-9805f1628bb7
2011-10-15Convert proto_tree_add_item() 'encoding' arg for field types FT_STRING, ↵wmeier1-9/+9
FT_STRINGZ, FT_UINT_STRING as follows: 1. If there's no character encoding (ENC_ASCII, ...) specified then use ENC_ASCII. 2. For all but FT_UINT_STRING, always use ENC_NA (replacing any existing True/1/FALSE/0 /ENC_BIG_ENDIAN/ENC_LITTLE_ENDIAN). git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@39426 f5534014-38df-0310-8fa8-9805f1628bb7
2011-10-04Use ENC_NA as encoding for proto_tree_add_item() calls which directly ↵wmeier1-3/+3
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 git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@39260 f5534014-38df-0310-8fa8-9805f1628bb7
2011-10-01Set encoding.etxrab1-463/+463
Should hf_smb_server_guid hf_smb_dfs_referral_server_guid be FT_GUIDS? git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@39209 f5534014-38df-0310-8fa8-9805f1628bb7
2011-10-01From Stefan Metzmacher: Support for SMB 2.22 features;wmeier1-18/+34
"Patches to add most things for SMB 2.22" https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=6394 git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@39205 f5534014-38df-0310-8fa8-9805f1628bb7
2011-09-08From Stefan Metzmacher: Fix flags in packet-smbwmeier1-25/+60
https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=6320 git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@38940 f5534014-38df-0310-8fa8-9805f1628bb7
2011-08-16Initialize trunc.stig1-1/+1
Fix CID 1229. git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@38572 f5534014-38df-0310-8fa8-9805f1628bb7
2011-05-27Treat TVBs as opaque: use the accessor functions instead of accessing the fieldsmorriss1-10/+17
directly. git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@37420 f5534014-38df-0310-8fa8-9805f1628bb7
2011-05-20Use tvb_get_ephemeral_string() instead of tvb_get_ptr().morriss1-3/+3
git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@37322 f5534014-38df-0310-8fa8-9805f1628bb7
2011-05-19Give some routines used for info levels that appear both in set and getguy1-70/+174
names beginning with dissect_qspi_, and give some of them names with the info level structure in them rather than the SNIA CIFS specification section number. Have separate routines for SMB_INFO_STANDARD and SMB_INFO_QUERY_EA_SIZE; SMB_INFO_STANDARD is specified differently in the SNIA CIFS specification and the MS-CIFS specification, and some captures have the SNIA CIFS version, with the EA length and some have the MS-CIFS version without it. The dissector for SMB_INFO_STANDARD will dissect it if it's there and not say "this structure is truncated" if it's not there. Rename dissect_qfi_SMB_FILE_ALTERNATE_NAME_INFO() to dissect_qfi_SMB_FILE_NAME_INFO(), as it also dissects SMB_QUERY_FILE_NAME_INFO. Merge the dissectors for SMB_FILE_ALLOCATION_INFO and SMB_SET_FILE_ALLOCATION_INFO, and for SMB_FILE_END_OF_FILE_INFO and SMB_SET_FILE_END_OF_FILE_INFO, as the structures are the same. Dissect some presumed "passthrough info levels" the same way the corresponding official SMB infos are dissected. Expand some comments for info level dissectors to give the MS-CIFS section number and to give some other details. If an info level is truncated, put in an expert info error. If we don't know about a given info level, just dissect the body as "Information level unknown", rather than having it dissected as an "unknown information" trailer. git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@37297 f5534014-38df-0310-8fa8-9805f1628bb7
2011-05-19The routines declared in packet-smb.h are defined in packet-smb.c;guy1-55/+54
include packet-smb.h in packet-smb.c so that we check the declarations against the definitions. In query ops, info level 2 is Query EA Size, not Query EAs From List. In set ops, info level 2 is Set EAs, not Query EA Size. Expand the constants for the Trans2 subcodes to 16 bits. The tvb argument to dissect_find_file_unix_info2() is used. git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@37286 f5534014-38df-0310-8fa8-9805f1628bb7
2011-05-17Don't leave the truncation flag unset in any of the info levelguy1-6/+14
dissectors. git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@37209 f5534014-38df-0310-8fa8-9805f1628bb7
2011-05-16Give the UNIX-extension routines used for info levels that appear bothguy1-20/+20
in set and get names beginning with dissect_qspi_. git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@37192 f5534014-38df-0310-8fa8-9805f1628bb7
2011-05-16Fix some comments.guy1-18/+31
Get rid of null-pointer tests for t2i in the "not null" branch of an earlier test whether it's null, as those tests are redundant. Use a switch statement to check the subcommand for Trans2. If t2i->info_level is -1, it means we don't know the info level, for whatever reason (e.g., the request was cut short by the snapshot length before the info level). Report it as such. git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@37183 f5534014-38df-0310-8fa8-9805f1628bb7
2011-05-14Remove the qpi_ from info level dissectors used for set info calls asguy1-16/+16
well. git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@37139 f5534014-38df-0310-8fa8-9805f1628bb7
2011-05-14For Find File Unix and Unix Info2, spell it "Unix", to match Query Fileguy1-219/+181
and Set File. Add Query and Set File Unix Info2; use common code to dissect the Unix Info2 structure. Use common code for Unix Basic, while we're at it. git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@37138 f5534014-38df-0310-8fa8-9805f1628bb7
2011-05-12Fix the test.sh failures based on Guy's suggestion in ↵morriss1-1/+1
https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=5445#c15 : Add a new tap flag to indicate that a tap listener is just a "dissector helper", that is, a tap which is used by a dissector to help it do its dissection but does not, itself, require dissection. Use this new flag in the dissectors which register taps. Remove the (now-unused) have_tap_listeners() function. git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@37069 f5534014-38df-0310-8fa8-9805f1628bb7
2011-05-09Support SMB_FIND_FILE_UNIX_INFO2.guy1-8/+298
Don't use "link destination" for file names in SMB_FIND_FILE_UNIX. Link to the page for Microsoft's public protocol specifications and to the Samba Wiki page for the UNIX extensions. Fix a typo in a variable name. git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@37023 f5534014-38df-0310-8fa8-9805f1628bb7
2011-05-09Count padding bytes against the transaction data byte count.guy1-2/+5
git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@37022 f5534014-38df-0310-8fa8-9805f1628bb7
2011-04-26Fix Dead Store (Dead assignement/Dead increment) Warning found by Clangalagoutte1-27/+20
git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@36872 f5534014-38df-0310-8fa8-9805f1628bb7
2011-04-16Add NULL checks. Fixes Coverity CIDs 509 and 510.gerald1-3/+9
git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@36670 f5534014-38df-0310-8fa8-9805f1628bb7
2011-04-13Comment out code to create a subtree since it's (currently ?) unused: ↵wmeier1-21/+19
Coverity 1039; Don't assign to a proto_item * if the value won't be used: Coverity 1040 & 1041. Remove some unneede #includes; Do some minor indentation & whitespace cleanup. git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@36630 f5534014-38df-0310-8fa8-9805f1628bb7
2011-03-27Added a FALLTHRU comment to avoid a "missing break" warning.stig1-1/+2
Coverity 472. git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@36366 f5534014-38df-0310-8fa8-9805f1628bb7
2011-02-10Modify proto_tree_add_bytes_format() and proto_tree_add_bytes_format_value()morriss1-3/+2
so that if the start_ptr is NULL the bytes are extracted from the given TVB using the given offset and length. Replace a bunch of: proto_tree_add_bytes_format*(tree, hf, tvb, offset, length, tvb_get_ptr(tvb, offset, length), [...]) with: proto_tree_add_bytes_format*(tree, hf, tvb, offset, length, NULL, [...]) git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@35896 f5534014-38df-0310-8fa8-9805f1628bb7
2011-01-30Introduce "Fragment count" filter element for all protocols doing reassembly.stig1-0/+6
git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@35705 f5534014-38df-0310-8fa8-9805f1628bb7
2011-01-16There's no need to pass the result of tvb_get_ptr() as the 'value' inmorriss1-2/+1
proto_tree_add_*(): just use proto_tree_add_item(). Replace some tvb_get_ptr()s with tvb_get_ephemeral_string() or tvb_get_const_stringz(). Use tvb_memeql() & tvb_memcmp(). git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@35558 f5534014-38df-0310-8fa8-9805f1628bb7
2010-12-23Proof of concept for using new tvb_get_ephemeral_unicode_stringz(), which wassfisher1-1/+5
just introduced in SVN revision 35253. This new function has many more uses in the SMB (and other) dissectors. git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@35254 f5534014-38df-0310-8fa8-9805f1628bb7
2010-12-20Rename the routines that handle dissector tables with unsigned integerguy1-7/+7
keys to have _uint in their names, to match the routines that handle dissector tables with string keys. (Using _port can confuse people into thinking they're intended solely for use with TCP/UDP/etc. ports when, in fact, they work better for things such as Ethernet types, where the binding of particular values to particular protocols are a lot stronger.) git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@35224 f5534014-38df-0310-8fa8-9805f1628bb7
2010-12-06Fix various typos and spelling errors.wmeier1-9/+9
git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@35126 f5534014-38df-0310-8fa8-9805f1628bb7
2010-11-12Fix a crash I introduced in SVN #34692: A value_string ext referenced ↵wmeier1-1/+1
smb_cmd_vals rather than smb_cmd_vals_ext. git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@34853 f5534014-38df-0310-8fa8-9805f1628bb7
2010-10-29Use value_string_ext fcns to access certain value_string arrays.wmeier1-30/+39
git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@34692 f5534014-38df-0310-8fa8-9805f1628bb7
2010-10-27Fix the disssector assertion reported in ↵morriss1-5/+5
https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=3877 : The rest of the code assumes that sip can be NULL, so don't assert when it's not. Also make fid_cmp() static since it's only used in this module. git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@34663 f5534014-38df-0310-8fa8-9805f1628bb7
2010-10-22packet-smb.c:890: warning: data definition has no type or storage classetxrab1-1/+1
git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@34615 f5534014-38df-0310-8fa8-9805f1628bb7
2010-10-22From CaL Turney:etxrab1-1/+7
Add support for well-known SIDs/RIDs and option to display in hex. https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=5286 git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@34613 f5534014-38df-0310-8fa8-9805f1628bb7
2010-09-24(Refining the regexp...) Replace blurbs that match the name (case ↵morriss1-1/+1
insensitive) with NULL. git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@34230 f5534014-38df-0310-8fa8-9805f1628bb7
2010-09-23Replace blurbs that match the name (case insensitive) with NULL.morriss1-10/+10
git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@34227 f5534014-38df-0310-8fa8-9805f1628bb7
2010-08-10Dissect SMB_FILE_ATTRIBUTES, when used as file attributes rather thanguy1-66/+41
search attributes, as a 16-bit quantity, with only the bits specified by section 2.2.1.2.4 of [MS-CIFS]. Use dissect_file_ext_attr() in all cases where we're dissecting SMB_EXT_FILE_ATTR, as specified by section 2.2.1.2.3 of [MS-CIFS]. git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@33753 f5534014-38df-0310-8fa8-9805f1628bb7
2010-08-06From Tan Kean Siong:jake1-5/+89
Dissect the SMB Tree_Connect_Andx Request and Response properly with extension request and response which are documented in [MS-SMB] — v20100711 git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@33726 f5534014-38df-0310-8fa8-9805f1628bb7
2010-07-10Fix for bug 4993:jake1-1/+1
Mac support flags are little endian too. git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@33483 f5534014-38df-0310-8fa8-9805f1628bb7
2010-06-18OK, I checked the Microsoft spec; give some information on that.guy1-3/+17
git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@33249 f5534014-38df-0310-8fa8-9805f1628bb7
2010-06-17Expand some comments.guy1-1/+8
git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@33248 f5534014-38df-0310-8fa8-9805f1628bb7
2010-06-16Handle 64-bit file offsets in ReadAndX and WriteAndX.guy1-34/+47
git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@33240 f5534014-38df-0310-8fa8-9805f1628bb7
2010-06-15Remove #include <inttypes.h>.stig1-2/+0
git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@33228 f5534014-38df-0310-8fa8-9805f1628bb7
2010-06-15From David Perez & Jose Pico from Taddong S.L. via bug 4451:stig1-7/+225
This functionality keeps track of all SMB objects contained in a capture, and is able to export to a file a full or partial captured file that has been transfered through the SMB protocol. In a partial capture, the holes produced by the non-captured information are filled out with zeros. It includes the needed modifications of the SMB dissector in the way it keeps track of the opened SMB files and also to feed the eo_smb tap listener. git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@33227 f5534014-38df-0310-8fa8-9805f1628bb7
2010-05-13As suggested in ↵morriss1-7/+1
http://www.wireshark.org/lists/wireshark-dev/200809/msg00075.html (as referenced in https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=2907 ) and https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=3411 : Write a new convenience routine for finding a conversation and, if it is not found, create it. The frame number and addresses are taken from pinfo (as is the common case). Use this function in a bunch of dissectors. git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@32790 f5534014-38df-0310-8fa8-9805f1628bb7
2010-05-03Fix https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=4734 :morriss1-2/+3
Don't crash on a malformed SMB packet. According to svn blame, this code has been here since rev 21713 though maybe something else changed to make the crash apparent. git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@32650 f5534014-38df-0310-8fa8-9805f1628bb7
2010-04-03Remove unneeded #include <stdio.h>wmeier1-2/+0
git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@32367 f5534014-38df-0310-8fa8-9805f1628bb7
2010-02-06Renamed some reassembled data texts.stig1-1/+1
Removed some check_col(). git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@31809 f5534014-38df-0310-8fa8-9805f1628bb7
2010-02-02Introduce "Reassembled length" filter element for all protocols doingstig1-1/+6
reassembly. git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@31767 f5534014-38df-0310-8fa8-9805f1628bb7