diff options
author | Gerald Combs <gerald@wireshark.org> | 2021-06-18 03:20:51 -0700 |
---|---|---|
committer | Wireshark GitLab Utility <gerald+gitlab-utility@wireshark.org> | 2021-10-01 16:42:34 +0000 |
commit | 84ab55cf752f96268dd67f54556e0423b78f979b (patch) | |
tree | 895b1f3b9be0d476a7e78ecce9e603b10a8802c3 /doc/randpkt.adoc | |
parent | 9f1607ab473c578d714320fa735fb0bc4e1d1e96 (diff) |
Docs+Packaging: Convert our man pages to Asciidoctor.
Convert doc/*.pod to Asciidoctor. This:
* Means we use the same markup for our man pages, the guides, and
release notes.
* Lets us add versions to our man pages.
* Gives us more formatting options, e.g. AsciiDoc supports `commands`,
nested lists and makes it easy to include version information. The
manpage backend doesn't seem to support tables very well,
unfortunately.
Convert our CMake configuration to produce *roff and html man pages
using Asciidoctor. Add a "manarg" block macro which makes our synopses
wrap correctly.
Similar to the release notes, guides, and FAQ, if Asciidoctor isn't
found the man pages won't be generated or installed.
Move Asciidoctor to the list of package build dependencies in various
places.
This commit includes the conversion script (pod2adoc.py), which will be
removed later.
Line count sanity check:
Man page .pod .adoc
androiddump 260 280
asn2deb 93 105
capinfos 401 471
captype 54 55
ciscodump 241 269
dftest 42 42
dpauxmon 153 169
dumpcap 464 534
editcap 528 583
etwdump 136 156
extcap 157 181
idl2deb 91 103
idl2wrs 120 100
mergecap 206 207
mmdbresolve 75 75
randpkt 107 111
randpktdump 158 184
rawshark 558 610
reordercap 76 78
sdjournal 145 157
sshdump 272 302
text2pcap 274 312
tshark 2135 2360
udpdump 133 151
wireshark-filter 486 479
wireshark 2967 3420
Diffstat (limited to 'doc/randpkt.adoc')
-rw-r--r-- | doc/randpkt.adoc | 72 |
1 files changed, 38 insertions, 34 deletions
diff --git a/doc/randpkt.adoc b/doc/randpkt.adoc index 7e65ba2445..5c7c1b3f81 100644 --- a/doc/randpkt.adoc +++ b/doc/randpkt.adoc @@ -1,63 +1,68 @@ -=begin man += randpkt(1) +:doctype: manpage +include::../docbook/attributes.adoc[] +:stylesheet: ws.css +:linkcss: +:copycss: ../docbook/{stylesheet} -=encoding utf8 - -=end man - -=head1 NAME +== NAME randpkt - Random packet generator -=head1 SYNOPSIS +== SYNOPSIS -B<randpkt> -S<[ B<-b> E<lt>maxbytesE<gt> ]> -S<[ B<-c> E<lt>countE<gt> ]> -S<[ B<-t> E<lt>typeE<gt> ]> -E<lt>filenameE<gt> +[manarg] +*randpkt* +[ *-b* <maxbytes> ] +[ *-c* <count> ] +[ *-t* <type> ] +<filename> -=head1 DESCRIPTION +== DESCRIPTION -B<randpkt> is a small utility that creates a B<pcap> trace file +*randpkt* is a small utility that creates a *pcap* trace file full of random packets. By creating many randomized packets of a certain type, you can test packet sniffers to see how well they handle malformed packets. The sniffer can never trust the data that it sees in the packet because you can always sniff a very bad packet that conforms to no standard. -B<randpkt> produces I<very bad> packets. +*randpkt* produces __very bad__ packets. -When creating packets of a certain type, B<randpkt> uses a sample -packet that is stored internally to B<randpkt>. It uses this as the +When creating packets of a certain type, *randpkt* uses a sample +packet that is stored internally to *randpkt*. It uses this as the starting point for your random packets, and then adds extra random bytes to the end of this sample packet. -For example, if you choose to create random ARP packets, B<randpkt> +For example, if you choose to create random ARP packets, *randpkt* will create a packet which contains a predetermined Ethernet II header, with the Type field set to ARP. After the Ethernet II header, it will put a random number of bytes with random values. -=head1 OPTIONS - -=over 4 - -=item -b E<lt>maxbytesE<gt> +== OPTIONS +-b <maxbytes>:: ++ +-- Default 5000. Defines the maximum number of bytes added to the sample packet. -If you choose a B<maxbytes> value that is less than the size of the +If you choose a *maxbytes* value that is less than the size of the sample packet, then your packets would contain only the sample -packet... not much variance there! B<randpkt> exits on that condition. - -=item -c E<lt>countE<gt> +packet... not much variance there! *randpkt* exits on that condition. +-- +-c <count>:: ++ +-- Default 1000. Defines the number of packets to generate. +-- -=item -t E<lt>typeE<gt> - +-t <type>:: ++ +-- Default Ethernet II frame. Defines the type of packet to generate: @@ -85,10 +90,9 @@ Defines the type of packet to generate: udp User Datagram Protocol usb Universal Serial Bus usb-linux Universal Serial Bus with Linux specific header +-- -=back - -=head1 EXAMPLES +== EXAMPLES To see a description of the randpkt options use: @@ -102,6 +106,6 @@ To generate a small capture file with just a single LLC frame use: randpkt -b 100 -c 1 -t llc single_llc.pcap -=head1 SEE ALSO +== SEE ALSO -pcap(3), editcap(1) +xref:https://www.tcpdump.org/manpages/pcap.3pcap.html[pcap](3), xref:editcap.html[editcap](1) |