Commit Graph

150 Commits

Author SHA1 Message Date
Jörg Mayer a3c38e1057 Include "proto.h" instead of <proto.h>
svn path=/trunk/; revision=29694
2009-09-04 11:48:04 +00:00
Kovarththanan Rajaratnam e0e33ca74b We now expose the following environment variables:
* WIRESHARK_DEBUG_EP_NO_CHUNKS
 * WIRESHARK_DEBUG_SE_NO_CHUNKS
 * WIRESHARK_DEBUG_EP_NO_CANARY
 * WIRESHARK_DEBUG_SE_NO_CANARY

This allows us to enable/disable memory chunks and canaries at runtime _without_ needing to recompile.

svn path=/trunk/; revision=29375
2009-08-11 09:24:56 +00:00
Kovarththanan Rajaratnam 7702b8766d Use ! defined(EP_DEBUG_FREE) && ! defined(SE_DEBUG_FREE) to guard canary code to get things compiling after r29358.
svn path=/trunk/; revision=29365
2009-08-10 16:36:44 +00:00
Kovarththanan Rajaratnam 3f4f8b0b94 Add unsigned int typecast
svn path=/trunk/; revision=29361
2009-08-09 21:10:04 +00:00
Kovarththanan Rajaratnam 39b1eb1015 g_error() requires a string literal.
svn path=/trunk/; revision=29360
2009-08-09 20:28:38 +00:00
Kovarththanan Rajaratnam 50c9dbca26 Split common parts of ep_free_all and se_free_all into emem_free_all.
svn path=/trunk/; revision=29359
2009-08-09 20:10:19 +00:00
Kovarththanan Rajaratnam ecb5ee8e91 Split common parts of se_alloc and ep_alloc into emem_alloc.
svn path=/trunk/; revision=29358
2009-08-09 19:23:13 +00:00
Bill Meier fdda6e8778 ep_strbuf: fix some bugs and additional changes
-Bugs
  * str->len not set correctly in some cases;
  * trailing '\0' not always accounted for;
  * (issues relating to determining when & how much 
     to expand string buffer).
-Other
  * Change append, append_c, truncate to return 
    pointer to ep_strbuf (similar to the corresponding
    GString functions);
  * Rename certain variables to clarify usage (as I understand
    the intended usage);
  * ep_strbuf_grow: use current allocated length and not current
    string length as the starting point;
  * Optimizations;
  * Add some additional comments to emem.h ep_strbuf section

  * Use consistent indentation throughout emem.c;

svn path=/trunk/; revision=28044
2009-04-14 14:08:19 +00:00
Jörg Mayer 69cc30c611 Another patch to sqelch warnings about asserts in g_strlcpy with NULL source pointer
svn path=/trunk/; revision=27985
2009-04-07 16:43:15 +00:00
Gerald Combs 6348c17c16 size_t fixes.
svn path=/trunk/; revision=27984
2009-04-07 16:36:52 +00:00
Jörg Mayer 409e59c32a Don't crash on linux:
strlen(NULL) isn't an acceptable call.

svn path=/trunk/; revision=27948
2009-04-03 17:32:32 +00:00
Gerald Combs 36f614cc1a Call ep_strbuf_append_printf() from ep_strbuf_append().
svn path=/trunk/; revision=27899
2009-03-30 19:38:47 +00:00
Gerald Combs 6c6c89e835 Add a missing check.
svn path=/trunk/; revision=27875
2009-03-28 05:14:16 +00:00
Gerald Combs 21e87a963f Replace a lot of pointer tracking and some GStrings with emem_strbufs. Add
ep_strbuf_printf and ep_strbuf_append_c.

svn path=/trunk/; revision=27873
2009-03-28 00:27:03 +00:00
Gerald Combs 446d43351c Add initial support for string buffers - ep_allocated, growable strings
similar to GLib's GStrings. Use them to create the list of TCP flags.

