hping wiki

hping setfield layer field value ?skip? packet

hping setfield is used to set a given field in a packet, it returns a new packet with the given field set to the specified value:
hping3.0.0-alpha> hping setfield udp sport 2000 $packet

So in order to modify a packet hold in a Tcl variable it is possible to write:
set packet [hping setfield udp sport 2000 $packet]

hping setfield can't add fields, so an attempt to set a non-existent layer/field returns an error.
Edit this page Upload file Page history - Page last update: Sun Sep 05 07:14:25 GMT 2004 by | Your address: | Admin