Pantek Library
Hosting Provided By
CybrHost
High Speed Hosting

How to reuse/purge ptags/pblocks?

From: Alexandre Sidorenko <asid(at)sympatico.ca>
Date: Thu Jan 16 2003 - 12:30:19 EST
('binary' encoding is not supported, stored as-is)

Hello,  

what is a recommended way to reuse structures when building several packets of different type? For example, if I send a SYN packet I need to start from  

libnet_build_tcp_options(...)  

to be able to set the initial options. Then after receiving SYN from another side (using libpcap) I want to send ACK. I don't need libnet_build_tcp_options for this but unfortunately now there are 4 pblocks on l->protocol_blocks list (I use DLPI injection). libnet_build_tcp tag is not at the head, it is linked after stale libnet_build_tcp_options pblock.  

I think that I can use libnet_pblock_free to get rid of it (it is not documented). Or I can purge l->protocol_blocks completely walking the list and free()ing as needed. This worked for me fine (I checked with Valgrind that there are no problems) but maybe there is an "official" way to start building from scratch instead of reusing ptags? I know that multiple packet injection is on TODO list so maybe the next release will document the solution. I am using libnet-1.1.1-PRERELEASE.  

Thanks in advance,  

Alex  



To unsubscribe, e-mail: libnet-unsubscribe@securityfocus.com For additional commands, e-mail: libnet-help@securityfocus.com Received on Mon Jan 20 17:57:35 2003

This archive was generated by hypermail 2.1.8 : Wed Aug 23 2006 - 14:02:22 EDT

Do you need help?X

Contact Us  Legal Notices  Order Services Online 
Pantek Home  Privacy Policy  IT news  Site Map  Pantek Library