svn path=/trunk/; revision=27872
2009-03-27 23:05:37 +00:00
Luis Ontanon 230d917776 Add a debug helper for EP memory corruption
if compiled in and the env var WIRESHARK_DEBUG_EP_CANARY is set:
will check for canary integrity at every call to EP_CHECK_CANARY()
if corruption is found it exits pronting the prior location and the location in which corruption was found.
Hopefully it stops running while the corruptor is still in the stack.

see EP_CHECK_CANARY() calls in packet.c as an example.




svn path=/trunk/; revision=25927
2008-08-05 02:23:35 +00:00
Guy Harris 9e6329860a Fix some warnings - declare some arguments, variables, and structure
members to be const pointers when that's possible, and throw in some
casts when the GLib API fails to have properly consted arguments.

Use ep_strdup_printf() in some cases.

svn path=/trunk/; revision=25596
2008-06-25 03:05:19 +00:00
Anders Broman 36d89bb79c Fix some of the Errors/warnings detected by checkapi.
svn path=/trunk/; revision=25368
2008-05-23 05:55:34 +00:00
Jeff Morriss a5cee04fad Move the file utility functions from wiretap to libwsutil so that
libwireshark (and the plugins using those functions) do not depend on
wiretap on Windows.

While doing that, rename the eth_* functions to ws_*.

svn path=/trunk/; revision=25354
2008-05-22 15:46:27 +00:00
Stig Bjørlykke 1f3f4d39da From Marton Nemeth (bug 2484):
The variables ep_canary[], se_canary[], ep_packet_mem and se_packet_mem are
only used in emem.c, so the visibility can be file local (static).

svn path=/trunk/; revision=25132
2008-04-21 08:58:50 +00:00
Stephen Fisher 726a1caaf1 - Remove GLIB1 code
- Change ugly GLIB version checking statements to GLIB_CHECK_VERSION
- Remove ws_strsplit files because we no longer need to borrow GLIB2's
  g_strsplit code for the no longer supported GLIB1 builds


svn path=/trunk/; revision=24829
2008-04-07 05:22:54 +00:00
Jaap Keuter e1f488293a From Sami Farin:
Reads EMEM_CANARY_DATA_SIZE (15) bytes, compares return value to EMEM_CANARY_SIZE (8).
Also, I also added setbuf call in patch so it reads 15 bytes instead of 4096 or 8192.

svn path=/trunk/; revision=24596
2008-03-10 07:53:46 +00:00
Bill Meier 980b393d0d A few more pedantic fixes ...
svn path=/trunk/; revision=24302
2008-02-11 18:43:15 +00:00
Stig Bjørlykke e14c703106 From Jim Young (bug 2162):
Patch for epan/emem.c functions ep_strndup() and se_strndup() to stop valgrind
message "invalid read of size 1".

svn path=/trunk/; revision=24023
2008-01-07 20:44:32 +00:00
Ronnie Sahlberg b153578afa rework how emem trees indexed by strings so that traversing the tree
will traverse the entries in the lexical order of the key.

add a flag to lookup/insert for strings to specify whether a case 
insensitive key should be used instead of a (default) case sensitive 
key.


svn path=/trunk/; revision=23736
2007-12-04 03:26:50 +00:00
Ronnie Sahlberg c20bb13d67 for nested trees, teach emem about which nodes contain a pointer to a
subtree and which nodes that contain a pointer to user data

teach emem to be able to traverse nested trees


svn path=/trunk/; revision=23733
2007-12-04 01:44:05 +00:00
Ronnie Sahlberg 60c561e2bd add tree traversal functions
svn path=/trunk/; revision=23725
2007-12-03 22:47:23 +00:00
Bill Meier 48bb4deed1 (Somewhat academic): Fix fread related bug (when using GTK1).
svn path=/trunk/; revision=23650
2007-11-28 19:53:36 +00:00
Luis Ontanon dfbac00752 SNMP:
- As noted by Thomas Anders values are not added to the tree anymore. Move the calling of subdissectors to the end of the function, so that the value is added to the tree.
 - add port 8161 to be decoded as SNMP (hey, it's on IANA's services file!)
