Commit Graph

190 Commits

Author SHA1 Message Date
Jeff Morriss 8d32d2066a There's no need to pass the result of tvb_get_ptr() as the 'value' in
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().

svn path=/trunk/; revision=35558
2011-01-16 20:51:21 +00:00
Stephen Fisher 3bd641004b Proof of concept for using new tvb_get_ephemeral_unicode_stringz(), which was
just introduced in SVN revision 35253.  This new function has many more uses
in the SMB (and other) dissectors. 


svn path=/trunk/; revision=35254
2010-12-23 18:01:28 +00:00
Guy Harris a8bc4a0d13 Rename the routines that handle dissector tables with unsigned integer
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.)

svn path=/trunk/; revision=35224
2010-12-20 05:35:29 +00:00
Bill Meier 03b57df5a0 Fix various typos and spelling errors.
svn path=/trunk/; revision=35126
2010-12-06 01:34:58 +00:00
Bill Meier e2123574dc Fix a crash I introduced in SVN #34692: A value_string ext referenced smb_cmd_vals rather than smb_cmd_vals_ext.
svn path=/trunk/; revision=34853
2010-11-12 17:28:01 +00:00
Bill Meier f543357d14 Use value_string_ext fcns to access certain value_string arrays.
svn path=/trunk/; revision=34692
2010-10-29 20:22:02 +00:00
Jeff Morriss 505fbf012a Fix the disssector assertion reported in 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.

svn path=/trunk/; revision=34663
2010-10-27 21:08:49 +00:00
Anders Broman 58be4653b4 packet-smb.c:890: warning: data definition has no type or storage class
svn path=/trunk/; revision=34615
2010-10-22 05:47:01 +00:00
Anders Broman 9c9db7d4d4 From CaL Turney:
Add support for well-known SIDs/RIDs and option to display in hex.
https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=5286

svn path=/trunk/; revision=34613
2010-10-22 05:15:25 +00:00
Jeff Morriss cca3ba3ce2 (Refining the regexp...) Replace blurbs that match the name (case insensitive) with NULL.
svn path=/trunk/; revision=34230
2010-09-24 02:51:40 +00:00
Jeff Morriss 0ff5638f37 Replace blurbs that match the name (case insensitive) with NULL.
svn path=/trunk/; revision=34227
2010-09-23 21:46:31 +00:00
Guy Harris 9a45206220 Dissect SMB_FILE_ATTRIBUTES, when used as file attributes rather than
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].

svn path=/trunk/; revision=33753
2010-08-10 07:04:20 +00:00
Jaap Keuter 4853835a36 From Tan Kean Siong:
Dissect the SMB Tree_Connect_Andx Request and Response properly with
extension request and response which are documented in [MS-SMB] — v20100711

svn path=/trunk/; revision=33726
2010-08-06 17:46:27 +00:00
Jaap Keuter f33d886525 Fix for bug 4993:
Mac support flags are little endian too.

svn path=/trunk/; revision=33483
2010-07-10 09:47:20 +00:00
Guy Harris 6aba7f7109 OK, I checked the Microsoft spec; give some information on that.
svn path=/trunk/; revision=33249
2010-06-18 03:25:33 +00:00
Guy Harris 76dbfe68c5 Expand some comments.
svn path=/trunk/; revision=33248
2010-06-17 21:41:03 +00:00
Guy Harris 02ef0696ed Handle 64-bit file offsets in ReadAndX and WriteAndX.
svn path=/trunk/; revision=33240
2010-06-16 20:00:22 +00:00
Stig Bjørlykke 560424e4b8 Remove #include <inttypes.h>.
svn path=/trunk/; revision=33228
2010-06-15 15:32:19 +00:00
Stig Bjørlykke e915e93532 From David Perez & Jose Pico from Taddong S.L. via bug 4451:
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.

svn path=/trunk/; revision=33227
2010-06-15 14:03:49 +00:00
Jeff Morriss 729de1a635 As suggested in 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.

svn path=/trunk/; revision=32790
2010-05-13 18:28:34 +00:00
Jeff Morriss 619ba9e3ce Fix https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=4734 :
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.

svn path=/trunk/; revision=32650
2010-05-03 19:33:23 +00:00
Bill Meier 09764dd969 Remove unneeded #include <stdio.h>
svn path=/trunk/; revision=32367
2010-04-03 21:55:23 +00:00
Stig Bjørlykke 539b558f8c Renamed some reassembled data texts.
Removed some check_col().

svn path=/trunk/; revision=31809
2010-02-06 18:20:21 +00:00
Stig Bjørlykke 88b72356ad Introduce "Reassembled length" filter element for all protocols doing
reassembly.

svn path=/trunk/; revision=31767
2010-02-02 16:01:52 +00:00
Bill Meier 73eb16d678 Fix some gcc -Wshadow warnings
svn path=/trunk/; revision=31623
2010-01-22 17:41:47 +00:00
Stig Bjørlykke 31b77bac8a Use different abbrev for unknown data and unknown field.
svn path=/trunk/; revision=31429
2010-01-03 15:08:18 +00:00
Guy Harris 8e236e55de For fields of type FT_ABSOLUTE_TIME, have the "display" value be one of
ABSOLUTE_TIME_LOCAL or ABSOLUTE_TIME_UTC, indicating whether to display
the date/time in local time or UTC. (int)ABSOLUTE_TIME_LOCAL ==
(int)BASE_NONE, so there's no source or binary compatiblity issue,
although we might want to eliminate BASE_NONE at some point and have the
BASE_ values used with integral types start at 0, so that you can't
specify BASE_NONE for an integral field.

svn path=/trunk/; revision=31319
2009-12-19 03:17:44 +00:00
Stig Bjørlykke 7aa873dae6 A fix for bug 4301:
Check sip->extra_info for SMB_EI_NTI before usage.

