Commit Graph

63 Commits

Author SHA1 Message Date
Guy Harris 5947200d55 Don't cast away constness.
svn path=/trunk/; revision=48536
2013-03-24 18:28:40 +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 d1f89f81d8 From beroset:
remove C++ incompatibilities 
https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=8416

svn path=/trunk/; revision=48384
2013-03-18 05:18:32 +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
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
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
Bill Meier 859affc2bd Don't call subdissectors / expert...() / col...() under 'if (tree)'
Also:
 Remove some uneeded initializers;
 Do some whitespace cleanup and re-formatting.

svn path=/trunk/; revision=43681
2012-07-12 17:22:47 +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 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 781129806f Fix ex "modeline" so it works;
See https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=5748

svn path=/trunk/; revision=39081
2011-09-21 17:49:11 +00:00
Stig Bjørlykke f282154ab0 Use correct encoding for proto_tree_add_item().
svn path=/trunk/; revision=38107
2011-07-19 10:51:12 +00:00
Jeff Morriss 50e1634f4c Modify proto_tree_add_bytes_format() and proto_tree_add_bytes_format_value()
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, [...])

svn path=/trunk/; revision=35896
2011-02-10 16:31:00 +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
Stig Bjørlykke db82c54bef Ensure we keep the pkg_data pointer for the init routine to cleanup correctly,
because the ep memory is cleared before the init routine is called.

Fixed the variable name for the no_yes true_false_string.
Update reference to protocol description.

svn path=/trunk/; revision=35626
2011-01-22 18:07:28 +00:00
Jeff Morriss 867bf1477e Use nstime_set_zero() to initialize nstime_t's.
svn path=/trunk/; revision=35622
2011-01-22 15:35:34 +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
Stig Bjørlykke 710f41b085 Avoid printing double p_mul.pdu_type in custom columns.
svn path=/trunk/; revision=34387
2010-10-05 20:46:34 +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 98df26f3a9 Added protocol name to "Reassembled length" text.
svn path=/trunk/; revision=31774
2010-02-02 22:32:31 +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
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 4bcde1958f Add PDU Delay for first data packet.
svn path=/trunk/; revision=31095
2009-11-27 14:29:38 +00:00
Bill Meier ca1cba6f30 Don't coerce a (void *) to a (guint32 *).
The (void *) pointer in this case may point to
"unaligned" data.

svn path=/trunk/; revision=29378
2009-08-11 13:44:35 +00:00
Gerald Combs 595f9b6630 Convert a GString to an ep_strbuf_t (and squelch a static analysis
warning in the process). Remove an unused variable.

svn path=/trunk/; revision=29308
2009-08-05 19:03:48 +00:00
Bill Meier 65faee6470 Set editor modelines to be consistent between emacs and vi/ex;
Indentation and whitespace cleanup;

svn path=/trunk/; revision=29180
2009-07-23 17:46:09 +00:00
Stig Bjørlykke d00c2baf5c Remove some check_col() calls.
svn path=/trunk/; revision=28974
2009-07-07 10:07:42 +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
Stig Bjørlykke 26d30411b6 Adjusted my name to use only ASCII characters.
svn path=/trunk/; revision=27733
2009-03-15 21:13:27 +00:00
Stig Bjørlykke 248ca24f4f Removed mark for unused pinfo, its in use.
svn path=/trunk/; revision=27537
2009-02-25 00:28:19 +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
Stig Bjørlykke 9168a0a714 Added total time analysis from Address to Ack-Ack PDU.
Renamed previous total time to transmission time.

svn path=/trunk/; revision=26428
2008-10-13 14:59:28 +00:00
Stig Bjørlykke acd4e734c9 From Mattias Nissler (bug 2936):
Fix some gpointer casts.

svn path=/trunk/; revision=26347
2008-10-03 17:01:08 +00:00
Stig Bjørlykke 6882a5cd1a Several improvements:
- Split SEQ/ACK analysis into SEQ analysis (pr msg) and ACK analysis
  (pr dest/ackinfo entry) to correctly handle multicast messages.
- Improved dump of timestamp (in units of 100ms).
- Show Address PDU with 0 dest entries as Ack-Ack PDU.
- Print correct number of missing sequence numbers in Ack.
- Indicate end of list entry in Ack.
- Message ID is unsigned.

svn path=/trunk/; revision=26345
2008-10-03 14:58:53 +00:00
Stig Bjørlykke 2a4ddda66a Added option to decode as BER encoded ASN.1.
Dump as data if no decoding.

svn path=/trunk/; revision=26339
2008-10-02 15:47:06 +00:00
Bill Meier 5ac2ba6354 Minor changes related to proto_reg_handoff & pref ranges
svn path=/trunk/; revision=26254
2008-09-23 15:03:39 +00:00
Bill Meier a3e6eb8071 Minor cleanup mostly related to proto_reg_handoff
svn path=/trunk/; revision=26236
2008-09-19 17:39:44 +00:00
Stig Bjørlykke 7cf79249e0 Only use one IP address for seq/ack analysis.
Use correct length for dest entry and ack info entry.
Print correct id list for acks.

svn path=/trunk/; revision=26059
2008-08-22 15:15:56 +00:00
Stig Bjørlykke 6b1c605ca4 Added handling of missing sequence number range in ack.
Add all message ids in ack to the info column.
Changed data types for sequence number and total number of pdus.
Untabify file.

svn path=/trunk/; revision=26031
2008-08-15 07:59:11 +00:00
Stig Bjørlykke a3e13c0e3a Register dissector by name.
svn path=/trunk/; revision=25180
2008-04-25 19:25:49 +00:00
Stig Bjørlykke c714042d2f Updated to Version 2.0 Draft 6.
Removed unofficial port numbers.

svn path=/trunk/; revision=24582
2008-03-07 12:22:20 +00:00
Stig Bjørlykke 3590fc0713 Changed to checksum_good and checksum_bad to align with other dissectors.
svn path=/trunk/; revision=24115
2008-01-16 19:16:30 +00:00
Stig Bjørlykke 1c68fd7a75 Added total retransmission time analysis field.
svn path=/trunk/; revision=23924
2007-12-19 11:25:47 +00:00
Stig Bjørlykke 6f9241bca7 - Added first version of P_Mul sequence analysis.
- Added expert info for Discard_Message_PDU.

svn path=/trunk/; revision=23922
2007-12-19 10:05:42 +00:00
Stig Bjørlykke 4e9892cbfd Added checksum.good and checksum.bad items.
svn path=/trunk/; revision=23590
2007-11-25 21:30:57 +00:00
Stig Bjørlykke c787b310eb Added port range.
svn path=/trunk/; revision=23491
2007-11-19 07:26:53 +00:00
Anders Broman 1950ffc214 Apply the small performance enhancment patches for:
- if offset is 0, tvb_length is the same as tvb_length_remaining, just faster.
Replace 
- col_append_fstr() with faster  col_append_str() 
- col_add_str() with col_set_str()
when it's safe

svn path=/trunk/; revision=23252
2007-10-23 05:50:00 +00:00
Stig Bjørlykke af2d10d5bf - Added option to use relative message id (MSID)
- Added generated entry for total missing sequence numbers
- Added expert info on invalid ack info length
- Added count of ack in info column

svn path=/trunk/; revision=23079
2007-10-06 11:28:09 +00:00