UAT:
 - do not have the uat reloaded.
OIDS:
 - do not complain if renaming an OID to an identical name



svn path=/trunk/; revision=22704
2007-08-28 15:18:32 +00:00
Guy Harris d2ac4f7133 Check for G_GINT64_MODIFIER in Wireshark as we do in Wiretap.
In all the places where a cast to "long long" or "unsigned long long"
was done, use G_GINT64_MODIFIER and get rid of the cast, as

	1) there's no guarantee that "%ll" works

and

	2) there's no guarantee that "long long" works

(the latter definitely does *NOT* work with MSVC++; the former doesn't
work with regular printf in MSVC++, but it might work with the GLib
printf-based functions).

svn path=/trunk/; revision=21978
2007-05-29 06:56:07 +00:00
Sebastien Tandel 76729e5d0f From David Howells :
Fix compilation failures when building wireshark-0.99.6-SVN-21916 on an
x86_64-unknown-linux-gnu target with gcc version 4.1.2 20070403 (Red Hat
4.1.2-8).

The failures fall into two categories:
  (1) Casts between pointers and 32-bit integers without an intermediary cast
via 'long' or 'unsigned long'.  This results in a compiler warning complaining
about casts between a pointer and an integer of a different size.
  (2) Passing values to "%lld" or similar printf-style format options that the
compiler thinks are a different size.  Such values need to be cast to 'long
long' or 'unsigned long long'.

svn path=/trunk/; revision=21975
2007-05-29 02:43:18 +00:00
Guy Harris 706a028996 In emem_tree_lookup_string(), return NULL if the allocation fails.
svn path=/trunk/; revision=21612
2007-04-28 21:58:42 +00:00
Guy Harris b98d651b21 In calls to the emem_tree routines, forcibly align items not known to be
aligned on 32-bit boundaries.

svn path=/trunk/; revision=21611
2007-04-28 21:09:20 +00:00
Guy Harris 1bc049906a Add some GCC warnings to the standard set, and add some others to the
--enable-extra-gcc-checks set.

If we turn on -pedantic, try turning on -Wno-long-long as well, so that
it's not *so* pedantic that it rejects the 64-bit integral data types
that we explicitly require.

Constify a bunch of stuff, and make some other changes, to get rid of
warnings.

Clean up some indentation.

svn path=/trunk/; revision=21526
2007-04-23 10:59:26 +00:00
Graham Bloice 7710d21893 Fix build failures due to windows.h being included before winsock2.h via other includes
svn path=/trunk/; revision=21335
2007-04-04 12:18:10 +00:00
Gerald Combs e97d1f0866 Squelch Coverity CIDs 225, 226, and 227.
svn path=/trunk/; revision=20552
2007-01-25 06:51:30 +00:00
Ulf Lamping e3330fd922 instead of simply doing an assert when running out of memory in emem, throw a new OutOfMemoryError Exception, so file.c can show at least a better explanation to the user before Wireshark terminates
XXX - to prevent a busy wait, I need a portable way to wait for a short time period, like Sleep() for Windows

svn path=/trunk/; revision=20437
2007-01-15 05:16:13 +00:00
Ulf Lamping c4840e61aa fix a warning
svn path=/trunk/; revision=19907
2006-11-15 23:48:56 +00:00
Ronnie Sahlberg 14810dd30c fix so that tcp.pdu.time works again.
it broken in one of the previous bugfixes to tcp

add a function to print an emem tree to the console for easier emem tree debugging


svn path=/trunk/; revision=19877
2006-11-11 22:39:25 +00:00
Ronnie Sahlberg 2fdf0e4b4b add trees with PErmanent allocation scope which will be useful for constructing
associative arrays for globally unique and persistent mappings such as
oid to name
sid to name
guid to name


