Commit Graph

14 Commits

Author SHA1 Message Date
Matthieu Coudron bd08ab920d Introduces augmented interval trees
Interval trees (wmem_itree_t) are implemented as an extension of wmem_tree with a
guint64-based range as the key.
This is useful for instance in MPTCP analysis, to look for packets
matching a range defined by a mapping across TCP subflows.

Change-Id: Iea706d44fe975e390a4191ad0257ef37d5c71525
Reviewed-on: https://code.wireshark.org/review/11714
Reviewed-by: Evan Huus <eapache@gmail.com>
Petri-Dish: Evan Huus <eapache@gmail.com>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: Guy Harris <guy@alum.mit.edu>
2015-11-24 23:02:09 +00:00
Matthieu Coudron c2afc9edec Change prototype of callbacks passed to wmem_tree_foreach so that they
accept the node key as a first parameter.

wmem_tree accepts all sort of keys (strings, integers, soon ranges),
thus it is of interest for various purposes (testing, greedy search) to
know the key of the node.

Change-Id: Ie748b917bef91f0b1ba8cce15bd1b471922641dc
Reviewed-on: https://code.wireshark.org/review/11683
Petri-Dish: Alexis La Goutte <alexis.lagoutte@gmail.com>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: Evan Huus <eapache@gmail.com>
Reviewed-by: Michael Mann <mmann78@netscape.net>
2015-11-11 00:22:37 +00:00
Stig Bjørlykke ecc4f756bd Added Reload Lua plugins.
This is initial support for reloading Lua plugins without
restarting the application.

Still todo:
- Deregister FileHandlers
- Support deregister ProtoField with existing abbrev (same_name_hfinfo)
- Add a progress dialog when reloading many plugins
- Search for memory leakages in wslua functions

Change-Id: I48870d8741251705ca15ffe1068613fcb0cb18c1
Reviewed-on: https://code.wireshark.org/review/5028
Reviewed-by: Stig Bjørlykke <stig@bjorlykke.org>
2015-08-11 12:09:07 +00:00
Guy Harris 2b6c267a57 Eliminate use of ctype.h routines.
That way, we don't do locale-sensitive case-insensitivity (yes, the
locale can affect case-mapping - in a Turkish locale, "I" isn't the
upper-case version of "i", for example).

Change-Id: I5f7663e85160558ff3769617f924e45049c9c384
Reviewed-on: https://code.wireshark.org/review/4843
Reviewed-by: Guy Harris <guy@alum.mit.edu>
2014-10-19 22:45:27 +00:00
Bill Meier 0784451200 Adjust some whitespace to match editor modelines.
Change-Id: I9fda7de49255857cc1cf270d6202c85573d91674
Reviewed-on: https://code.wireshark.org/review/4490
Reviewed-by: Bill Meier <wmeier@newsguy.com>
2014-10-06 03:42:51 +00:00
Alexis La Goutte 296591399f Remove all $Id$ from top of file
(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>
2014-03-04 14:27:33 +00:00
Evan Huus e7a0c26bec Subsume README.binarytrees into wmem doxygen. The README was out of date
anyways, since Michael made key operations non-destructive in r44380.

svn path=/trunk/; revision=52583
2013-10-13 13:13:24 +00:00
Evan Huus 8fafa9b758 Add wmem_tree_is_empty(). Also permit lookups on a NULL tree for compatibility
with emem.

svn path=/trunk/; revision=51045
2013-07-31 01:48:47 +00:00
Evan Huus 6ebdc45af1 Fix wmem_tree.h ifdef guards, hopefully fixing the check-abi buildbot.
svn path=/trunk/; revision=50132
2013-06-24 22:37:04 +00:00
Evan Huus 5d53d63cd7 From Michal Labedzki via
https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=8824

Convert bluetooth emem trees to wmem trees.
Add modelines and fix indentation.
Correct typo in wmem_tree.h that still referred to emem.

svn path=/trunk/; revision=50076
2013-06-20 16:31:53 +00:00
Evan Huus 7c99d55773 Re-port a bunch of the red-black tree code from wmem with fewer modifications,
and enable the tests.

Lesson: make it work, *then* refactor it into sanity.

svn path=/trunk/; revision=50002
2013-06-18 05:31:12 +00:00
Evan Huus fd22c548f5 Much smarter handling of autoreset trees.
svn path=/trunk/; revision=49970
2013-06-17 00:08:44 +00:00
Evan Huus 82a13484b3 Add warning comment to tree autoreset function about allocator
destruction order, and note that it may need thinking about.

svn path=/trunk/; revision=49952
2013-06-16 01:47:43 +00:00
Evan Huus 6fd601bc3b Most of a red-black tree implementation for wmem, based heavily on the emem
version.

One plane trip's worth of work.

svn path=/trunk/; revision=49945
2013-06-15 10:40:56 +00:00