svn path=/trunk/; revision=31187
2009-12-07 15:07:38 +00:00
Gerasimos Dimitriadis c840cdd5a0 Remove the address operator from value_string arrays fed to VALS()
svn path=/trunk/; revision=30995
2009-11-17 18:35:27 +00:00
Jaap Keuter be342f9e26 From Bernard Imbert:
If the "Level Of Interest" referenced in the smb.trans2.FIND_FIRST/FIND_NEXT
requests is 262, wireshark is unable to decode properly (neither the request
nor the response).

svn path=/trunk/; revision=30923
2009-11-10 19:24:50 +00:00
Jeff Morriss 2d8acf2a74 Fix an off-by-one error (<= instead of <) that caused the dissector to
reference uninitialized memory, possibly leading to a crash (found by turning
memory scrubbing on).

svn path=/trunk/; revision=30595
2009-10-18 14:46:39 +00:00
Ronnie Sahlberg 2ee73bdf0c add proper support for infolevel 105 for ff
they are different.


svn path=/trunk/; revision=30568
2009-10-16 06:17:55 +00:00
Ronnie Sahlberg 9339cf747c add dissection of infolevel 0x105 for findfirst
this is actually identical to infolevel 0x104 in smb  while they differ 
in smb2


svn path=/trunk/; revision=30567
2009-10-16 05:31:43 +00:00
Jaap Keuter 75f1e13c12 Cleanup header fields.
svn path=/trunk/; revision=30394
2009-10-07 23:08:22 +00:00
Kovarththanan Rajaratnam 65c53fedb6 Don't guard col_append_str with check_col
svn path=/trunk/; revision=30125
2009-09-24 20:00:21 +00:00
Kovarththanan Rajaratnam ebaaada382 Only duplicate string the first time around, i.e. 'pinfo->fd->flags.visited == FALSE' or else we end up leaking memory
svn path=/trunk/; revision=30013
2009-09-20 13:36:16 +00:00
Bill Meier 6f004d3f46 From yami<yamisoe At ...>: Fix Bug #3542: get_dfs_referral referral entry is not dissected corectly.
(See https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=3542)

The current get_dfs_referral response code is based on old protocol specs,
which are unofficial, erroneous. 

I modify packet-smb.c to be confirm to protocol's official spec. Some
changes are:

  1. handle referral entry version 2, 3, 4 separately. The current code does
not distinguish v3 from v2, however they are not same.
  2. change server type, referral flags etc.
  3. refactor some code, such as string dissecting.

Also: From me: a small change to handle possible overflow
when subtracting from a guint16.


svn path=/trunk/; revision=29986
2009-09-18 22:41:04 +00:00
Kovarththanan Rajaratnam 8b515e9340 Switch a bunch of dissectors over to using tvb_new_subset_remaining()
svn path=/trunk/; revision=29446
2009-08-16 12:36:22 +00:00
Kovarththanan Rajaratnam ac463d2697 Don't guard col_clear with col_check
svn path=/trunk/; revision=29346
2009-08-09 08:14:59 +00:00
Kovarththanan Rajaratnam 6110a96f68 Don't guard col_set_str (COL_INFO/COL_PROTOCOL) with col_check
svn path=/trunk/; revision=29345
2009-08-09 07:59:51 +00:00
Stig Bjørlykke 4d8dd01e8e Changed flags_set_truth -> tfs_set_notset
svn path=/trunk/; revision=28989
2009-07-07 14:54:15 +00:00
Stig Bjørlykke 0437f102c3 From Kovarththanan Rajaratnam:
More FT_XXX cleanup.

svn path=/trunk/; revision=28971
2009-07-07 09:02:59 +00:00
Stig Bjørlykke b228488bc0 From Kovarththanan Rajaratnam via bug 3548:
(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

svn path=/trunk/; revision=28770
2009-06-18 21:30:42 +00:00
Guy Harris cf91fdf16b Have tap listeners specify whether the "packet" routine requires
a protocol tree;

	the column values.

This includes stats-tree listeners.

Have the routines to build the packet list, and to retap packets, honor
those requirements.  This means that cf_retap_packets() no longer needs
an argument to specify whether to construct the column values or not, so
get rid of that argument.

This also means that there's no need for a tap to have a fake filter
to ensure that the protocol tree will be built, so don't set up a fake
"frame" filter.

While we're at it, clean up some cases where "no filter" was represented
as a null string rather than a null pointer.

Have a routine to return an indication of the number of tap listeners
with filters; use that rather than the global num_tap_filters.

Clean up some indentation and some gboolean vs. gint items.

svn path=/trunk/; revision=28645
2009-06-05 22:42:47 +00:00
Anders Broman b4aeb97ed5 tvb_new_real_data -> tvb_new_child_real_data
svn path=/trunk/; revision=28517
2009-05-29 06:16:43 +00:00
Stig Bjørlykke 0258be0b05 From Jakub Zawadzki:
More remove checking for NULL before g_free().

svn path=/trunk/; revision=27728
2009-03-15 18:08:46 +00:00
Gerald Combs 6d04f793f0 Back out r27047 and r27053.
svn path=/trunk/; revision=27062
2008-12-19 17:39:52 +00:00
Gerald Combs fc71188963 Update calls to proto_tree_add_bytes_format to reflect r27047.
svn path=/trunk/; revision=27053
2008-12-18 20:19:49 +00:00
Bill Meier 33c99f44fd Fix typos and spelling (mostly in text strings)
svn path=/trunk/; revision=27028
2008-12-17 00:08:38 +00:00
Gerald Combs 5f9afcd2c1 Squelch a couple of Valgrind warnings.
svn path=/trunk/; revision=26946
2008-12-09 17:16:20 +00:00