Commit Graph

166 Commits

Author SHA1 Message Date
Chris Maynard 8fdfd98ad7 Fix a comment. Correct a few typos.
svn path=/trunk/; revision=40303
2011-12-27 17:46:25 +00:00
Bill Meier 30cee99009 Fix a number of proto_tree_add_item() encoding args.
svn path=/trunk/; revision=39774
2011-11-09 17:33:18 +00:00
Bill Meier 794757ae8f For proto_tree_add_item(..., proto_xxx, ...)use ENC_NA as the encoding arg.
Also: remove trailing whitespace for a number of files.

svn path=/trunk/; revision=39503
2011-10-21 02:10:19 +00:00
Jeff Morriss 56981d384d From Dirk Jagdmann via https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=6450 :
Several updates to the DCE/RPC dissector:

- changed the variable name "ndr64_uuid" to "uuid_ndr64" to make it similar the
the other UUID variable names. Minor changes to the UUID names.

- changes the UUID name for the 32bit NDR to describe that. In the DCE/RPC
standard this UUID is described as "Version 1.1 network data representation
protocol", but this is an unnecessarily long name and it's the only 32bit
version defined for DCE/RPC anyway. The new name "32bit NDR" is similar to the
changed name for the 64bit NDR.

- added an UUID for "bind time feature negotiation" found with Microsoft PDUs.

- added an UUID for "asynchonous MAPI". Of course this UUID/name should be
added to the MAPI dissector, but the MAPI dissector is generated C code from
Samba/OpenChange pidl sources. Eventually those might get updated. An
alternative would be to create a new file to specifically register UUIDs used
in the DCE/RPC context.

- when the g_hash_table_insert() function is used, I've removed the code to
lookup and remove the key, as g_hash_table_insert() is doing that internally
(or more precise, it is overwriting the old value).

- in the dissector function for Bind and BindAck, I now print all context items
into COL_INFO and not just the first one.

- added a new value for Bind results, used by Microsoft products. (The
"Negotiate ACK" is used with the "bind time feature negotiation" UUID)

svn path=/trunk/; revision=39455
2011-10-18 01:51:01 +00:00
Bill Meier 126aa85393 Convert proto_tree_add_item() 'encoding' arg for field types FT_STRING, 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).



svn path=/trunk/; revision=39426
2011-10-15 18:46:26 +00:00
Bill Meier 4e57694d4a Convert 'encoding' parameter of certain proto_tree_add_item() calls in non-autogenerated epan/dissectors:
Specifically:  Replace FALSE|0 and TRUE|1 by ENC_BIG_ENDIAN|ENC_LITTLE_ENDIAN as
 the encoding parameter for proto_tree_add_item() calls which directly reference
 an item in hf[] which has a type of:
    FT_UINT8
    FT_UINT16
    FT_UINT24
    FT_UINT32
    FT_UINT64
    FT_INT8
    FT_INT16
    FT_INT24
    FT_INT32
    FT_INT64
    FT_FLOAT
    FT_DOUBLE


svn path=/trunk/; revision=39288
2011-10-06 03:35:44 +00:00
Bill Meier 94f36ca4ff Use ENC_NA as encoding for proto_tree_add_item() calls which directly 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

svn path=/trunk/; revision=39260
2011-10-04 22:44:31 +00:00
Gerald Combs 5e67ca6f69 From Dirk Jagdmann: Protect the RTS info column.
svn path=/trunk/; revision=38487
2011-08-11 16:38:45 +00:00
Guy Harris c34b796445 Add a DREP_LITTLE_ENDIAN for the DCE RPC endianness bit in the data
representation.  Use it rather than a raw 0x10.

Add a DREP_ENC_INTEGER() macro that takes a pointer to the data
representation and returns either ENC_LITTLE_ENDIAN or ENC_BIG_ENDIAN;
use it for the encoding argument to proto_tree_add_item(), rather than
just the AND of drep[0] and DREP_LITTLE_ENDIAN, as it's not a boolean
any more, and for string values we'll be supporting character encodings
as well and thus won't be able to trust that the 0x10 bit will mean
"little endian".

Use ENC_NA for some other encoding values, i.e. for FT_BYTES and the
like.

Fix a couple of places in the DCOM dissector where we were passing the
byte-order bit rather than the field value to
proto_tree_add_uint_format().

