Commit Graph

31 Commits

Author SHA1 Message Date
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
Jakub Zawadzki c766e78cfa Rewrite reassemble API to use TVBs instead of raw data.
(it seems to be working for TCP ^^)

svn path=/trunk/; revision=50580
2013-07-14 14:42:05 +00:00
Guy Harris f99694bb11 Squelch a "not permitted in C++" warning.
svn path=/trunk/; revision=50574
2013-07-14 10:23:59 +00:00
Guy Harris 4af1baba7a Get rid of the DCE RPC stuff; these tests should test the code path for
all types of keys.

Make the tables in main static, so we don't initialize them at run time;
perhaps that'll help figure out why reassemble_test is crashing on
Windows apparently before even calling emem_init().

svn path=/trunk/; revision=48513
2013-03-23 19:38:54 +00:00
Guy Harris 3850405411 Update to match the changes made to the reassembly code APIs.
svn path=/trunk/; revision=48493
2013-03-23 02:41:43 +00:00
Jeff Morriss 3729335973 We always HAVE_CONFIG_H so don't bother checking whether we have it or not.
svn path=/trunk/; revision=45016
2012-09-20 01:48:30 +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
Guy Harris b252f2e632 OK, to heck with it - link reassemble_test with libwireshark. Trying to
selectively pick up particular object files is just too much of a mess.

Alas, this requires that we add some additional symbols to the list
exported by libwireshark; the DCE RPC ones shouldn't be global, but
reassemble_test uses them, so....

Get rid of stubs in reassemble_test.c - they just stub out routines from
libwireshark, but that's not necessary any more.

svn path=/trunk/; revision=41223
2012-02-28 09:00:05 +00:00
Gerald Combs 49b92440de More GLIB_CHECK_VERSION cleanups. Update the minimum GLib/GTK+ versions
in README.devloper. Remove g_gnuc.h since it's no longer needed. Remove
tvbuff_init(), tvbuff_cleanup(), reassemble_init(), and
reassemble_cleanup() since they were only used for older GLib versions
which didn't support GSlices. Assume we always support the "matches"
operator.

svn path=/trunk/; revision=37978
2011-07-11 20:32:19 +00:00
Jeff Morriss 62edb47987 Add more duplicate fragment tests.
svn path=/trunk/; revision=36132
2011-03-03 23:28:32 +00:00
Jeff Morriss 4ed0e07ef0 When reassembling fragments, don't stop looking at fragments just because the
current fragment pushes us past the reassembled size: it may be that the
current fragment is a duplicate/retransmission and will be ignored.

Also, if we detect a conflict between a previous and the current fragment,
flag the current (conflicting) fragment as FD_OVERLAPCONFLICT.  Do *not* flag
the fragment that got us into the reassembly routine (probably the final
fragment): it is not (may not be) the guilty fragment.

Clean up some spacing.

Also add reassembly tests for duplicate/retransmitted fragments.

svn path=/trunk/; revision=36131
2011-03-03 20:22:45 +00:00
Bill Meier 723a435f88 Additions to allow the valgrind to test for reassembly.c memory leaks.
Specifically: free all dynamically allocated memory after each test (or
 at program completion).
Also: add some debug functions (conditionally enabled) to print information
about the fragment_table and reassembled_table fd-chains.

svn path=/trunk/; revision=35172
2010-12-10 15:35:59 +00:00
Jeff Morriss e17b9ccec1 Rev 29427 added packet_add_new_data_source() with a comment indicating that
the data source does not need to be allocated if (!tree).

Rev 30158 took the if (!tree) check out indicating that the check was invalid.

So: (since packet_add_new_data_source() now only calls add_new_data_source()),
remove packet_add_new_data_source().

svn path=/trunk/; revision=34717
2010-10-30 16:00:30 +00:00
Jeff Morriss 71f132e34c Get reassemble_test building again (after 34285).
svn path=/trunk/; revision=34296
2010-09-30 20:33:05 +00:00
Stig Bjørlykke 4e4ee5e199 Fake proto_item_prepend_text() in reassemble_test.
svn path=/trunk/; revision=34075
2010-09-08 06:45:04 +00:00
Guy Harris b8812638dc Use the new name for the last argument to proto_tree_add_item().
svn path=/trunk/; revision=32935
2010-05-24 17:39:03 +00:00
Jeff Morriss 64f5d56bba Fix reassemble_test's (copy of the) proto_tree_add_item() prototype to get it
compiling again.

