Commit Graph

140 Commits

Author SHA1 Message Date
Jakub Zawadzki ae59b09443 Add missing includes in order to remove exceptions.h from proto.h (next commit).
svn path=/trunk/; revision=53230
2013-11-10 15:59:37 +00:00
Evan Huus 1051504005 From Michael Labedzki, call data dissector instead if handle is NULL.
Fixes https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=9379

svn path=/trunk/; revision=53087
2013-11-05 13:17:55 +00:00
Michael Mann 65b6a98b4a Bluetooth: AVDTP: Add support for Content Protection type SCMS-T (and some minor cleanup). Bug 7893 (https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=7893)
From Michal Labedzki

svn path=/trunk/; revision=53065
2013-11-03 15:25:52 +00:00
Michael Mann 02a8391535 Require dissector_try_string to pass a data parameter to its subdissectors. There weren't that many calls, so might as well modify the function than create a need for dissector_try_string_new.
svn path=/trunk/; revision=53049
2013-11-02 15:52:25 +00:00
Bill Meier 0ad98563a2 From didier gautheron: remove redundant or use faster col_xxx functions
- when the text parameter is constant col_add_str() and col_set_str() are equivalent but col_set_str() is faster.
- same for  replace col_append_fstr and col_append_str
- remove col_clear() when it's redundant:
    + before a col_set/col_add if the dissector can't throw an exception.
- replace col_append() after a col_clear() with faster col_add... or col_set

   https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=9344


svn path=/trunk/; revision=52948
2013-10-29 14:09:20 +00:00
Pascal Quantin 1d4b8d6a9f From Pavel via https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=9204 :
Fix parsing of padding in RTP header extension

svn path=/trunk/; revision=52330
2013-10-02 15:33:00 +00:00
Michael Mann 346f803d42 Convert proto_tree_add_uint_format to proto_tree_add_uint_format_value if hf_ field name is the first part of the formatted string. This was all manual inspection and most cases were either:
1. Case sensitivity differences between hf_ field name and formatted string.
2. Unnecessary whitespace between hf_ field name and colon in formatted string

There are cases where the hf_ field name doesn't quite match the proto_tree_add_uint_format, but it's close enough that one of them should be "right", I'm just not sure which is, I just know the string in proto_tree_add_uint_format is the one displayed.

svn path=/trunk/; revision=52098
2013-09-16 10:39:06 +00:00
Evan Huus 58804a6f15 Convert another 10 dissectors to wmem.
svn path=/trunk/; revision=51612
2013-08-31 14:32:01 +00:00
Jakub Zawadzki a18172147f Remove fragment_data, add fragment_head, fragment_item - for now alias it to the same structure.
This is begin of work to split fragment head and fragments items.

svn path=/trunk/; revision=50708
2013-07-17 21:12:24 +00:00
Anders Broman 85a8e304dd Add the posibillity to use a key for per-packet-data.
svn path=/trunk/; revision=49259
2013-05-12 18:11:02 +00:00
Pascal Quantin 35d3fa75be Try to please the OSX buildbots
svn path=/trunk/; revision=49024
2013-04-25 05:24:07 +00:00
Pascal Quantin 2dc27b8b85 Fix https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=8610 :
Ensure that tap is called after full dissection, even in case of exception

svn path=/trunk/; revision=49019
2013-04-24 21:25:30 +00:00
Anders Broman b85877977a Add "Modern" STUN to the preference.
svn path=/trunk/; revision=48806
2013-04-10 11:46:31 +00:00
Chris Maynard e08b7c3a38 Fix encoding arg for proto_tree_add_item() and friends.
svn path=/trunk/; revision=48732
2013-04-04 15:33:14 +00:00
Alexis La Goutte 22620ca12e Fix some Dead Store (Dead assignement/Dead increment) Warning found by Clang
svn path=/trunk/; revision=48505
2013-03-23 13:08:39 +00:00
Guy Harris a2414d8909 Don't wire into the reassembly code the notion that reassemblies should
be done on flows from one address to another; reassembly for protocols
running atop TCP should be done on flows from one TCP endpoint to
another.