Clean up white space.

svn path=/trunk/; revision=38128
2011-07-19 23:02:02 +00:00
Chris Maynard f6a11de61f Delete unused header field entries found by running checkhf.pl.
svn path=/trunk/; revision=37353
2011-05-23 00:32:40 +00:00
Chris Maynard 609c3dd0d4 From Micheal Mann via bug 2794: Fix some display filter field names.
svn path=/trunk/; revision=37351
2011-05-23 00:00:53 +00:00
Anders Broman 05172d4476 From Dirk:
The attachted patch cleans up the output of DCE/RPC fragment information in the
dissector.
https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=5772

From me get rid of check_col()

svn path=/trunk/; revision=36665
2011-04-16 16:00:02 +00:00
Gerald Combs c223ebe718 Fix more Visual C++ analysis errors.
svn path=/trunk/; revision=35995
2011-02-18 01:18:44 +00:00
Stig Bjørlykke 84bc28bd6a Introduce "Fragment count" filter element for all protocols doing reassembly.
svn path=/trunk/; revision=35705
2011-01-30 21:01:07 +00:00
Stephen Fisher 316cd69642 Fix warning found by clang...
packet-dcerpc.c:4056:19: error: comparison of integers of different signs:
      'guint32' (aka 'unsigned int') and 'int' [-Wsign-compare]
    for (i = 0; i < (int) commands_nb; ++i) {
                ~ ^ ~~~~~~~~~~~~~~~~~

... by removing the "(int)" cast


svn path=/trunk/; revision=35587
2011-01-19 21:45:54 +00:00
Stephen Fisher 18948c2843 Remove the other use of tvb_fake_unicode() from the DCE/RPC dissector and
replace it with tvb_get_unicode_string().


svn path=/trunk/; revision=35348
2011-01-03 19:28:52 +00:00
Stephen Fisher 1acf19f7eb Switch one of the places in the DCERPC dissector from using
tvb_fake_unicode() to tvb_get_unicode_string().


svn path=/trunk/; revision=35346
2011-01-03 18:33:58 +00:00
Jaap Keuter 302d4c14df From Julien Kerihuel:
I've just finished to write a ncacn_http dissector for Wireshark which
provides the ability to dissect Outlook anywhere packets properly (as
specified by [MS-RPCH].pdf documentation.

svn path=/trunk/; revision=35259
2010-12-23 23:50:14 +00:00
Stephen Fisher 8dd830ceec Change "DCE RPC" to "Distributed Computing Environment / Remote Procedure
Call (DCE/RPC)" for the DCERPC dissector's PROTONAME. 


svn path=/trunk/; revision=35152
2010-12-08 00:16:42 +00:00
Bill Meier 03b57df5a0 Fix various typos and spelling errors.
svn path=/trunk/; revision=35126
2010-12-06 01:34:58 +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
Bill Meier 0fc9115705 Use consistent indentation; Whitesapce & formatting cleanup.
svn path=/trunk/; revision=32755
2010-05-11 16:54:55 +00:00
Bill Meier 6812b68eb1 From Yaniv Kaul: constify parameters
https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=4422

 From me: Fix a number of instances where the function prototype or
  the function definition wasn't changed so there was a mismatch 
  thus causing Windows (but not gcc) compilation errors.

svn path=/trunk/; revision=32365
2010-04-03 18:18:50 +00:00
Bill Meier d32b4c0758 Revert SVN #32360 until Windows compilation errors corrected.
svn path=/trunk/; revision=32361
2010-04-02 15:18:03 +00:00
Bill Meier 049f9eac85 From Yaniv Kaul: constify parameters
https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=4422

svn path=/trunk/; revision=32360
2010-04-02 14:37:49 +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 47e732e29e Changed "reassembled_length" -> "reassembled.length".
svn path=/trunk/; revision=31776
2010-02-03 08:47:15 +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
Ronnie Sahlberg 9a9f7acffe From Julien Kerihuel, add support for
unaligned unmarshalling of dissectors generated by PIDL.

This will allow us to use PIDL and additional IDLs from the samba 
project since they use "noalign" for certain protocols.


This may also allow us to use PIDL to describe, and machinegenerate 
dissectors for normal, non-DCERPC, protocols.


This patch for PIDL is still under review, but the PIDL patch is l;ikely 
to be committed soonish.




svn path=/trunk/; revision=31583
2010-01-20 06:02:42 +00:00
Anders Broman 440c3f9261 From Didier Gautheron:
check_col.diff
Remove redundant calls to check_col() if it guards only one columns function with one parameter after the column type.
https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=4394

svn path=/trunk/; revision=31519
2010-01-13 20:32:01 +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
Jaap Keuter d3d53f1b1a From Markus Koetter:
Wireshark fails dissecting dce rpc bind acks, if the bind request had more than 1 ctx.

svn path=/trunk/; revision=30790
2009-11-01 11:52:32 +00:00
Ronnie Sahlberg 3bb1c2cbd4 From Matthieu Patou
schannel decryption


svn path=/trunk/; revision=30631
2009-10-20 08:44:26 +00:00
Stig Bjørlykke 4593ce5ce8 Initialize some values to avoid uninitialized warnings.
svn path=/trunk/; revision=30334
2009-10-05 16:48:20 +00:00
Anders Broman 18f9aed137 Atemt to fix compilation of packet-dcerpc.c for Windows.
svn path=/trunk/; revision=30296
2009-10-04 10:30:48 +00:00
Ronnie Sahlberg 8805b149eb more samr updates for ndr64
svn path=/trunk/; revision=30273
2009-10-04 05:44:18 +00:00
Ronnie Sahlberg 343b961a48 rename dissect_ndr_4or8 to dissect_ndr_uint3264 to match hte name of
the new datatype uint3264.
create a fake guint3264 type as well


svn path=/trunk/; revision=30264
2009-10-03 05:16:51 +00:00
Ronnie Sahlberg d85de66920 initial support to handle conformance data for NDR64.
Conformance data items are 4 bytes in NDR but 8 bytes in NDR64


svn path=/trunk/; revision=30256
2009-10-03 01:12:34 +00:00
Ronnie Sahlberg 0a9289108d teach the dce/rpc pointer dissector about ndr64 and make it dissect
pointers as 8 byte entities when ndr64 is negotiated


svn path=/trunk/; revision=30253
2009-10-03 00:03:48 +00:00
Ronnie Sahlberg 2ea2589afb we need to copy the information about the transport syntax, i.e. i fit
is ndr64 or not, from the bind information to the data we store for each 
individual pdu, since the trnasport syntax may change dynamically back 
and forth between "normal" and "ndr64" on the same conversation.



svn path=/trunk/; revision=30226
2009-10-01 08:55:25 +00:00
Ronnie Sahlberg a5e9e49e83 Move the definition of the uuid, and registration of its name, for the
standard ndr transfer syntax from the epm dissector to packet-dcerpc.c

Add a new transfer syntax : ndr64. This is a new syntax with different
scalar sizes and different alignment rules compared to normal ndr.
It is negotiated and used between w2k8 and samba4 boxens and one may 
assume, future versions of windows as well.

We need to associate the transfer syntax with the bind information since
the transfer syntax will change the packet encoding rules for the 
protocol.
For example, SAMR, as well as all other interfaces support both syntaxes 
and are thus encoded differently, wiht different alignments depending on 
which transfer was negotioated during the bind.



This will require additional changes to the dcerpc helpers and also to 
pidl.



svn path=/trunk/; revision=30209
2009-09-30 09:43:14 +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 d75778eb4a Custom columnfication:
* Deprecate COL_DCE_CTX ("Context ID). Use dcerpc.cn_ctx_id

svn path=/trunk/; revision=29797
2009-09-08 14:59:26 +00:00
Bill Meier 29e52f7fd2 Fix code which could access uninitialized variables and display incorrect text in COL_INFO.
(Found by clang scan-build).

svn path=/trunk/; revision=29601
2009-08-28 19:15:43 +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 e971354a54 Don't guard col_set_str (COL_PROTOCOL) with col_check
svn path=/trunk/; revision=29340
2009-08-09 06:26:46 +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 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
Anders Broman c91a384702 Apply some of the patches from:
http://wiki.wireshark.org/Development/Optimization

svn path=/trunk/; revision=28356
2009-05-13 19:46:11 +00:00
Stig Bjørlykke 62f60df6b4 From Jakub Zawadzki (bug 3331):
g_free() is NULL safe, so we don't need check against it.

svn path=/trunk/; revision=27718
2009-03-13 22:06:48 +00:00