tests: add regression tests for Follow TCP Stream
[metze/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<pcap> 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
60         arp             Address Resolution Protocol
61         bgp             Border Gateway Protocol
62         bvlc            BACnet Virtual Link Control
63         dns             Domain Name Service
64         eth             Ethernet
65         fddi            Fiber Distributed Data Interface
66         giop            General Inter-ORB Protocol
67         icmp            Internet Control Message Protocol
68         ip              Internet Protocol
69         ipv6            Internet Protocol Version 6
70         llc             Logical Link Control
71         m2m             WiMAX M2M Encapsulation Protocol
72         megaco          MEGACO
73         nbns            NetBIOS-over-TCP Name Service
74         ncp2222         NetWare Core Protocol
75         sctp            Stream Control Transmission Protocol
76         syslog          Syslog message
77         tds             TDS NetLib
78         tcp             Transmission Control Protocol
79         tr              Token-Ring
80         udp             User Datagram Protocol
81         usb             Universal Serial Bus
82         usb-linux       Universal Serial Bus with Linux specific header
83
84 =back
85
86 =head1 EXAMPLES
87
88 To see a description of the randpkt options use:
89
90     randpkt
91
92 To generate a capture file with 1000 DNS packets use:
93
94     randpkt -b 500 -t dns rand_dns.pcap
95
96 To generate a small capture file with just a single LLC frame use:
97
98     randpkt -b 100 -c 1 -t llc single_llc.pcap
99
100 =head1 SEE ALSO
101
102 pcap(3), editcap(1)