tap-follow: fix memory leak
[metze/wireshark/wip.git] / doc / randpktdump.pod
1 =begin man
2
3 =encoding utf8
4
5 =end man
6
7 =head1 NAME
8
9 randpktdump - Provide an interface to generate random captures using randpkt
10
11 =head1 SYNOPSIS
12
13 B<randpktdump>
14 S<[ B<--help> ]>
15 S<[ B<--version> ]>
16 S<[ B<--extcap-interfaces> ]>
17 S<[ B<--extcap-dlts> ]>
18 S<[ B<--extcap-interface>=E<lt>interfaceE<gt> ]>
19 S<[ B<--extcap-config> ]>
20 S<[ B<--capture> ]>
21 S<[ B<--fifo>=E<lt>path to file or pipeE<gt> ]>
22 S<[ B<--maxbytes>=E<lt>bytesE<gt> ]>
23 S<[ B<--count>=E<lt>numE<gt> ]>
24 S<[ B<--delay>=E<lt>msE<gt> ]>
25 S<[ B<--random-type>=E<lt>true|falseE<gt> ]>
26 S<[ B<--all-random>=E<lt>true|falseE<gt> ]>
27 S<[ B<--type>=E<lt>packet typeE<gt> ]>
28
29 =head1 DESCRIPTION
30
31 B<randpktdump> is a extcap tool that provides access to the random
32 packet generator (randpkt). It is mainly used for testing and
33 educational purpose.
34
35 =head1 OPTIONS
36
37 =over 4
38
39 =item --help
40
41 Print program arguments.
42
43 =item --version
44
45 Print program version.
46
47 =item --extcap-interfaces
48
49 List available interfaces.
50
51 =item --extcap-interface=E<lt>interfaceE<gt>
52
53 Use specified interfaces.
54
55 =item --extcap-dlts
56
57 List DLTs of specified interface.
58
59 =item --extcap-config
60
61 List configuration options of specified interface.
62
63 =item --capture
64
65 Start capturing from specified interface save saved it in place specified by --fifo.
66
67 =item --fifo=E<lt>path to file or pipeE<gt>
68
69 Save captured packet to file or send it through pipe.
70
71 =item --maxbytes=E<lt>bytesE<gt>
72
73 Set the max number of bytes per packet.
74
75 =item --count=E<lt>numE<gt>
76
77 Number of packets to generate (-1 for infinite).
78
79 =item --delay=E<lt>msE<gt>
80
81 Wait a number of milliseconds after writing each packet.
82
83 =item --random-type
84
85 Choose a random packet type for all packets if set to true.
86
87 =item --all-random
88
89 Choose a different random packet type for each packet if set to true.
90
91 =item --type=E<lt>packet typeE<gt>
92
93 Use the selected packet type. To list all the available packet type, run randpktdump --help.
94
95 =back
96
97 =head1 EXAMPLES
98
99 To see program arguments:
100
101     randpktdump --help
102
103 To see program version:
104
105     randpktdump --version
106
107 To see interfaces:
108
109     randpktdump --extcap-interfaces
110
111   Example output:
112     interface {value=randpkt}{display=Random packet generator}
113
114 To see interface DLTs:
115
116     randpktdump --extcap-interface=randpkt --extcap-dlts
117
118   Example output:
119     dlt {number=1}{name=randpkt}{display=Ethernet}
120
121 To see interface configuration options:
122
123     randpktdump --extcap-interface=randpkt --extcap-config
124
125   Example output:
126     arg {number=0}{call=--maxbytes}{display=Max bytes in a packet}{type=unsigned}{range=1,5000}{default=5000}{tooltip=The max number of bytes in a packet}
127     arg {number=1}{call=--count}{display=Number of packets}{type=long}{default=1000}{tooltip=Number of packets to generate (-1 for infinite)}
128     arg {number=2}{call=--delay}{display=Packet delay (ms)}{type=long}{default=0}{tooltip=Milliseconds to wait after writing each packet}
129     arg {number=3}{call=--random-type}{display=Random type}{type=boolflag}{default=false}{tooltip=The packets type is randomly chosen}
130     arg {number=4}{call=--all-random}{display=All random packets}{type=boolflag}{default=false}{tooltip=Packet type for each packet is randomly chosen}
131     arg {number=5}{call=--type}{display=Type of packet}{type=selector}{tooltip=Type of packet to generate}
132     value {arg=5}{value=arp}{display=Address Resolution Protocol}
133     [...]
134     value {arg=5}{value=usb-linux}{display=Universal Serial Bus with Linux specific header}
135
136 To capture:
137
138     randpktdump --extcap-interface=randpkt --fifo=/tmp/randpkt.pcapng --capture
139
140 NOTE: To stop capturing CTRL+C/kill/terminate application.
141
142 =head1 SEE ALSO
143
144 wireshark(1), tshark(1), dumpcap(1), extcap(4), randpkt(1)
145
146 =head1 NOTES
147
148 B<randpktdump> is part of the B<Wireshark> distribution.  The latest version
149 of B<Wireshark> can be found at L<https://www.wireshark.org>.
150
151 HTML versions of the Wireshark project man pages are available at:
152 L<https://www.wireshark.org/docs/man-pages>.
153
154 =head1 AUTHORS
155
156   Original Author
157   ---------------
158   Dario Lombardo             <lomato[AT]gmail.com>