libnet_getpacket_size();

Mike Schiffman <[email protected]>
Newsgroups gmane.comp.security.libnet
Message-ID <[email protected]>
Ok I wrote it. It will be in the latest release, probably 1.1.2 this 
week.

[rounder:Projects/libnet/sample] root# grep -2 getpacket udp1.c
          */
         fprintf(stderr, "%d byte packet, ready to go\n",
             libnet_getpacket_size(l));
         /* __libnet_dump_pblock(l); */
         c = libnet_write(l);

rounder:Projects/libnet/sample] root# ./udp1 -s 2.2.2.2.111 -d 
2.2.2.2.222 -p.....................................................
libnet 1.1 packet shaping: UDP + IP options[raw]
101 byte packet, ready to go
Wrote 101 byte UDP packet; check the wire.
101 byte packet, ready to go
Wrote 101 byte UDP packet; check the wire.
101 byte packet, ready to go
Wrote 101 byte UDP packet; check the wire.
101 byte packet, ready to go
Wrote 101 byte UDP packet; check the wire.
101 byte packet, ready to go
Wrote 101 byte UDP packet; check the wire.
101 byte packet, ready to go
Wrote 101 byte UDP packet; check the wire.
101 byte packet, ready to go
Wrote 101 byte UDP packet; check the wire.
101 byte packet, ready to go
Wrote 101 byte UDP packet; check the wire.
101 byte packet, ready to go
Wrote 101 byte UDP packet; check the wire.
101 byte packet, ready to go
Wrote 101 byte UDP packet; check the wire.
Packets sent:  10
Packet errors: 0
Bytes written: 1010

--
Mike Schiffman, CISSP
http://www.packetfactory.net/schiffman
Doveryay No Proveryay
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.