| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221 |
- <!DOCTYPE html>
- <html lang="en">
- <head>
- <meta charset="UTF-8">
- <meta http-equiv="X-UA-Compatible" content="IE=edge">
- <meta name="viewport" content="width=device-width, initial-scale=1.0">
- <meta name="generator" content="Asciidoctor 2.0.17">
- <title>randpkt(1)</title>
- <link rel="stylesheet" href="./ws.css">
- </head>
- <body class="manpage">
- <div id="header">
- <h1>randpkt(1) Manual Page</h1>
- <h2 id="_name">NAME</h2>
- <div class="sectionbody">
- <p>randpkt - Random packet generator</p>
- </div>
- </div>
- <div id="content">
- <div class="sect1">
- <h2 id="_synopsis">SYNOPSIS</h2>
- <div class="sectionbody">
- <div class="paragraph">
- <p><span class="nowrap"><strong>randpkt</strong></span>
- <span class="nowrap">[ <strong>-b</strong> <maxbytes> ]</span>
- <span class="nowrap">[ <strong>-c</strong> <count> ]</span>
- <span class="nowrap">[ <strong>-t</strong> <type> ]</span>
- <span class="nowrap"><filename></span></p>
- </div>
- </div>
- </div>
- <div class="sect1">
- <h2 id="_description">DESCRIPTION</h2>
- <div class="sectionbody">
- <div class="paragraph">
- <p><strong>randpkt</strong> is a small utility that creates a <strong>pcap</strong> trace file
- full of random packets.</p>
- </div>
- <div class="paragraph">
- <p>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.
- <strong>randpkt</strong> produces <em>very bad</em> packets.</p>
- </div>
- <div class="paragraph">
- <p>When creating packets of a certain type, <strong>randpkt</strong> uses a sample
- packet that is stored internally to <strong>randpkt</strong>. It uses this as the
- starting point for your random packets, and then adds extra random
- bytes to the end of this sample packet.</p>
- </div>
- <div class="paragraph">
- <p>For example, if you choose to create random ARP packets, <strong>randpkt</strong>
- 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.</p>
- </div>
- </div>
- </div>
- <div class="sect1">
- <h2 id="_options">OPTIONS</h2>
- <div class="sectionbody">
- <div class="dlist">
- <dl>
- <dt class="hdlist1">-b <maxbytes></dt>
- <dd>
- <div class="openblock">
- <div class="content">
- <div class="paragraph">
- <p>Default 5000.</p>
- </div>
- <div class="paragraph">
- <p>Defines the maximum number of bytes added to the sample packet.
- If you choose a <strong>maxbytes</strong> value that is less than the size of the
- sample packet, then your packets would contain only the sample
- packet…​ not much variance there! <strong>randpkt</strong> exits on that condition.</p>
- </div>
- </div>
- </div>
- </dd>
- <dt class="hdlist1">-c <count></dt>
- <dd>
- <div class="openblock">
- <div class="content">
- <div class="paragraph">
- <p>Default 1000.</p>
- </div>
- <div class="paragraph">
- <p>Defines the number of packets to generate.</p>
- </div>
- </div>
- </div>
- </dd>
- <dt class="hdlist1">-t <type></dt>
- <dd>
- <div class="openblock">
- <div class="content">
- <div class="paragraph">
- <p>Default Ethernet II frame.</p>
- </div>
- <div class="paragraph">
- <p>Defines the type of packet to generate:</p>
- </div>
- <div class="literalblock">
- <div class="content">
- <pre>arp Address Resolution Protocol
- bgp Border Gateway Protocol
- bvlc BACnet Virtual Link Control
- dns Domain Name Service
- eth Ethernet
- fddi Fiber Distributed Data Interface
- giop General Inter-ORB Protocol
- icmp Internet Control Message Protocol
- ip Internet Protocol
- ipv6 Internet Protocol Version 6
- llc Logical Link Control
- m2m WiMAX M2M Encapsulation Protocol
- megaco MEGACO
- nbns NetBIOS-over-TCP Name Service
- ncp2222 NetWare Core Protocol
- sctp Stream Control Transmission Protocol
- syslog Syslog message
- tds TDS NetLib
- tcp Transmission Control Protocol
- tr Token-Ring
- udp User Datagram Protocol
- usb Universal Serial Bus
- usb-linux Universal Serial Bus with Linux specific header</pre>
- </div>
- </div>
- </div>
- </div>
- </dd>
- </dl>
- </div>
- </div>
- </div>
- <div class="sect1">
- <h2 id="_diagnostic_options">DIAGNOSTIC OPTIONS</h2>
- <div class="sectionbody">
- <div class="dlist">
- <dl>
- <dt class="hdlist1">--log-level <level></dt>
- <dd>
- <p>Set the active log level.
- Supported levels in lowest to highest order are "noisy", "debug", "info", "message", "warning", "critical", and "error".
- Messages at each level and higher will be printed, for example "warning" prints "warning", "critical", and "error" messages and "noisy" prints all messages.
- Levels are case insensitive.</p>
- </dd>
- <dt class="hdlist1">--log-fatal <level></dt>
- <dd>
- <p>Abort the program if any messages are logged at the specified level or higher.
- For example, "warning" aborts on any "warning", "critical", or "error" messages.</p>
- </dd>
- </dl>
- </div>
- <div class="dlist">
- <dl>
- <dt class="hdlist1">--log-domains <list></dt>
- <dd>
- <p>Only print messages for the specified log domains, e.g. "GUI,Epan,sshdump".
- List of domains must be comma-separated.</p>
- </dd>
- <dt class="hdlist1">--log-debug <list></dt>
- <dd>
- <p>Force the specified domains to log at the "debug" level.
- List of domains must be comma-separated.</p>
- </dd>
- <dt class="hdlist1">--log-noisy <list></dt>
- <dd>
- <p>Force the specified domains to log at the "noisy" level.
- List of domains must be comma-separated.</p>
- </dd>
- <dt class="hdlist1">--log-file <path></dt>
- <dd>
- <p>Write log messages and stderr output to the specified file.</p>
- </dd>
- </dl>
- </div>
- </div>
- </div>
- <div class="sect1">
- <h2 id="_examples">EXAMPLES</h2>
- <div class="sectionbody">
- <div class="paragraph">
- <p>To see a description of the randpkt options use:</p>
- </div>
- <div class="literalblock">
- <div class="content">
- <pre>randpkt</pre>
- </div>
- </div>
- <div class="paragraph">
- <p>To generate a capture file with 1000 DNS packets use:</p>
- </div>
- <div class="literalblock">
- <div class="content">
- <pre>randpkt -b 500 -t dns rand_dns.pcap</pre>
- </div>
- </div>
- <div class="paragraph">
- <p>To generate a small capture file with just a single LLC frame use:</p>
- </div>
- <div class="literalblock">
- <div class="content">
- <pre>randpkt -b 100 -c 1 -t llc single_llc.pcap</pre>
- </div>
- </div>
- </div>
- </div>
- <div class="sect1">
- <h2 id="_see_also">SEE ALSO</h2>
- <div class="sectionbody">
- <div class="paragraph">
- <p><a href="https://www.tcpdump.org/manpages/pcap.3pcap.html">pcap</a>(3), <a href="editcap.html">editcap</a>(1)</p>
- </div>
- </div>
- </div>
- </div>
- </body>
- </html>
|