question when using options in headers..

"Mustafa Abu Sedera" <[email protected]>
Newsgroups gmane.comp.security.libnet
Message-ID <[email protected]>
I have a question when sending packets which have header options, as i 
didn't find any examples on it.

q1:
Is this order of packet building correct?
e.g. TCP:
1- build_options()
2- build_tcp_header-with payload specified, length = paylod_s+20 (or should 
i add: + option_length)
3-build_build_ipv4(LIBNET_RAW4)
4-write()

can I send a packet with no options and store the tags of the functions and 
then later use those tags to send another one WITH options, or would it be 
considered like a packet with a different protocol? (so I would have to 
clear() the context first it first)

q2:
Whats best in sending packets with different protocols:
a) defining only one libnet context and using it to send pkts of all 
protocols by calling libnet_clear_packet() after each libnte_write() 
operation.
b)defining a libnet context for each type of protocol I use and modifying 
the parameters later when needed with the tag.

q3:
even if i use the _ADV suffix the cull pkt returns an error that it was not 
advanced mode initialized.

Thanks in advance and i REALLY hope this time someone answers me.

Regards

_________________________________________________________________
Help STOP SPAM with the new MSN 8 and get 2 months FREE*  
http://join.msn.com/?page=features/junkmail
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.