Commit Graph

121 Commits

Author SHA1 Message Date
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
Bill Meier 1c01cbfa60 Remove two duplicate values from rtp_payload_type_short_vals value_string array.
svn path=/trunk/; revision=34812
2010-11-08 21:35:14 +00:00
Bill Meier 2de3781872 Remove two duplicate entries from rtp_payload_type_vals array.
svn path=/trunk/; revision=34811
2010-11-08 21:24:10 +00:00
Anders Broman cab0cef11d Use value_string_ext for RTP payload types.
svn path=/trunk/; revision=34804
2010-11-08 14:43:59 +00:00
Anders Broman 6117e317c6 Remove deprecated check_col().
svn path=/trunk/; revision=34107
2010-09-12 19:29:05 +00:00
Jeff Morriss ac262a6043 Fix fuzz failure in bug 4671: don't assume the conversation data exists (check for a NULL pointer). Also correct a typo (assignment to wrong variable).
svn path=/trunk/; revision=32477
2010-04-15 20:09:46 +00:00
Anders Broman 83ce037aa9 Use the sample rate from SDP info in RTP stream analysis.
svn path=/trunk/; revision=32466
2010-04-14 20:48:37 +00:00
Bill Meier 055dd62063 #include <string.h> not needed.
svn path=/trunk/; revision=32410
2010-04-06 21:14:01 +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
Bill Meier 92c387a992 fid_table never used: remove it (Fixes very minor memory leak).
svn path=/trunk/; revision=30583
2009-10-16 22:05:49 +00:00
Jeff Morriss 1daf990897 From Stephane Bryant via https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=2815
but (since the patch no longer applied cleanly) essentially manually
re-implemented by me:

Rename "stun" to "classic stun" and "stun2" to "stun", to follow the usage
defined in draft-ietf-behave-rfc3489bis-18 section 2.

svn path=/trunk/; revision=29884
2009-09-13 23:03:38 +00:00
Kovarththanan Rajaratnam 8c48c6835f Rename address_to_str() to ep_address_to_str() because:
1) This indicates that the string has ephemeral lifetime
2) More consistent with its existing seasonal counterpart, se_address_to_str().

svn path=/trunk/; revision=29747
2009-09-06 14:25:47 +00:00
Bill Meier 8fda47d5b2 Replace "repeated blurb" by NULL in two cases;
Reformat a long line.

svn path=/trunk/; revision=29606
2009-08-29 02:25: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 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 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
Jaap Keuter bd563faabb From Michael Lum:
Some of the hard-coded 96 and 127 values representing dynamic payloads 
were changed to use #defines from rtp_pt.h but not all.

svn path=/trunk/; revision=28466
2009-05-25 06:46:33 +00:00
Gerald Combs f3080aff14 From Alex Lindberg via bug 3094:
Added descriptions for dynamic RTP Payload types.

svn path=/trunk/; revision=28433
2009-05-20 23:46:48 +00:00