aboutsummaryrefslogtreecommitdiffstats
path: root/epan/tvbuff-int.h
AgeCommit message (Collapse)AuthorFilesLines
2018-02-08epan: use SPDX indentifiers.Dario Lombardo1-13/+1
Skipping dissectors dir for now. Change-Id: I717b66bfbc7cc81b83f8c2cbc011fcad643796aa Reviewed-on: https://code.wireshark.org/review/25694 Petri-Dish: Dario Lombardo <lomato@gmail.com> Tested-by: Petri Dish Buildbot Reviewed-by: Anders Broman <a.broman58@gmail.com>
2015-02-21Remove tvb_ from the names of wsutil mempbrk routines.Guy Harris1-1/+1
Routines that don't take a tvbuff as an argument shouldn't have tvb_ in the name. Change-Id: I3550256551e30b3f329cbbfca71ef27c727d29c0 Reviewed-on: https://code.wireshark.org/review/7302 Reviewed-by: Guy Harris <guy@alum.mit.edu>
2015-02-11Combine SSE and pre-compiled patterns for faster pbrkHadriel Kaplan1-1/+1
This combines the SSE4.2 instructions usage, with pre-compiled pattern searching usage, for a faster pbrk search method. Testing against large files of HTTP and SIP, there is about a 5% performance improvement by using pre-"compiled" patterns for guint8_pbrk() instead of passing it the search string and having it build the match array every time. Similar to regular expressions, "compiling" the pattern match array in advance only once and using the "compiled" patterns for the searches is faster than compiling it every time. Change-Id: Ifcbc14a6c93f32d15663a10d974bacdca5119a8e Ping-Bug: 10798 Reviewed-on: https://code.wireshark.org/review/6990 Petri-Dish: Hadriel Kaplan <hadrielk@yahoo.com> Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org> Reviewed-by: Anders Broman <a.broman58@gmail.com>
2014-03-04Remove all $Id$ from top of fileAlexis La Goutte1-2/+0
(Using sed : sed -i '/^ \* \$Id\$/,+1 d') Fix manually some typo (in export_object_dicom.c and crc16-plain.c) Change-Id: I4c1ae68d1c4afeace8cb195b53c715cf9e1227a8 Reviewed-on: https://code.wireshark.org/review/497 Reviewed-by: Anders Broman <a.broman58@gmail.com>
2013-09-07- no need for a doubly-linked list of TVBs, single is simplerEvan Huus1-1/+0
- support merging chains in tvb_add_to_chain - when we have an old reassembled TVB, just merge the chains rather than freeing it (we may still need it as it may already be a data source) - modelines Fixes https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=9027 #BACKPORT, but it's gonna be messy... svn path=/trunk/; revision=51825
2013-08-04Cleanup tvbJakub Zawadzki1-1/+1
- make tvb_ops->tvb_size a gsize field, not function call - remove not needed forward declaration / forward line svn path=/trunk/; revision=51141
2013-07-31Move tvbuff composite structure to their own file.Jakub Zawadzki1-17/+0
svn path=/trunk/; revision=51072
2013-07-14Rewrite reassemble API to use TVBs instead of raw data.Jakub Zawadzki1-1/+1
(it seems to be working for TCP ^^) svn path=/trunk/; revision=50580
2013-07-14Rewrite packet-mime-encap to use composite tvbs + cloningJakub Zawadzki1-0/+2
svn path=/trunk/; revision=50571
2013-07-14Fix tvbtest linking, move private structures to tvbuff_subsetJakub Zawadzki1-17/+0
svn path=/trunk/; revision=50570
2013-07-14Move tvb real and subset implementations to seperate files.Jakub Zawadzki1-7/+5
svn path=/trunk/; revision=50569
2013-07-13Add support for cloning TVBs, move tvb_new() prototype to wtap-int.hJakub Zawadzki1-0/+3
svn path=/trunk/; revision=50558
2013-07-10tvbuff: remove ->tvb_init() from opsJakub Zawadzki1-1/+0
->tvb_init() knows nothing about new tvb and can only do some kind of bzero() it's much better if we initialize object after tvb_new() [which anyway must be done] + try to fix OSX build. svn path=/trunk/; revision=50490
2013-07-10tvbuff: allow tvb-implementations using their own structure (it's fine as ↵Jakub Zawadzki1-7/+18
long as first member of struct is tvbuff) Move some stuff outside tvbuff struct. svn path=/trunk/; revision=50489
2013-07-10Fix previous commit. Devel env with -w in CFLAGS is not so good idea...Jakub Zawadzki1-3/+3
svn path=/trunk/; revision=50487
2013-07-10tvbuff: replace type with operation vtableJakub Zawadzki1-1/+14
It's begin of work to allow adding new tvbuff types (think: wtap_tvbuff, base64_tvbuff). svn path=/trunk/; revision=50486
2013-04-20When we're dissecting the beginning of a fragmented packet that weGuy Harris1-6/+6
haven't reassembled, we're probably moving sequentially through the packet, which means that we'll run past the end of the fragment rather than past the end of what would have been the reassembled packet had we reassembled it. I.e., there's little reason to care whether we're past the end of the fragment but not past the end of the packet, or whether we're past the end of the packet; in either case, we're past the end of the fragment, and if somebody wants to know whether the packet is malformed by stopping short of certain fields, they should enable reassembly. So we get rid of the explicit fragment length in tvbuffs and, instead, have a "this is a fragment" flag; if that flag is set, we throw FragmentBoundsError rather than ReportedBoundsError if we run past the end of the reported data. (This also means we could flag the tvbuff even if we don't know how large the reassembled packet will be, e.g. when doing IP reassembly.) Replace tvb_new_subset_length_fragment() with tvb_new_subset_length() and a new "set the "this is a fragment flag"" routine. svn path=/trunk/; revision=48940
2013-04-18Add to tvbuffs a "fragment length" field; if the tvbuff represents theGuy Harris1-0/+6
first fragment of a non-reassembled packet, and we know the length the packet would have if it were reassembled, this field holds the length of the fragment, and the "reported length" field shows the length the packet would have if it were reassembled, so going past the end of the fragment but staying within the length of the reassembled packet can be reported as "dissection would have worked if the packet had been reassembled" rather than "the packet is too short, so it was probably malformed". Add a FragmentBoundsError exception, thrown in the "dissection would have worked if the packet had been reassembled" case. Add a new tvb_new_subset_length_fragment() routine to create a new subset tvb with specified fragment and reported lengths. Use it in the CLNP dissector. Add some more sanity checks in the CLNP dissector. svn path=/trunk/; revision=48917
2012-06-28Update Free Software Foundation address.Jakub Zawadzki1-1/+1
(COPYING will be updated in next commit) svn path=/trunk/; revision=43536
2011-12-21A simplified version of tvbuffs:Bill Meier1-6/+4
- Essentially no changes from current dissector de facto tvbuff usage; - Do away with 'usage_counts' and with 'used_in' GSLists; - Manage tvb chains via a simple doubly linked list. - API changes: a. tvb_increment_usage_count() and tvb_decrement_usage_count() no longer exist; b. tvb_free_chain() can only be called for the 'top-level' (initial) tvb of a chain) or for a tvb not in a chain. c. tvb_free() now just calls tvb_free_chain() [should have no impact on existing dissectors]. svn path=/trunk/; revision=40264
2011-05-27Make TVBs opaque for most users.Jeff Morriss1-0/+91
Convert TVB_RAW_OFFSET() and TVB_GET_DS_TVB() into functions. svn path=/trunk/; revision=37422