aboutsummaryrefslogtreecommitdiffstats
path: root/epan/reassemble.c
AgeCommit message (Collapse)AuthorFilesLines
2007-11-10Apply yet another set of the optimization patches:Anders Broman1-56/+38
Use O(1) logic for the fast path when adding fragments (ie fragments are in order). svn path=/trunk/; revision=23422
2007-08-15Added fragment_start_seq_check to start a reassembly without adding any data.Stig Bjørlykke1-0/+40
svn path=/trunk/; revision=22513
2007-06-24Added a new function, fragment_end_seq_next(), to end the Graeme Lunt1-53/+137
fragmented data without adding an empty data fragment. This is used by the RTSE dissector which can't identify the last fragment until after it has been added. svn path=/trunk/; revision=22174
2007-03-26Fix a bunch more warnings. Add -Werror when using --with-warnings-as-errorsStephen Fisher1-1/+1
under gcc to tools/lemon, plugins/mate and epan/ svn path=/trunk/; revision=21204
2007-02-21From Richard van der Hoff:Anders Broman1-215/+231
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-19Squelch a few unused parameter warnings.Jeff Morriss1-1/+1
svn path=/trunk/; revision=20863
2007-01-19Fix the SCCP dissector so it doesn't show non-segmented DT1 messages asJeff Morriss1-17/+7
having been reassembled. Fix the comments in reassembly.c and reassembly.h regarding what the reassembly routines actually return in the 802.11 and no-sequence-number cases when they are given the first and last packet (that is, a non-segmented packet): in particular the routines return a pointer to a list containing just the one fragment. svn path=/trunk/; revision=20505
2006-11-21Fix pluralization of "bytes" so it doesn't say "1 bytes".Guy Harris1-5/+7
Clean up indentation. svn path=/trunk/; revision=19953
2006-05-21name changeRonnie Sahlberg1-2/+2
svn path=/trunk/; revision=18197
2006-01-22simply use DISSECTOR_ASSERT() to detect tvb problems instead of my previous ↵Ulf Lamping1-3/+1
commit svn path=/trunk/; revision=17074
2006-01-22add fragment_get_reassembled_id so the handed id doesn't need to be a packet ↵Ulf Lamping1-0/+21
number (experimental) add a check to fragment_add_common() if the given tvb parameters are ok, otherwise throw a DissectorError add some more symbols to libethereal.def svn path=/trunk/; revision=17073
2006-01-15Hi All,Jaap Keuter1-3/+6
Find attached a couple of changes for t38: - Use the dissector to reassemble t30 frames - Dissect t30 protocol - Move the "Fax t38 analysis" to the "VoIP Calls". Now when selecting "Statistics"->"Fax t38 analysis" option, there is a message that redirect the user to use the "Voip calls" instead. We may keep this option for one release, and then remove it ? - Added in the "Voip calls" the ability to detect a t38 call if there are not signaling associated with it. For example, when using "Decode as.." to dissect t38 packets, it is possible to use the "Voip calls" to analyze that call. - Display "SDP (t38)" in the "Voip calls graph" for SDP t38 sessions. Regards Alejandro Vaquero svn path=/trunk/; revision=17033
2005-09-20Don't try to reassemble a zero-length fragment. Add a comment toGerald Combs1-0/+2
reassemble.c about the handling of zero-length fragments. svn path=/trunk/; revision=15899
2005-09-12fix reassembling problem I've introduced yesterday, by using ↵Ulf Lamping1-7/+14
fragment_add_seq_next() function instead of fragment_add() in addition, I had to implement fragment_get_reassembled() in addition to fragment_get(), which works with reassembled_table svn path=/trunk/; revision=15762
2005-09-11rename fragment_add_dcerpc -> fragment_add_dcerpc_dg to avoid confusion a bit,Ulf Lamping1-1/+1
as connection oriented (cn) and connectionless (dg) DCE/RPC uses different ways to handle defragmentation and this function is only used for dg svn path=/trunk/; revision=15757
2005-09-10fix DCE/RPC defragmentation, if both middle and last DCE/RPC fragments are ↵Ulf Lamping1-1/+26
in the same TCP desegmented data blob reassemble.c: I had to change the way the reassemble code works if the dissector is telling that more fragments *will* follow. In this case the reassemble code shouldn't try to reassemble already at that time ... I've also changed the way if a fragment was already seen or not, as it's not enough to check for the frame number, in the scenario described above. Unfortunately both changes *might* broke other protocols from reassemble properly. I've checked with excessive TCP desegmentation and it's still working without any changes :-) packet-dcerpc.c: use a tvb subset to limit the "end of bytes" processed in a single fragment dissect run, as each fragment has it's own DCE/RPC header (and isn't part of the stub data of the previous packet). svn path=/trunk/; revision=15744
2005-08-14remove two more GMemChunksRonnie Sahlberg1-18/+5
svn path=/trunk/; revision=15348
2005-07-29If we do reassembly and hand the packet to the dissector, and theGuy Harris1-0/+12
dissector says "sorry, I need even more data in this packet", don't flag that packet as being reassembled in that frame. Indicate that we should perhaps do all the "partial reassembly" stuff in "fragment_set_partial_assembly()", which would obviate the need for the hack in the TCP dissector. Clean up indentation. svn path=/trunk/; revision=15139
2005-07-26char -> const char warning fixesJörg Mayer1-1/+1
svn path=/trunk/; revision=15079
2005-07-25When reassembling a packet, all data, including data withGuy Harris1-14/+41
FD_NOT_MALLOCED set, has to be copied - all FD_NOT_MALLOCED means is that the fragment's data is part of the old reassembled data, rather than a malloced chunk of its own (this happens if, after reassembly, the dissector says more reassembly is necessary, as can happen, for example, in the case of HTTP and other protocols where reassembly continues until a terminator is seen). Not copying the data means that the reassembled data is, in part, whatever random junk happens to be in the newly-allocated buffer. Back out the change not to copy the data, but add some sanity checks, in the hopes of preventing the crash that caused the change not to copy the data to be added, and in the hopes of discovering the ultimate source of that crash and fixing it. svn path=/trunk/; revision=15057
2005-07-24Fix indentation.Guy Harris1-1/+1
svn path=/trunk/; revision=15050
2005-07-24"fragment_add_common()" isn't used outside this file - make it static.Guy Harris1-47/+44
Move to "show_fragment()" the code to append the fragment information to the top-level item. Fix indentation. svn path=/trunk/; revision=15042
2005-07-05Don't crash if we're handed a zero-length fragment. Fixes bug 272. AlthoughGerald Combs1-2/+3
we don't crash now, we still don't handle zero-length fragments correctly. svn path=/trunk/; revision=14858
2005-06-02add a generated toplevel line between the connectionless DCE/RPC protocol ↵Ulf Lamping1-6/+14
and the defragmented DCE/RPC content, to better understand what's going on if defragmentation is done. svn path=/trunk/; revision=14531
2005-06-02add a generated toplevel line between the TCP protocol and the desegmented ↵Ulf Lamping1-7/+16
content, to better understand what's going on while desegmenting. We'll have to add similar mechanisms for other protocols as well... svn path=/trunk/; revision=14527
2005-04-19From Peter Johansson: Fix a segmentation fault in the reassembly code.Gerald Combs1-6/+11
Fix up the formatting a bit. svn path=/trunk/; revision=14136
2005-04-15In fragment_unhash(), free our key data _after_ we remove the key fromGerald Combs1-5/+5
the hash table so that fragment_equal() doesn't end up working with recently-freed data. svn path=/trunk/; revision=14096
2005-03-23use DISSECTOR_ASSERT instead of g_assertUlf Lamping1-1/+1
svn path=/trunk/; revision=13871
2005-02-09Move the following files from /trunk to /trunk/epan:Lars Roland1-0/+1833
asn1.[ch] follow.[ch] ptvcursor.[ch] reassemble.[ch] xmlstub.[ch] fix #include statements accordingly. svn path=/trunk/; revision=13366