We do this by:

	adding "reassembly table" as a data structure;

	associating hash tables for both in-progress reassemblies and
	completed reassemblies with that data structure (currently, not
	all reassemblies use the latter; they might keep completed
	reassemblies in the first table);

	having functions to create and destroy keys in that table;

	offering standard routines for doing address-based and
	address-and-port-based flow processing, so that dissectors not
	needing their own specialized flow processing can just use them.

This fixes some mis-reassemblies of NIS YPSERV YPALL responses (where
the second YPALL response is processed as if it were a continuation of
a previous response between different endpoints, even though said
response is already reassembled), and also allows the DCE RPC-specific
stuff to be moved out of epan/reassembly.c into the DCE RPC dissector.

svn path=/trunk/; revision=48491
2013-03-22 23:59:54 +00:00
Anders Broman 81e80f2c0b From beroset:
remove C++ incompatibilities 
https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=8416

svn path=/trunk/; revision=48355
2013-03-17 16:48:47 +00:00
Evan Huus 1cece569c8 From Jiri Novak via https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=8424
Extend RTP dissector with ED-137 extension

From me: Don't try to dissect a non-existent payload (see comment #9
on the bug).

svn path=/trunk/; revision=48069
2013-03-04 22:00:48 +00:00
Jaap Keuter 0b0f6947cc Fix for bug 8321:
Feed the tap before trying to dissect the payload. This prevents a malformed 
payload from blocking the tap, resulting in incorrect RTP statistics.

svn path=/trunk/; revision=47729
2013-02-18 06:19:04 +00:00
Jeff Morriss 0266cceef3 Make all enum_val_t's const.
svn path=/trunk/; revision=46292
2012-11-29 20:15:37 +00:00
Jeff Morriss 2552c750e5 We always HAVE_CONFIG_H so don't bother checking whether we have it or not.
svn path=/trunk/; revision=45017
2012-09-20 02:03:38 +00:00
Jakub Zawadzki 9f92dc93c5 Add data parameter to call_dissector_only.
svn path=/trunk/; revision=44872
2012-09-11 08:28:07 +00:00
Jakub Zawadzki 5a8783f5b1 Initial commit to support yet another method of passing data between dissectors.
Add new parameter 'data' to heur_dissector_t and new_dissector_t, for now it's always NULL

svn path=/trunk/; revision=44860
2012-09-10 21:40:21 +00:00
Jeff Morriss aa5d9d78dd From Robert Bullen via https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=7683 :
The reassembled fragments tree in the Packet Details view is awesome, but it
lacks one thing: a field that exposes the reassembled data.

tcp.data already exists for exposing a single TCP segment's payload as a byte
array. It would be handy to have something similar for a single application
layer PDU when TCP segment reassembly is involved. I propose
tcp.reassembled.data, named and placed after the already existing field
tcp.reassembled.length.

My primary use case for this feature is outputting tcp.reassembled.data with
tshark for further processing with a script.

The attached patch implements this very feature. Because the reassembled
fragment tree code is general purpose, i.e. not specific to just TCP, any
dissector that relies upon it can add a similar field very cheaply. In that
vein I've also implemented ip.reassembled.data and ipv6.reassembled.data, which
expose reassembled fragment data as a single byte stream for IPv4 and IPv6,
respectively. All other protocols that use the reassembly code have been left
alone, other than inserting NULL into their initializer lists for the newly
introduced struct field reassemble.h:fragment_items.hf_reassembled_data.

svn path=/trunk/; revision=44802
2012-09-07 02:09:59 +00:00
Jörg Mayer 7aa18f37cd Small whitespace changes
svn path=/trunk/; revision=44763
2012-09-04 00:42:07 +00:00
Bill Meier 638d74d43f Use val_to_str_const() where appropriate;
Also (for a few files):
- create/use some extended value strings;
- remove unneeded #include files;
- remove unneeded variable initialization;
- re-order fcns slightly so prefs_reg_handoff...() at end, etc

svn path=/trunk/; revision=44438
2012-08-10 22:55:02 +00:00
Michael Mann 37ebb93a54 Added RFC 5285 functionality per https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=5763
svn path=/trunk/; revision=43931
2012-07-23 15:52:17 +00:00
Michael Mann 3d502b97f1 Updated patch from https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=3507
svn path=/trunk/; revision=43887
2012-07-21 12:38:59 +00:00
Jakub Zawadzki bf81b42e1e Update Free Software Foundation address.
(COPYING will be updated in next commit)