fragment_add_seq_check(), fragment_add_seq_802_11(), and fragment_add_seq_next()
all call fragment_add_seq_check_work() so make their prototypes match each other
in const-ness.  This fixes a warning when compiling reassemble_test.

svn path=/trunk/; revision=32933
2010-05-24 15:13:02 +00:00
Guy Harris 04e4e31296 Fix to match changes to the signatures of the real versions of those
functions.

svn path=/trunk/; revision=32370
2010-04-04 03:05:27 +00:00
Kovarththanan Rajaratnam 7f27653f4b Mark variables as static
svn path=/trunk/; revision=31983
2010-02-24 08:46:29 +00:00
Kovarththanan Rajaratnam 8a7dedfab4 We already pull in glib.h so use gboolean instead of int to declare boolean types.
svn path=/trunk/; revision=31982
2010-02-24 08:39:51 +00:00
Kovarththanan Rajaratnam 7ca35912aa Make do_test() static
svn path=/trunk/; revision=31980
2010-02-24 08:36:20 +00:00
Kovarththanan Rajaratnam fcc745f75b Constify format string
svn path=/trunk/; revision=31979
2010-02-24 08:34:35 +00:00
Jeff Morriss 78318b32ee Add emem_init() which initializes both the ep_ and se_ allocators; have all
callers use that instead of initializing each allocator individually.

svn path=/trunk/; revision=30646
2009-10-20 17:43:05 +00:00
Jeff Morriss e7bc1e8912 Initialize se_ memory, too (since it is used by the reassembly code). Reindent a bit.
svn path=/trunk/; revision=30638
2009-10-20 15:07:22 +00:00
Kovarththanan Rajaratnam 0e5cef61be Split a bunch of init routines into init() and cleanup(). This allows us to free memory properly on shutdown.
This is an initial step. There's still some work to do.

svn path=/trunk/; revision=29754
2009-09-06 18:25:23 +00:00
Kovarththanan Rajaratnam 7d44262406 This patch introduces packet_add_new_data_source() which effectively deprecates add_new_data_source(). This is based on the following observation:
1) The tvb + name (aka. data_source) is only used when the protocol tree is visible

The current implementation of add_new_data_source() doesn't take this into account and simply allocates a data_source regardless. This is what packet_add_new_data_source() tries to rectify.

A couple of dissectors have already been switched over to the new packet_add_new_data_source(). Many are still missing. Help appreciated!

svn path=/trunk/; revision=29427
2009-08-15 06:38:10 +00:00
Richard van der Hoff d1f795d28e right; this is going badly.
Let's take a different tack: include only the bare minimum, and set up stubs for everything else.

svn path=/trunk/; revision=21379
2007-04-11 00:22:58 +00:00
Richard van der Hoff 901b6d1c55 fix typo in eth_stdio_fopen defn
svn path=/trunk/; revision=21369
2007-04-10 17:34:32 +00:00
Richard van der Hoff d72a70d653 more libs, more stubs... i'll get there one day
svn path=/trunk/; revision=21363
2007-04-10 11:51:16 +00:00
Richard van der Hoff c55799267b mpa_* stubs to make this link properly
svn path=/trunk/; revision=21317
2007-04-03 13:56:19 +00:00
Anders Broman e2cab6caa9 From Richard van der Hoff:
01_reassemble_test.patch
------------------------
I didn't want to do anything without some unit tests, so here they are. 
This allows a standalone binary, epan/reassemble_test, to be built; this can be run from the commandline and should end up printing out "success" 
if all goes well.
NOTE the changes to makefile.am NOT checked in currently.

Incidentally: is it possible to get the buildbot to run things like this, exntest and tvbtest?

02_reassemble_refactor.patch
----------------------------
fragment_add_seq, fragment_add_dcerpc_dg and fragment_add_seq_check_work were all pretty much carbon-copies of each other. This patch factors out the common parts of the routines into a new routine, fragment_add_seq_key().

03_reassemble_partial_reassembly.patch
---------------------------------------
This makes fragment_set_partial_reassembly() work for datagrams assembled with fragment_add_seq(). The patch itself is actually quite small, but it adds another unit test which is reasonably lengthy.

svn path=/trunk/; revision=20888
2007-02-21 06:19:03 +00:00