svn path=/trunk/; revision=18937
2006-08-17 08:17:48 +00:00
Ronnie Sahlberg 2657b9b701 make creation of subtrees used for the _array tree type use the same allocation scope as its parent and thus become allocation scope agnostic
change all accessor functions to be defines to the emem_tree_ functions.



now   to create a tree with a different scope we only need to create a new
..._tree_create() function   and set up the appropriate defines


(it was a mistake to call the functions   se_tree_create   and se_tree_create_non_persistent,     they should be the other way around    i.e.  se_tree_create_persistent   and se_tree_create )



svn path=/trunk/; revision=18895
2006-08-14 09:36:15 +00:00
Ronnie Sahlberg 8ce8e719e0 rename some structures and defines from the se_tree to the emem_tree prefix
svn path=/trunk/; revision=18894
2006-08-14 08:29:29 +00:00
Ronnie Sahlberg 8529abb69b put a memory allocator function pointer inside the tree structure so that all accessor functions become storage scope agnostic
svn path=/trunk/; revision=18888
2006-08-12 23:27:22 +00:00
Ronnie Sahlberg db2e890949 rename some inline functions from se_ to emem_ prefix as a first step to generalize
teh tree management and to use trees with different storage scope without too much code duplication.


it would be useful with a tree that had indefinite storage instead of the emem functions which commonly have ep or se storage scope.

indefinite storage scope would be useful for example for managing a global and static set of well known guid to name mappings(not yet implemented)    and also for
oid to name mappings.

 

svn path=/trunk/; revision=18886
2006-08-12 22:43:12 +00:00
Anders Broman c72d4e8f2e From Albert Chin:
Fix some C++ comments in C source files and fixes some non-constant initializations.

svn path=/trunk/; revision=18521
2006-06-20 05:57:29 +00:00
Guy Harris 535a8bd006 Not all UN*Xes have MAP_ANONYMOUS; some have MAP_ANON instead, and some
have neither.  For those with MAP_ANON but not MAP_ANONYMOUS, use
MAP_ANON; for those with neither, add some code to use "/dev/zero".

svn path=/trunk/; revision=18488
2006-06-17 02:31:56 +00:00
Jaap Keuter 2288c8590d From Albert Chin
HP-UX doesn't have MAP_ANON but it does have MAP_ANONYMOUS. Moreoever,
according to mmap(2) on RHEL:
       MAP_ANONYMOUS
              The mapping is not backed by any file; the fd and offset argu-
              ments are ignored.  This flag in conjunction with MAP_SHARED is
              implemented since Linux 2.4.

       MAP_ANON
              Alias for MAP_ANONYMOUS. Deprecated.


svn path=/trunk/; revision=18486
2006-06-16 21:30:58 +00:00
Gerald Combs 8958bab6de Tethereal/tethereal -> TShark/tshark.
svn path=/trunk/; revision=18268
2006-05-31 17:38:42 +00:00
Anders Broman 996d4db495 Ethereal->Wireshark
svn path=/trunk/; revision=18234
2006-05-28 19:49:07 +00:00
Ronnie Sahlberg 89f022b12b name change
svn path=/trunk/; revision=18197
2006-05-21 05:12:17 +00:00
Lars Roland d9b9565032 Improve fix for Bug 915 by using GetVersionEx() as it is recommended by Microsoft. Tested on Win98 SE.
svn path=/trunk/; revision=18183
2006-05-18 00:25:14 +00:00
Ulf Lamping 1c69907dcd attempt to fix #915:
if the GetVersionEx() call fails, force the dwPlatformId to VER_PLATFORM_WIN32_WINDOWS so the return value from VirtualProtect() won't trigger an assert.

svn path=/trunk/; revision=18178
2006-05-17 09:28:14 +00:00
Jaap Keuter c59f032fec Change return value checking to the true meaning of the spec:
"If the function succeeds, the return value is nonzero."
This may or may not solve bug 915.