svn path=/trunk/; revision=43536
2012-06-28 22:56:06 +00:00
Jeff Morriss 9e3b598e30 Some code/white space cleanup.
svn path=/trunk/; revision=42985
2012-06-01 18:35:20 +00:00
Jeff Morriss 045c1d6a1e This dissector calls process_reassembled_data() so there's no need for it to
manually insert the fragment data to the tree (by calling show_fragment_tree());
doing both just means the fragments get added to the tree twice.

svn path=/trunk/; revision=41022
2012-02-14 02:57:48 +00:00
Jeff Morriss 0cb2500e45 There's no need to get the parent of an item we're passing into
proto_tree_move_item(): that function will expects the item, not its parent.

This avoids dissector bugs such as the one reported in
https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=6768 :

** (process:745): WARNING **: Dissector bug, protocol RTP, in packet 82:
proto.c:4273: failed assertion "fixed_item->parent == tree"

svn path=/trunk/; revision=41021
2012-02-14 02:43:58 +00:00
Anders Broman 0f38d13307 From mdesharnais:
RTP header extensions not correctly implement.

From me remove the old table based on payload type, this
implementation is more in line with RFC 3551.

https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=6783

svn path=/trunk/; revision=40834
2012-02-04 11:59:37 +00:00
Anders Broman c1813b0701 Collect and use some SRTP information.
svn path=/trunk/; revision=40794
2012-02-01 20:33:33 +00:00
Chris Maynard 647c5c0b27 packet_info's in_error_pkt is now a bitfield like in_gre_pkt.
svn path=/trunk/; revision=39764
2011-11-08 18:39:11 +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
Bill Meier 67ee5049d4 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_BOOLEAN
     FT_IPv4
     FT_EUI64
     FT_GUID
     FT_UINT_STRING

Also: For type FT_ITv6 use ENC_NA. (This was missed in SVN #39260)

svn path=/trunk/; revision=39328
2011-10-10 00:39:31 +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
Bill Meier 98cc920265 Fix compile error: remove forward declaration.
svn path=/trunk/; revision=38956
2011-09-09 21:23:27 +00:00
Bill Meier 20a5184e03 Revert SVN #38954; Correct fix to follow.
svn path=/trunk/; revision=38955
2011-09-09 21:20:17 +00:00
Bill Meier a2ff261c12 Fix compile error: remove forward declaration.
svn path=/trunk/; revision=38954
2011-09-09 21:15:05 +00:00
Bill Meier b3c369619b Don't do heuristic check for 'dstport being even' if checking for rtp over stun.
See https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=6322

svn path=/trunk/; revision=38953
2011-09-09 20:37:49 +00:00
Anders Broman a3a899de80 /* Get the fields in the second octet */
octet2 = tvb_get_guint8( tvb, offset + 1 );
	payload_type = RTP_PAYLOAD_TYPE( octet2 );

	/* Check for a sensible payload type
	   (recognised static and preferred dynamic ranges) */
	if ((payload_type <= PT_H263) ||
		/* Alex Lindberg - Modified range to use RTP Type Names */
	    (payload_type >= PT_UNDF_96 && payload_type <= PT_UNDF_127)) {

evaluates to allways trye as far as I can tell.

svn path=/trunk/; revision=38950
2011-09-09 05:23:43 +00:00
Bill Meier d6253e7504 Fix gcc 4.6 "set but not used [-Wunused-but-set-variable]" warning.
svn path=/trunk/; revision=38246
2011-07-28 18:17:16 +00:00
Bill Meier f3432a973c Don't assign to a proto_item* if the value won't be used:
Fixes Coverity 903,935,968,985,997,999,1024,1025,1134;
Remove unneeded #includes;
Do whitespace cleanup.

svn path=/trunk/; revision=37331
2011-05-20 15:44:25 +00:00
Tomas Kukosa 7c083c0966 RTP: display payload type name from dynamic payload type table
H.223: use just one protocol for bot dissectors for more clear protocol disabling 

svn path=/trunk/; revision=36391
2011-03-29 10:56:30 +00:00
Jeff Morriss a527fa4b49 Add NTP times using proto_tree_add_item().
Replace a couple not-very-descriptive blurbs with NULL.

svn path=/trunk/; revision=35883
2011-02-09 02:27:41 +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
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