Commit Graph

37 Commits

Author SHA1 Message Date
Pascal Quantin 6cedc2c336 Convert a few more dissectors to wmem
svn path=/trunk/; revision=51991
2013-09-12 22:03:31 +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
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 f2266d87f5 [-Wmissing-prototypes]
explicit casts.

svn path=/trunk/; revision=48302
2013-03-14 19:01:06 +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
Chris Maynard f8d42e6f61 tvb_length_remaining() can return -1, so don't assign its return value to an unsigned integer and don't check it against non-zero but greater than zero.
svn path=/trunk/; revision=43699
2012-07-13 21:14:43 +00:00
Pascal Quantin 7351065ccd From Sven Eckelmann via https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=7375 :
Add support for not_best_next_hop flag in B.A.T.M.A.N. Advanced v14 

svn path=/trunk/; revision=43332
2012-06-18 09:17:58 +00:00
Alexis La Goutte df14b18fdf From Sven Eckelmann via https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=7009
Add support for 4addr unicast packets 

Add support for 4addr unicast packets packets that will be supported in
linux 3.5.

svn path=/trunk/; revision=41826
2012-03-29 17:40:49 +00:00
Bill Meier 4f8e416fdc Fix benign issue: For FT_BOOLEAN fields with a zero bitmask, use BASE_NONE for 'display'
svn path=/trunk/; revision=41385
2012-03-06 22:12:42 +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
Anders Broman 4b952c1324 Get rid of check_col, while at it set ENC.
svn path=/trunk/; revision=39146
2011-09-26 08:25:18 +00:00
Guy Harris eedafe0a92 %u suffices, as varargs are widened. (It aslso doesn't cause Clang to
complain.)

svn path=/trunk/; revision=37933
2011-07-08 01:58:30 +00:00
Anders Broman 9e5a06a2ef From Sven Eckelmann:
Add support for v14

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

svn path=/trunk/; revision=37901
2011-07-05 08:20:23 +00:00
Anders Broman 99d0148b99 From Sven Eckelmann:
Rename HNA to TT to use the same names as upstream.

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

svn path=/trunk/; revision=37900
2011-07-05 08:17:46 +00:00
Anders Broman 78d22ed8ee From Sven Eckelmann:
Fix size of unicast fragment packet in v12.

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

svn path=/trunk/; revision=37897
2011-07-04 21:20:18 +00:00
Anders Broman b00a34230c From Sven Eckelmann:
Remove unused length_remaining.

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

svn path=/trunk/; revision=37896
2011-07-04 21:16:51 +00:00
Anders Broman e85447a30f From Sven Eckelmann:
Unify handling of NULL-tree in dissection routines.

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

svn path=/trunk/; revision=37894
2011-07-04 21:14: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
Jeff Morriss a8b851ceab From Sven Eckelmann via https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=5658 :
Add support for v12 fragmented unicast.

svn path=/trunk/; revision=37143
2011-05-14 14:31:51 +00:00
Jeff Morriss 393f2467e4 From Sven Eckelmann via https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=5658 :
Read unchanged packets of v12 as v10 packets
Read unchanged packets of v13 as v11 packets
Use version in packet type definitions

svn path=/trunk/; revision=37142
2011-05-14 14:05:30 +00:00
Jeff Morriss fb99707fa5 Use tvb_ether_to_str() when it can eliminate a tvb_get_ptr() call.
svn path=/trunk/; revision=35960
2011-02-16 03:05:13 +00:00
Stephen Fisher 68b0cd7030 Fix bug #5657: Update my mail address
svn path=/trunk/; revision=35868
2011-02-07 23:14:54 +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 8e200fbd29 Corrected abbrev for Source and Destination.
svn path=/trunk/; revision=34733
2010-10-31 12:15:41 +00:00
Anders Broman 85a9a2cd21 From Sven Eckelmann:
Dissector/packet-batadv: Add support for icmp rr.
https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=4922

svn path=/trunk/; revision=33444
2010-07-06 04:27:01 +00:00
Bill Meier 89015cb584 From Sven Eckelmann: Fix size of seqno in icmp packets
See Bug #4921: https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=4921

svn path=/trunk/; revision=33405
2010-07-01 19:19:03 +00:00
Bill Meier b88b612f02 From Sven Eckelmann: Add support for v11 packet format
"Please add support for v11 ogm packets used in linux 2.6.36"
See: Bug #4920: https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=4920

svn path=/trunk/; revision=33404
2010-07-01 18:42:41 +00:00
Bill Meier 6dcdb5fee6 From Sven Eckelmann: Change recursion for aggregated packets to iteration.
See Bug #2631: https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=2631

svn path=/trunk/; revision=33075
2010-06-03 18:56:39 +00:00
Bill Meier 9c859f5f10 From: Sven Eckelmann:Add support for v10 packet format
"v10 of the packet format was added recently and could be added
  to the wireshark dissector"
See: Bug #4833: https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=4833

From me:
- Fix a compile error: ...version=tvb_get_ntohs...
- Fix a missing = NULL.

svn path=/trunk/; revision=33066
2010-06-03 02:03:32 +00:00
Bill Meier 8d05670e53 Add back a few 'if (check_col()...' removed by me in a previous commit.
Possibly it's better to use an 'if (checkcol()' if the enclosed call to
'col_...' has "complex" arguments.

svn path=/trunk/; revision=33064
2010-06-03 00:52:08 +00:00
Bill Meier 2be028a73f From Sven Eckelmann: Fix endless recursive loop
See Bug #2631: https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=2631

svn path=/trunk/; revision=33060
2010-06-02 21:36:24 +00:00
Bill Meier 6e00247f65 Misc changes:
- Clear info col before beginning dissection;
- Remove some uneeded forward declarations;
- Remove some ... = NULL initializers;
- Display protocol as BATADV_??? if unknown type;
- '(gwflags & 0x7C) >> 3'  ==> '(gwflags & 0x78) >> 3'

svn path=/trunk/; revision=33057
2010-06-02 19:00:20 +00:00
Bill Meier 263c23d913 check_col() no longer required;
Use col_add_fstr() instead of col_clear()/col_append_fstr() combo.

svn path=/trunk/; revision=33055
2010-06-02 18:11:17 +00:00
Guy Harris 64682d90a9 Fix incorrect fetch of version field.
svn path=/trunk/; revision=33053
2010-06-02 17:33:45 +00:00
Gerald Combs 427eed652b From Sven Eckelmann via but 2631:
The wireless meshing protocol B.A.T.M.A.N. Advanced changed their packet format
in such a way that now versions can be identified and so correct dissection of
the packets can be supported by wireshark.
Since it is a ever moving target it is very possible that the packet format is
changing slightly. The dissector was written in such a way that new version can
be supported relative easy.
I hope that it sufficient for the inclusion in wireshark.

I tried to fuzzing it some hours and no error was reported.


From me:

Initialize our dissector handles.

Merge packet-batadv.h into packet-batadv.c. It isn't included anywhere else.

Fuzz 500 passes using attached capture files.

svn path=/trunk/; revision=33052
2010-06-02 17:10:55 +00:00