svn path=/trunk/; revision=18168
2006-05-15 21:42:02 +00:00
Guy Harris 25bead5edf Not all compilers support unnamed struct/union fields within
structs/unions (GCC supports it "for compatibility with other
compilers"; presumably that's not for compatibility with the version of
Sun C that rejected it - was that a PCCism?).

svn path=/trunk/; revision=18072
2006-05-02 18:02:08 +00:00
Gerald Combs e58dbf5e91 Fix logic used to test protection under Windows OT. Only initialize
our page size and OS version information once.

svn path=/trunk/; revision=18025
2006-04-28 16:40:39 +00:00
Gerald Combs 301a5f1e32 If we're running under Windows 95/98/Me, don't abort if we can't protect
our guard pages.

svn path=/trunk/; revision=18011
2006-04-26 21:06:52 +00:00
Ronnie Sahlberg 93471988aa rename se_tree_lookup32_less_than_or_equal()
to se_tree_lookup32_le()


svn path=/trunk/; revision=17664
2006-03-18 09:01:42 +00:00
Ronnie Sahlberg c4c2ce2606 add new se_tree_lookup32_less_than_or_equal() call
svn path=/trunk/; revision=17663
2006-03-18 06:15:39 +00:00
Ronnie Sahlberg f5ef51d37f revert back to svn 17587
svn path=/trunk/; revision=17597
2006-03-11 23:16:34 +00:00
Ronnie Sahlberg dfd3e11e65 oops removed one check too many
when we lookup grandparent,   check that we actually have a grandparent.



svn path=/trunk/; revision=17596
2006-03-11 22:40:52 +00:00
Ronnie Sahlberg 01bf34cb88 remove some redundant calls and checks and pass the required pointers as parameters instead to make it slightly faster
svn path=/trunk/; revision=17589
2006-03-11 13:36:22 +00:00
Ronnie Sahlberg 27de4cfd39 give se_trees names so that it is easier to debug and to log how often certain trees are accessed
svn path=/trunk/; revision=17587
2006-03-11 13:02:41 +00:00
Ronnie Sahlberg 7782c6b6f6 forgot to paint a node causing massively unbalanced tree
svn path=/trunk/; revision=17575
2006-03-11 06:12:36 +00:00
Luis Ontanon 8b22411809 avoid doing the lookup of a key twice while inserting items to a tree with an array key.
svn path=/trunk/; revision=17570
2006-03-10 21:58:49 +00:00
Ronnie Sahlberg d7f890c01e fix missing return bug from didier
svn path=/trunk/; revision=17564
2006-03-10 05:41:40 +00:00
Ronnie Sahlberg 8a9e493359 make using canaries optional
default to  use-canaries  since that is the current behaviour


svn path=/trunk/; revision=17563
2006-03-10 05:39:57 +00:00
Ronnie Sahlberg eec9a1e95a add a define that controls explicitely whether we want to use guard pages (if available) or not.
let it default to     want-guard-pages  since the existing code does that.



svn path=/trunk/; revision=17562
2006-03-10 05:15:52 +00:00
Gerald Combs 99a14bf9f1 From Jeff Morriss:
emem.c wouldn't compile with EP_DEBUG_FREE and SE_DEBUG_FREE defined.

  The attached patch fixes that and cleans up some warnings that showed
  up with those two were defined, too.  (In fact 95% of the patch is
  for warnings.)

Fix up whitespace.

svn path=/trunk/; revision=17500
2006-03-07 16:31:47 +00:00
Luis Ontanon 65f5262bb6 Rename set_string_hash... into se_tree_xxx_string as proposed by ronnie for consistency whith its real nature.
svn path=/trunk/; revision=17496
2006-03-07 14:10:30 +00:00
Luis Ontanon 888fc30d27 use an elaborated key for the string keyed "hash table"
svn path=/trunk/; revision=17491
2006-03-07 06:33:47 +00:00
Luis Ontanon 8dbad83e5c Add a hash table with string keys based on the red/black tree.
svn path=/trunk/; revision=17485
2006-03-07 01:15:29 +00:00
Ronnie Sahlberg 745994c364 add helper to build (red/black) trees from a key that is a vector of guin32 arrays.
test this functionality by calling these vector insert/lookup tree functions from the nfs dissector for when filehandles are used as a key.

