[Snort-devel] Copying a packet

Thomas Whipp tkw at ...415...
Thu Oct 4 04:33:09 EDT 2001


Hi all,

	something I am trying to do requires me to take a
copy of a packet to hold for possible later use - however
the Packet type has quite a lot of internal pointers so I
can't just do a memcpy.  Is there some form of utility
function that will make a safe copy of this struct - and a
corresponding utility function that will free it?

cheers

	Tom

> -----Original Message-----
> From: Pascal Bouchareine [mailto:pb at ...858...]
> Sent: 03 October 2001 15:20
> To: Martin Roesch
> Cc: snort-devel at lists.sourceforge.net
> Subject: Re: [Snort-devel] memory leak or .. ?
> 
> 
> On Wed, Oct 03, 2001 at 10:04:15AM -0400, Martin Roesch
wrote:
> > > preprocessor defrag
> > 
> > This is your probable memory leaker.  Use 'preprocessor 
> frag2' instead,
> > it's leak free.
> 
> [I'm replying to the list for the archive's EOT]
> 
> Works like a charm :)
> 
> Use stream4 instead of stream{,2}, frag2 instead of
defrag.
> 
> Thanks everybody,
> Pascal
> 
> _______________________________________________
> Snort-devel mailing list
> Snort-devel at lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/snort-devel
> 




More information about the Snort-devel mailing list