aboutsummaryrefslogtreecommitdiffstats
path: root/epan/epan.c
AgeCommit message (Collapse)AuthorFilesLines
2012-12-19Dispatch all allocator creations through a single function using an enum toEvan Huus1-2/+1
determine the desired type. This has two advantages over the old way: - just one environment variable for valgrind to override in order to guarantee that ALL allocators use memory it can track, and just one place to check that variable - allocator owners no longer have to include headers specific to their allocator, allowing them to change allocators without adjusting all their #includes svn path=/trunk/; revision=46604
2012-12-18Rename allocator_glib to allocator_simple, since the block allocator alsoEvan Huus1-2/+2
uses glib and 'simple' describes the intention far better. svn path=/trunk/; revision=46603
2012-12-18Use 'new' instead of 'create' a consistent manner.Evan Huus1-1/+1
svn path=/trunk/; revision=46601
2012-12-02Actually destroy the pool in epan_dissect_cleanup. There are many casesEvan Huus1-2/+1
where the edt is on the stack, in which case epan_dissect_free never gets called and we were leaking the pool (although not any of the memory in it). svn path=/trunk/; revision=46333
2012-12-02Create a wmem pool in pinfo and use it for some address allocations.Evan Huus1-0/+6
A (better?) fix for https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=8030 See also thread starting at: http://www.wireshark.org/lists/wireshark-dev/201212/msg00001.html svn path=/trunk/; revision=46331
2012-11-03Manually revert r45669Jakub Zawadzki1-14/+0
svn path=/trunk/; revision=45884
2012-11-03Add wmem scopes for packet and file lifetimes. The file lifetime scope isn'tEvan Huus1-0/+4
yet initialized because I can't figure out where the enter() and leave() calls should go - the obvious place in packet.c causes a lot of assertion errors. svn path=/trunk/; revision=45879
2012-10-27Create init and cleanup functions for wmem as a whole.Evan Huus1-1/+4
Call them from epan_init() and epan_cleanup(). Expose a permanent wmem scope for allocations that should only be freed when epan is done (which is *not* necessarily when the program finishes). svn path=/trunk/; revision=45805
2012-10-20Move ep_free_all() *AFTER* packet dissection.Jakub Zawadzki1-6/+6
Use glib allocator for data_source. Thread on wireshark-dev: http://www.wireshark.org/lists/wireshark-dev/201210/msg00116.html svn path=/trunk/; revision=45673
2012-10-20Introduce epan_dissect_run_with_taps() which run dissection with taps.Jakub Zawadzki1-0/+12
unexport tap_queue_init, tap_push_tapped_queue svn path=/trunk/; revision=45670
2012-10-20- Allow reseting edt with new function epan_dissect_reset(),Jakub Zawadzki1-0/+14
- initialize edt once in few places, and later reset it after dissecting (add_packet_to_packet_list), - revert r45667, probably no longer needed. svn path=/trunk/; revision=45669
2012-10-16Add wtap_pseudo_header union to wtap_pkthdr structure.Jakub Zawadzki1-2/+2
Use pkthdr instead of pseudo_header as argument for dissecting. svn path=/trunk/; revision=45601
2012-10-11From Bartosz Brachaczek:Anders Broman1-2/+6
Make the SSL dissector work with GnuTLS compiled with nettle. https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=6869 #BACKPORT svn path=/trunk/; revision=45465
2012-10-10Revert changes to ep_ allocator, revert edt ref-counting.Jakub Zawadzki1-4/+3
svn path=/trunk/; revision=45451
2012-10-08EDT structures now own their ep_ memory pools. This should finally cleanEvan Huus1-12/+15
up the last little bits of: - https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=5284 - https://www.wireshark.org/lists/wireshark-dev/201208/msg00128.html and possibly part of: - https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=7775 This is a fairly invasive change that required some funky work with linked lists to avoid changing any of the public ep_* APIs, so if something breaks blame me :) svn path=/trunk/; revision=45389
2012-09-20We always HAVE_CONFIG_H so don't bother checking whether we have it or not.Jeff Morriss1-2/+0
svn path=/trunk/; revision=45016
2012-08-28Remove useless include (GeoIP initialization was removed from epan_init() in ↵Pascal Quantin1-4/+0
r43604) svn path=/trunk/; revision=44692
2012-08-10Make the corresponding packet_info available to each tree item. ThisGerald Combs1-1/+1
lets us pass a NULL pinfo to expert_add_info_format() and expert_add_undecoded_item(), which makes it possible to use those routines deep in the bowels of many dissectors. As a proof of concept remove the recent pinfo additions to packet-afp.c. This should also make it easier to fix bug 3884. svn path=/trunk/; revision=44435
2012-07-08From Evan Huus:Guy Harris1-4/+0
Don't initialize GeoIP from epan_init(), as we probably haven't loaded the preferences for it yet (thanks to it's new use of the UAT framework). Instead, register a post_update callback with UAT and load it there. As a bonus, this also means that applying GeoIP preferences no longer requires restarting Wireshark - everything should Just Work with the new databases right away. Fixes bug 7446. svn path=/trunk/; revision=43604
2012-06-28Update Free Software Foundation address.Jakub Zawadzki1-1/+1
(COPYING will be updated in next commit) svn path=/trunk/; revision=43536
2012-06-25From Tony Trinh:Anders Broman1-4/+4
Update Lua from 5.1 to 5.2 https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=7400 svn path=/trunk/; revision=43482
2012-04-26Refcount edt.s as we may have atleast two "active" edt:s in certainAnders Broman1-3/+14
circumstances see bug https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=5284 patch by Evan Huus svn path=/trunk/; revision=42254
2012-04-03Fix dependent_frames memleak. Jakub Zawadzki1-0/+2
Reviewed-By: Jeff Morriss (http://www.wireshark.org/lists/wireshark-dev/201204/msg00013.html) svn path=/trunk/; revision=41902
2012-02-28Fix https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=3315 -Jeff Morriss1-0/+2
make Save-As/Displayed/All-Packets save not only the displayed packets but also any other packets needed (e.g., for reassembly) to fully dissect the displayed packets. This works only for the "All packets" case; choosing only the Selected packet, the Marked packets, or a range of packets would require actually storing which packets depend on which (too much memory) or going through the packet list many times (too slow). Also, this behavior is always the case: you can't save the displayed packets without their dependencies (I don't see why this would be desirable). So far this is done for SCTP and things using the reassembly routines (TCP has been tested). The Win32 dialog was modified but hasn't been tested yet. One confusing aspect of the UI is that the Displayed count in the Save-As dialog does not match the number of displayed packets. (I tried renaming the button "Displayed + Dependencies" but it looked too big.) The tooltip tries to explain this and the fact that this works only in the All-Packets case; suggestions for improvement are welcome. Implementation details: Dissectors (or the reassembly code) can list frames which were needed to build the current frame's tree. If the current frame passes the display filter then each listed frame is marked as "depended upon" (this takes up the last free frame_data flag). When performing a Save-As/Displayed/All-Packets then choose packets which passed the dfilter _or_ are depended upon. svn path=/trunk/; revision=41216
2011-12-21Remove no longer relevant comment about incrementing tvb usage count to ↵Bill Meier1-3/+1
prevent freeing tvbs. svn path=/trunk/; revision=40265
2011-10-02Added register action for loading Lua plugins.Stig Bjørlykke1-1/+1
Removed an unused argument to wslua_init(). svn path=/trunk/; revision=39214
2011-09-06Whitespace cleanup.Stig Bjørlykke1-2/+2
svn path=/trunk/; revision=38893
2011-08-23Remove support for libpcre, we use GRegex in GLib.Stig Bjørlykke1-17/+0
svn path=/trunk/; revision=38683
2011-07-11More GLIB_CHECK_VERSION cleanups. Update the minimum GLib/GTK+ versionsGerald Combs1-2/+0
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-06-16Constify a return value, to squelch a compiler warning.Guy Harris1-2/+2
svn path=/trunk/; revision=37680
2011-06-11Include <Python.h> to get the Python version number.Guy Harris1-1/+4
svn path=/trunk/; revision=37651
2010-09-23Revert 34191 and add some casts insteadJeff Morriss1-3/+3
svn path=/trunk/; revision=34193
2010-09-23Use gsize (size_t) in a couple of places to make the Win64 build happy.Jeff Morriss1-3/+3
svn path=/trunk/; revision=34191
2010-09-22When using a custom column, make it possible to select which occurrence to ↵Sake Blok1-1/+2
show if the field has multiple occurrences. svn path=/trunk/; revision=34186
2010-07-15If we have neither libgnutls nor libgcrypt,Guy Harris1-1/+5
epan_get_runtime_version_info() does nothing, and thus doesn't use its argument. svn path=/trunk/; revision=33532
2010-07-15Move the code to get version information for libraries used byGuy Harris1-1/+132
libwireshark into libwireshark, and call it only in programs linked with libwireshark. That way, programs that don't link with libwireshark don't have to link with libgcrypt or libgnutls solely so that they can say that they're linked with a particular version of libgcrypt or libgnutls. Don't link dumpcap with libgcrypt or libgnutls any more. svn path=/trunk/; revision=33531
2010-06-02From David Bond:Anders Broman1-1/+1
Added the IEEE defined ether types for TRILL and Layer 2 ISIS. Also had ISIS register itself with the ethertype dissector. References: http://www.postel.org/pipermail/rbridge/2010-May/003998.html http://tools.ietf.org/html/draft-ietf-isis-layer2-05 http://tools.ietf.org/html/draft-ietf-trill-rbridge-protocol-16 https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=4825 svn path=/trunk/; revision=33059
2010-04-03 From Yaniv Kaul: constify parametersBill Meier1-5/+5
https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=4422 From me: Fix a number of instances where the function prototype or the function definition wasn't changed so there was a mismatch thus causing Windows (but not gcc) compilation errors. svn path=/trunk/; revision=32365
2010-04-02Revert SVN #32360 until Windows compilation errors corrected.Bill Meier1-5/+5
svn path=/trunk/; revision=32361
2010-04-02From Yaniv Kaul: constify parametersBill Meier1-5/+5
https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=4422 svn path=/trunk/; revision=32360
2010-03-03Disable OID resolution and loading SMI modules by default.Balint Reczey1-1/+0
Add an option to enable OID resolution. Add an option to suppress errors reported by libsmi. svn path=/trunk/; revision=32096
2010-01-28Fix various gcc -Wshadow warnings.Bill Meier1-6/+6
svn path=/trunk/; revision=31720
2009-12-21Switch to using a bundled version of the openSUSE Build Service packagesGerald Combs1-4/+0
for GNUTLS since they provide 32-bit and 64-bit Windows packages. We no longer have winposixtype.h, so remove its #includes and add a ssize_t typedef to config.h.win32. svn path=/trunk/; revision=31341
2009-10-20Add emem_init() which initializes both the ep_ and se_ allocators; have allJeff Morriss1-2/+1
callers use that instead of initializing each allocator individually. svn path=/trunk/; revision=30646
2009-09-08Add an option to col_fill_in() to allow us to disable column expression ↵Kovarththanan Rajaratnam1-2/+2
processing. This is rarely needed. It's only needed when the user right clicks on the packet list view to generate a display filter. svn path=/trunk/; revision=29806
2009-09-08From : Didier GautheronAnders Broman1-2/+2
speed up a little proto_custom_set. https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=3972 svn path=/trunk/; revision=29789
2009-09-06Split a bunch of init routines into init() and cleanup(). This allows us to ↵Kovarththanan Rajaratnam1-2/+13
free memory properly on shutdown. This is an initial step. There's still some work to do. svn path=/trunk/; revision=29754
2009-08-25From Didier Gautheron:Anders Broman1-1/+12
move custom col set from proto_tree_set_xxx() to epan_dissect_fill_in_columns(). https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=3930 I'v added the new functions to the .h files. svn path=/trunk/; revision=29551
2009-08-13Introduce epan_dissect_init()/epan_dissect_cleanup(). These are used to ↵Kovarththanan Rajaratnam1-6/+20
initialise/cleanup stack allocated 'edt' structures. This should speed up dissection since we avoid some malloc traffic. svn path=/trunk/; revision=29404
2009-08-11TRY_TO_FAKE_THIS_ITEM now fakes FT_PROTOCOL per default. If there are any ↵Kovarththanan Rajaratnam1-0/+7
users (e.g. proto_hier_stats.c, others?) that relies on FT_PROTOCOL nodes being created they'll now need to call the newly introduced epan_dissect_fake_protocols() to disable this optimization. Also make use of TRY_TO_FAKE_THIS_ITEM in proto_tree_add_text_node(), proto_tree_add_none_format() and proto_tree_add_protocol_format(). svn path=/trunk/; revision=29380