these vector functions could also be used to efficiently store conversations :
se_tree_key_t[6] = {
	{ addr_len/4,   &src_addr },
	{ addr_len/4,	&dst_addr },
	{ 1,		&src_port32 },
	{ 1,		&dst_port32 },
	{ 1,		&protocol32 },
	{ 0, NULL }
}


(the nfs dissector needs a LOT of work. It is very painful to work with 
very large nfs traces with all the memory it wastes (and eats) as well as how slow all the tables make it)



svn path=/trunk/; revision=17477
2006-03-06 10:25:19 +00:00
Ronnie Sahlberg 0881211a12 initial implementation of binary tree support with se allocation scope
this is to test out a basic implementation of binary trees and the api required for the helpers


svn path=/trunk/; revision=17467
2006-03-05 04:01:34 +00:00
Gerald Combs 2eadd89e0f Use intptr_t for int-to-pointer conversions.
svn path=/trunk/; revision=17457
2006-03-03 20:44:53 +00:00
Gerald Combs f85a158981 Add guard pages to emem.c. GP memory is protected using mprotect()
under UNIX and VirtualProtect() under Windows.  This probably breaks 
compatibility with Windows 95/98/ME.

svn path=/trunk/; revision=17424
2006-02-27 20:51:53 +00:00
Gerald Combs 64104b1749 Print an error when we detect memory corruption. Fix a typo in a comment.
svn path=/trunk/; revision=17395
2006-02-23 23:12:42 +00:00
Guy Harris 58ed459c33 Have the emem.c memdup routines accept and return "void *", as
"memcpy()" does; that eliminates some compiler warnings ("void *" is the
type usually used for "generic pointer").

svn path=/trunk/; revision=17297
2006-02-14 08:34:20 +00:00
Gerald Combs f816511ea9 In packet-cops.c use proto_item_append_text() instead of creating a
separate buffer.  Fixes the current Buildbot failure.

Don't let the sprint_realloc_* functions reallocate ep_allocated memory.
Add comments warning against this in the future.

In emem.c, make sure we don't use an extra 100k every stinkin' time
someone wants to allocate memory when debugging is enabled.

Fixup whitespace.

svn path=/trunk/; revision=17051
2006-01-18 20:02:19 +00:00
Gerald Combs 24bd796553 Pass the correct arguments to fopen().
svn path=/trunk/; revision=17002
2006-01-11 17:18:33 +00:00
Gerald Combs 6d3b121deb Fix compiling under GLib 1, squelch a gcc warning.
svn path=/trunk/; revision=16998
2006-01-11 02:05:05 +00:00
Gerald Combs 0c66b4dff9 Close "/dev/urandom" if we manage to open it.
svn path=/trunk/; revision=16990
2006-01-10 21:31:33 +00:00
Gerald Combs 10c86094e5 Allocate memory on 8-byte boundaries again. Tweak the way we
fill the canary data.

svn path=/trunk/; revision=16989
2006-01-10 21:12:48 +00:00
Guy Harris c38b12da6d Allowing pointer arithmetic on "void *"s is a GCCism; cast "void *"s to
"char *" before adding an offset to them.

svn path=/trunk/; revision=16985
2006-01-10 09:01:35 +00:00
Gerald Combs c919d31d09 Add canary values after each allocation. If our canaries values don't
match when we call {ep|se}_free_all(), throw an assertion.

svn path=/trunk/; revision=16984
2006-01-09 23:11:40 +00:00
Ronnie Sahlberg 8a5ad119bf if passed a NULL string, make se_strdup() return the static string
"<NULL>" instead of dumping.

This allows callers to not have to check if the string is NULL or not.


This fixes bugs 614 615 617 620 621 and 623




