Huge thanks to our Platinum Members Endace and LiveAction,
and our Silver Member Veeam, for supporting the Wireshark Foundation and project.

Ethereal-dev: [Ethereal-dev] Re: rev 14984: /trunk/epan/: Makefile.common emem.c emem.h epan.c

Note: This archive is from the project's previous web site, ethereal.com. This list is no longer active.

From: ronnie sahlberg <ronniesahlberg@xxxxxxxxx>
Date: Fri, 22 Jul 2005 18:03:19 -0400
looking through tvb_memdup() the only caller that use it and expect
the data to be persistent are packet-nfs.c  which is easy to solve by
just adding a real g_malloc() to encapsulate the call.
Or even better, encapsulating it in a future ec_alloc() instead  since
NFS only expects these structs to live until the end of the capture
files lifetime anyway.

So,    if we first add ec_* functions   then changing tvb_memdup() to
return a packet with packet scope lifetime will be easy and only
require some small changes to packet-nfs.c



On 7/22/05, LEGO <luis.ontanon@xxxxxxxxx> wrote:
> some  questions:
> 
> -  should we have a tvb_memdup(), tvb_get_string(), tvb_get_stringz()
> that return an ep_allocated buffer?
> 
> - what about tvb_bytes_to_str(), bytes_to_str(), bytes_to_str_punct(),
> hex_str_to_bytes()?
> 
> _______________________________________________
> Ethereal-dev mailing list
> Ethereal-dev@xxxxxxxxxxxx
> http://www.ethereal.com/mailman/listinfo/ethereal-dev
>