aboutsummaryrefslogtreecommitdiffstats
path: root/doc/randpktdump.pod
blob: aa193e83fb03031ec112824c884894099b5c4fdb (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
=head1 NAME

randpktdump - Provide an interface to generate random captures using randpkt

=head1 SYNOPSIS

B<randpktdump>
S<[ B<--help> ]>
S<[ B<--version> ]>
S<[ B<--extcap-interfaces> ]>
S<[ B<--extcap-dlts> ]>
S<[ B<--extcap-interface>=E<lt>interfaceE<gt> ]>
S<[ B<--extcap-config> ]>
S<[ B<--capture> ]>
S<[ B<--fifo>=E<lt>path to file or pipeE<gt> ]>
S<[ B<--maxbytes>=E<lt>bytesE<gt> ]>
S<[ B<--random-type>=E<lt>true|falseE<gt> ]>
S<[ B<--all-random>=E<lt>true|falseE<gt> ]>
S<[ B<--type>=E<lt>packet typeE<gt> ]>

=head1 DESCRIPTION

B<randpktdump> is a extcap tool that provides access to the random
packet generator (randpkt). It is mainly used for testing and
educational purpose.

=head1 OPTIONS

=over 4

=item --help

Print program arguments.

=item --version

Print program version.

=item --extcap-interfaces

List available interfaces.

=item --extcap-interface=E<lt>interfaceE<gt>

Use specified interfaces.

=item --extcap-dlts

List DLTs of specified interface.

=item --extcap-config

List configuration options of specified interface.

=item --capture

Start capturing from specified interface save saved it in place specified by --fifo.

=item --fifo=E<lt>path to file or pipeE<gt>

Save captured packet to file or send it through pipe.

=item --maxbytes=E<lt>bytesE<gt>

Set the max number of bytes per packet.

=item --random-type

Choose a random packet type for all packets if set to true.

=item --all-random

Choose a different random packet type for each packet if set to true.

=item --type=E<lt>packet typeE<gt>

Use the selected packet type. To list all the available packet type, run randpktdump --help.

=back

=head1 EXAMPLES

To see program arguments:

    randpktdump --help

To see program version:

    randpktdump --version

To see interfaces:

    randpktdump --extcap-interfaces

  Example output:
    interface {value=randpkt}{display=Random packet generator}

To see interface DLTs:

    randpktdump --extcap-interface=randpkt --extcap-dlts

  Example output:
    dlt {number=1}{name=randpkt}{display=Ethernet}

To see interface configuration options:

    randpktdump --extcap-interface=randpkt --extcap-config

  Example output:
    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}
    arg {number=1}{call=--count}{display=Number of packets}{type=long}{default=1000}{tooltip=Number of packets to generate (-1 for infinite)}
    arg {number=2}{call=--random-type}{display=Random type}{type=boolean}{default=false}{tooltip=The packets type is randomly choosen}
    arg {number=3}{call=--all-random}{display=All random packets}{type=boolean}{default=false}{tooltip=Packet type for each packet is randomly choosen}
    arg {number=4}{call=--type}{display=Type of packet}{type=selector}{tooltip=Type of packet to generate}
    value {arg=4}{value=arp}{display=Address Resolution Protocol}
    [...]
    value {arg=4}{value=usb-linux}{display=Universal Serial Bus with Linux specific header}

To capture:

    randpktdump --extcap-interface=randpkt --fifo=/tmp/randpkt.pcapng --capture

NOTE: To stop capturing CTRL+C/kill/terminate application.

=head1 SEE ALSO

wireshark(1), tshark(1), dumpcap(1), extcap(4), randpkt(1)

=head1 NOTES

B<randpktdump> is part of the B<Wireshark> distribution.  The latest version
of B<Wireshark> can be found at L<https://www.wireshark.org>.

HTML versions of the Wireshark project man pages are available at:
L<https://www.wireshark.org/docs/man-pages>.

=head1 AUTHORS

  Original Author
  ---------------
  Dario Lombardo             <lomato[AT]gmail.com>