4 randpkt - Random Packet Generator
9 S<[ B<-b> E<lt>maxbytesE<gt> ]>
10 S<[ B<-c> E<lt>countE<gt> ]>
11 S<[ B<-t> E<lt>typeE<gt> ]>
16 B<randpkt> is a small utility that creates a B<pcap> trace file
17 full of random packets.
19 By creating many randomized packets of a certain type, you can
20 test packet sniffers to see how well they handle malformed packets.
21 The sniffer can never trust the data that it sees in the packet because
22 you can always sniff a very bad packet that conforms to no standard.
23 B<randpkt> produces I<very bad> packets.
25 When creating packets of a certain type, B<randpkt> uses a sample
26 packet that is stored internally to B<randpkt>. It uses this as the
27 starting point for your random packets, and then adds extra random
28 bytes to the end of this sample packet.
30 For example, if you choose to create random ARP packets, B<randpkt>
31 will create a packet which contains a predetermined Ethernet II header,
32 with the Type field set to ARP. After the Ethernet II header, it will
33 put a random number of bytes with random values.
39 =item -b E<lt>maxbytesE<gt>
43 Defines the maximum number of bytes added to the sample packet.
44 If you choose a B<maxbytes> value that is less than the size of the
45 sample packet, then your packets would contain only the sample
46 packet... not much variance there! B<randpkt> exits on that condition.
48 =item -c E<lt>countE<gt>
52 Defines the number of packets to generate.
54 =item -t E<lt>typeE<gt>
56 Default Ethernet II frame.
58 Defines the type of packet to generate:
60 arp Address Resolution Protocol
61 bgp Border Gateway Protocol
62 bvlc BACnet Virtual Link Control
63 dns Domain Name Service
65 fddi Fiber Distributed Data Interface
66 giop General Inter-ORB Protocol
67 icmp Internet Control Message Protocol
69 llc Logical Link Control
70 m2m WiMAX M2M Encapsulation Protocol
72 nbns NetBIOS-over-TCP Name Service
73 ncp2222 NetWare Core Protocol
74 sctp Stream Control Transmission Protocol
77 tcp Transmission Control Protocol
79 udp User Datagram Protocol
80 usb Universal Serial Bus
81 usb-linux Universal Serial Bus with Linux specific header
87 To see a description of the randpkt options use:
91 To generate a capture file with 1000 DNS packets use:
93 randpkt -b 500 -t dns rand_dns.pcap
95 To generate a small capture file with just a single LLC frame use:
97 randpkt -b 100 -c 1 -t llc single_llc.pcap