Update ptvcursor API description to reflect 'endianness' --> 'encoding' parameter...
[obnox/wireshark/wip.git] / doc / randpkt.pod
1
2 =head1 NAME
3
4 randpkt - Random Packet Generator
5
6 =head1 SYNOPSIS
7
8 B<randpkt>
9 S<[ B<-b> E<lt>maxbytesE<gt> ]>
10 S<[ B<-c> E<lt>countE<gt> ]>
11 S<[ B<-t> E<lt>typeE<gt> ]>
12 E<lt>filenameE<gt>
13
14 =head1 DESCRIPTION
15
16 B<randpkt> is a small utility that creates a B<libpcap> trace file
17 full of random packets.
18
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.
24
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.
29
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.
34
35 =head1 OPTIONS
36
37 =over 4
38
39 =item -b E<lt>maxbytesE<gt>
40
41 Default 5000.
42
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.
47
48 =item -c E<lt>countE<gt>
49
50 Default 1000.
51
52 Defines the number of packets to generate.
53
54 =item -t E<lt>typeE<gt>
55
56 Default Ethernet II frame.
57
58 Defines the type of packet to generate:
59         arp     Address Resolution Protocol
60         bgp     Border Gateway Protocol
61         bvlc    BACnet Virtual Link Control
62         dns     Domain Name Service
63         eth     Ethernet
64         fddi    Fiber Distributed Data Interface
65         giop    General Inter-ORB Protocol
66         icmp    Internet Control Message Protocol
67         ip      Internet Protocol
68         llc     Logical Link Control
69         m2m     WiMAX M2M Encapsulation Protocol
70         megaco  MEGACO
71         nbns    NetBIOS-over-TCP Name Service
72         ncp2222 NetWare Core Protocol
73         sctp    Stream Control Transmission Protocol
74         syslog  Syslog message
75         tds     TDS NetLib
76         tcp     Transmission Control Protocol
77         tr      Token-Ring
78         udp     User Datagram Protocol
79         usb     Universal Serial Bus
80         usb-linux       Universal Serial Bus with Linux specific header
81
82 =back
83
84 =head1 EXAMPLES
85
86 To see a description of the randpkt options use:
87
88     randpkt
89
90 To generate a capture file with 1000 DNS packets use:
91
92     randpkt -b 500 -t dns rand_dns.pcap
93
94 To generate a small capture file with just a single LLC frame use:
95
96     randpkt -b 100 -c 1 -t llc single_llc.pcap
97
98 =head1 SEE ALSO
99
100 pcap(3), editcap(1)