svn path=/trunk/; revision=16752
2005-12-09 22:06:38 +00:00
Guy Harris 67b91b5163 Add "ep_strdup_vprintf()" and "se_strdup_vprintf()", for completeness.
Make them not reuse a va_list; there's no guarantee that it can be
used more than once and, in fact, on some platforms, you *can't* use it
more than once.  Based on a patch by Pekka Pietikainen.

Clean up indentation a bit.

svn path=/trunk/; revision=16174
2005-10-10 08:24:56 +00:00
Luis Ontanon 4ef4ca657d make .._strndup() not to call strndup.
svn path=/trunk/; revision=16167
2005-10-08 12:35:51 +00:00
Luis Ontanon 05cd36e678 ep_strndup and se_strndup do not have to expect strings to be null terminated.
svn path=/trunk/; revision=16144
2005-10-06 18:52:19 +00:00
Luis Ontanon 9860d26c68 emem.[ch]:
Add a simple stack implememtation that uses ep_alloc
Add ep_new() ep_new0() macros

tpg.[ch]:
use the stack in tpg helpers


svn path=/trunk/; revision=16061
2005-10-01 10:36:57 +00:00
Gerald Combs 12c3bd75d3 Fix a typo.
svn path=/trunk/; revision=15672
2005-09-02 19:50:01 +00:00
Gerald Combs ac90099d13 Add a pair of #defines to emem.c that make ep_alloc() and se_alloc()
use individual g_malloc() calls instead of memchunks.  This lets us use
tools like Valgrind and ElectricFence to find bugs.

In the H.245 dissector, set h245_pi to NULL after we're done with
it so that we don't go stomping through our memchunks with muddy
boots later on.  Fixes the current Buildbot menagerie failure.

svn path=/trunk/; revision=15539
2005-08-26 15:45:31 +00:00
Luis Ontanon 0de8a67599 more allocators se_alloc0() se_memdups() se_strdup() se_strndup() se_strdup_printf()
svn path=/trunk/; revision=15364
2005-08-16 00:55:08 +00:00
Ronnie Sahlberg 055e2596d9 Add beginning of seasonal allocation in addition to the existing ephemeral ones.
svn path=/trunk/; revision=15301
2005-08-12 08:51:08 +00:00
Luis Ontanon 10844226cf Remove two warnings
svn path=/trunk/; revision=15109
2005-07-27 00:45:02 +00:00
Luis Ontanon c5688891a1 new functions:
ep_tvb_memdup()
ep_alloc0()
ep_strsplit()

add all of the ep_ allocators to libethereal.def

svn path=/trunk/; revision=15100
2005-07-26 18:32:12 +00:00
Luis Ontanon 2803839cba I believe we should use DISSECTOR_ASSERT instead of g_assert.
fix and clean g_strdup_printf()


svn path=/trunk/; revision=15019
2005-07-24 01:21:38 +00:00
Luis Ontanon d9c2273262 add some utility functions that use ep_alloc instead of g_malloc.
ep_memdup
ep_strdup
ep_strndup
ep_strdup_printf


svn path=/trunk/; revision=15018
2005-07-24 00:29:57 +00:00
Ronnie Sahlberg c13d85f62d include stdlib instead of malloc.h
svn path=/trunk/; revision=15004
2005-07-22 23:38:51 +00:00
Jörg Mayer 5731769818 Set svn:keywords and svn:eol-style
svn path=/trunk/; revision=14996
2005-07-22 17:55:47 +00:00
Ronnie Sahlberg c841beb71b EMEM : a simple and FAST api to allocate memory that will be automatically freed() when the next packet is dissected.
This offesr memory allocation with a packet  scope making memory leaks less likely and memory management faster.


Add initialization calls for both tethereal and ethereal.

Convert the ip_to_str() function to use this and avoid doing the silly rotating buffers thing it previously did.


We also need an equivalent set of functions for allocation with capture file scope (free when next capture is loaded) but i dont know where to put the free_all call.



svn path=/trunk/; revision=14984
2005-07-22 07:46:58 +00:00