Content-type: text/html Manpage of SENDIP

SENDIP

Section: FSF (1)
Updated: September 2010
Index Return to Main Contents
 

NAME

sendip - Send arbitrary IP packets  

SYNOPSIS

sendip [-v] [-d data] [-h] [-f datafile] [-p module] [module options] hostname  

OPTIONS

-d data
add this data as a string to the end of the packet
-f datafile
read packet data from file
-h
help (this message)
-p module
load the specified module (see below)
-v
be verbose

Packet data, and argument values for many header fields, may specified as rN to generate N random(ish) data bytes; zN to generate N nul (zero) data bytes; 0x or 0X followed by hex digits; 0 followed by octal digits; decimal number for decimal digits; any other stream of bytes, taken literally.

Modules are loaded in the order the -p option appears. The headers from each module are put immediately inside the headers from the previous module in the final packet. For example, to embed bgp inside tcp inside ipv4, do sendip -p ipv4 -p tcp -p bgp ....

Modules may be repeated to create multiple instances of a given header type. For example, to create an ipip tunneled packet (ipv4 inside ipv4), do sendip -p ipv4 <outer header arguments> -p ipv4 <inner header arguments> .... In the case of repeated modules, arguments are applied to the closest matching module in the command line.  

Modules available at compile time:

ipv4 ipv6 icmp tcp udp bgp rip ripng ntp ah dest esp frag gre hop route sctp wesp.
 

Arguments for module bgp.so:

-bm x
BGP Marker field (format is <hex byte>:<hex byte>:...)
Default: FF:FF:FF:FF:FF:FF:FF:FF:FF:FF:FF:FF:FF:FF:FF:FF
-bl x
Packet length
Default: Correct
-bt x
Message Type (1 OPEN, 2 UPDATE, 3 NOTIFICATION, 4 KEEPALIVE)
Default: 4 (KEEPALIVE)
-bo x
Open message. Format is <version>:<AS number>:<Hold time>:<BGP Identifier>:<Options length>
Default: 4:1:90:127.0.0.1:Correct (Any parameter can be omitted to get the default)
-boo x
Optional OPEN parameter. Format is <Type>:<Length>:<Value> - value is in hex bytes separated by :s
Default: None, though length may be omitted to get correct value
-bul x
Withdrawn routes length
Default: Correct
-buw x
Withdrawn route. Format is x.x.x.x/n:<bytes for prefix>
Default: Bytes field may be omitted to use the correct number
-bus x
Attributes length
Default: Correct
-bua x
Attribute. Format is <flags>:<type>:<length length (1 or 2):<length>:<data>
Default: The length fields may be omitted to use the correct value
-bun x
NLRI Prefix. Format is as for -buw
Default: As for -buw
-bn x
Notification. Format is <code>:<subcode>:<data>
Default: Data may be omitted for no data
 

Arguments for module icmp.so:

-ct x
ICMP message type
Default: ICMP_ECHO (8), or ICMP6_ECHO_REQUEST (128) if embedded in an IPv6 packet
-cd x
ICMP code
Default: 0
-cc x
ICMP checksum
Default: Correct
 

Arguments for module ipv4.so:

-is x
Source IP address (see README)
Default: 127.0.0.1
-id x
Destination IP address
Default: Correct
-ih x
IP header length (see README)
Default: Correct
-iv x
IP version (you almost definitely don't want to change this)
Default: 4
-iy x
IP type of service
Default: 0
-il x
Total IP packet length (see README)
Default: Correct
-ii x
IP packet ID (see README)
Default: Random
-ifr x
IP reserved flag (see README)
Default: 0 (options are 0,1,r)
-ifd x
IP don't fragment flag (see README)
Default: 0 (options are 0,1,r)
-ifm x
IP more fragments flag (see README)
Default: 0 (options are 0,1,r)
-if x
IP fragment offset
Default: 0
-it x
IP time to live
Default: 255
-ip x
IP protocol
Default: Correct, or set by underlying protocol
-ic x
IP checksum (see README)
Default: Correct
-ionum x
IP option as string of hex bytes (length is always correct)
Default: (no options)
-ioeol
IP option: end of list
-ionop
IP option: no-op
-iorr x
IP option: record route. Format: pointer:addr1:addr2:...
-iots x
IP option: timestamp. Format: pointer:overflow:flag:(ip1:)ts1:(ip2:)ts2:...
-iolsr x
IP option: loose source route. Format: pointer:addr1:addr2:...
-iosid x
IP option: stream identifier
-iossr x
IP option: strict source route. Format: pointer:addr1:addr2:...
 

Arguments for module ipv6.so:

-6f x
IPv6 flow ID
Default: 32
-6t x
IPv6 traffic class
Default: 0
-6v x
IP version (you probably don't want to change this)
-6p x
IPv6 priority
Default: 0
-6l x
IPv6 payload length
Default: Correct
-6h x
IPv6 hop limit
Default: 32
-6n x
IPv6 next header
Default: Correct
-6s x
IPv6 source address
Default: ::1
-6d x
IPv6 destination address
Default: Correct
 

Arguments for module ntp.so:

-nl x
NTP Leap Indicator
Default: 00 (no warning)
-ns x
NTP status
Default: 0 (clock operating OK)
-nt x
NTP type
Default: 0 (unspecified)
-np x
NTP precision
Default: 0
-ne x
NTP estimated error
Default: 0.0
-nd x
NTP estimated drift rate
Default: 0.0
-nr x
NTP reference clock ID (string or IP or number)
Default: 0
-nf x
NTP reference timestamp
Default: 0.0
-no x
NTP originate timestamp
Default: 0.0
-na x
NTP arrival (receive) timestamp
Default: 0.0
-nx x
NTP xmit (transmit) timestamp
Default: 0.0
 

Arguments for module rip.so:

-rv x
RIP version
Default: 2
-rc x
RIP command (1=request, 2=response, 3=traceon (obsolete), 4=traceoff (obsolete), 5=poll (undocumented), 6=poll entry (undocumented)
Default: 1
-re x
Add a RIP entry. Format is: Address family:route tag:address:subnet mask:next hop:metric
Default: 2:0:0.0.0.0:255.255.255.0:0.0.0.0:16, any option my be left out to use the default
-ra x
RIP authenticate packet, argument is the password; do not use any other RIP options on this RIP header
-rd
RIP default request - get router's entire routing table; do not use any other RIP options on this RIP header
 

Arguments for module ripng.so:

-Rv x
RIPng version
Default: 1
-Rc x
RIPng command (1=request, 2=response)
Default: 1
-Rr x
RIPng reserved field (should be 0)
Default: 0
-Re x
Add a RIPng entry. Format is: Address/route tag/address/len/metric
Default: ::/0/128/1, any option my be left out to use the default
-Rd
RIPng default request - get router's entire routing table; do not use any other RIPng options on this RIPng header
 

Arguments for module tcp.so:

-ts x
TCP source port
Default: 0
-td x
TCP destination port
Default: 0
-tn x
TCP sequence number
Default: Random
-ta x
TCP ack number
Default: 0
-tt x
TCP data offset
Default: Correct
-tr x
TCP header reserved field EXCLUDING ECN and CWR bits
Default: 0
-tfe x
TCP ECN bit (rfc2481)
Default: 0 (options are 0,1,r)
-tfc x
TCP CWR bit (rfc2481)
Default: 0 (options are 0,1,r)
-tfu x
TCP URG bit
Default: 0, or 1 if -tu specified (options are 0,1,r)
-tfa x
TCP ACK bit
Default: 0, or 1 if -ta specified (options are 0,1,r)
-tfp x
TCP PSH bit
Default: 0 (options are 0,1,r)
-tfr x
TCP RST bit
Default: 0 (options are 0,1,r)
-tfs x
TCP SYN bit
Default: 1 (options are 0,1,r)
-tff x
TCP FIN bit
Default: 0 (options are 0,1,r)
-tw x
TCP window size
Default: 65535
-tc x
TCP checksum
Default: Correct
-tu x
TCP urgent pointer
Default: 0
-tonum x
TCP option as string of hex bytes (length is always correct)
Default: (no options)
-toeol
TCP option: end of list
-tonop
TCP option: no op
-tomss x
TCP option: maximum segment size
-towscale x
TCP option: window scale (rfc1323)
-tosackok
TCP option: allow selective ack (rfc2018)
-tosack x
TCP option: selective ack (rfc2018), format is l_edge1:r_edge1,l_edge2:r_edge2...
-tots x
TCP option: timestamp (rfc1323), format is tsval:tsecr
 

Arguments for module udp.so:

-us x
UDP source port
Default: 0
-ud x
UDP destination port
Default: 0
-ul x
UDP packet length
Default: Correct
-uc x
UDP checksum
Default: Correct
 

Arguments for module ah.so:

-as x
AH Security Parameters Index
Default: 1
-aq x
AH Sequence Number
Default: 1
-ad x
AH Authentication Data Variable length authentication data, can be a user-provided string (in hex, octal, decimal, or raw), zN for N nul (zero) bytes or rN for N random bytes.
Default: 0
-an x
AH Next Header
Default: Correct
-ak x
AH Key (string, zN for N nul bytes, or rN for N random bytes) Not transmitted in the packet, but passed to the authentication module, if any.
Default: none
-am x
AH Authentication Module
Default: none
 

Arguments for module dest.so:

-dn x
Option next header
Default: Correct
-d0
Option pad 0 (1 byte padding)
-dp x
Option pad N bytes
Default: 2
-dr x
Option router alert
Default: 0
-dj x
Option jumbo frame length Note: actual production of jumbo frames requires interface support.
Default: 0
-dh x
(Destination) option home address
Default: ::1
-dt x
Option arbitrary t.l.v option The fields are type.length.value. Each field can be specified in the usual way as hex, octal, decimal, literal, zN for N zero bytes or rN for N random bytes.
Default: 0.0.0
 

Arguments for module esp.so:

-es x
ESP Security Parameters Index
Default: 0
-eq x
ESP Sequence Number
Default: 0
-ep x
ESP Padding Length
Default: Minimum needed for alignment
-en x
ESP Next Header
Default: Correct
-ei x
ESP IV (string, zN for N nul bytes, or rN for N random bytes)
Default: None
-eI x
ESP ICV (string, zN for N nul bytes, or rN for N random bytes)
Default: None
-ek x
ESP Key (string, zN for N nul bytes, or rN for N random bytes) Not transmitted in the packet, but passed to the cryptographic module(s), if any.
Default: none
-ea x
ESP authentication module
Default: none
-ec x
ESP cryptographic (encryption/privacy) module
Default: none
 

Arguments for module frag.so:

-Fn x
Fragment next header
Default: Correct
-Fr x
Fragment reserved (1 byte)
Default: 0
-Fo x
Fragment offset
Default: 0
-Ff x
Fragment flags (3 bits, lsb=more fragments)
Default: 0
-Fi x
Fragment identification
Default: 0
 

Arguments for module gre.so:

-gc x
GRE supplied checksum
Default: none
-gC
GRE add actual checksum
-gr x
GRE routing field
Default: none
-gk x
GRE key field
Default: none
-gs x
GRE sequence number
Default: none
-gS
GRE strict source routing flag on
-ge x
GRE recursion encapsulation limit
Default: 0
-gv x
GRE version number
Default: 0
-gp x
GRE encapsulated protocol
Default: Correct (if known, IPv4 and IPv6 only)
-go x
GRE offset
Default: none
 

Arguments for module hop.so:

-Hn x
Option next header
Default: Correct
-H0
Option pad 0 (1 byte padding)
-Hp x
Option pad N bytes
Default: 2
-Hr x
Option router alert
Default: 0
-Hj x
Option jumbo frame length Note: actual production of jumbo frames requires interface support.
Default: 0
-Hh x
(Destination) option home address
Default: ::1
-Ht x
Option arbitrary t.l.v option The fields are type.length.value. Each field can be specified in the usual way as hex, octal, decimal, literal, zN for N zero bytes or rN for N random bytes.
Default: 0.0.0
 

Arguments for module route.so:

-on x
Routing next header
Default: Correct
-ot x
Routing header type
Default: 0
-os x
Routing segments left
Default: 0
-or x
Routing reserved field
Default: 0
-oa x
Routing list of addresses (comma separated)
Default: none
 

Arguments for module sctp.so:

-ss x
SCTP source port
Default: 0
-sd x
SCTP dest port
Default: 0
-sv x
SCTP vtag
Default: 0 (if init chunk) 1 (if other); may be specified as number, string, or rN for N (should be 4) random bytes
-sc x
SCTP CRC checksum
Default: Correct
-sT x
SCTP chunk type
Default: 0 (i.e., a data chunk)

Note: multiple chunks may be included. Each chunk type begins a new chunk; subsequent chunk-related fields are applied to that chunk.

-sF x
SCTP chunk flags
Default: 0
-sL x
SCTP chunk length
Default: Correct
-sD x
SCTP chunk data (hex, octal, decimal, literal, zN for N zero bytes or rN for N random bytes).
Default: 0
-sI x
SCTP INIT chunk
Default: 1.0x1000.1.1.1

Creates a complete INIT chunk with the specified initiate tag, receiver window credit, number of outbound and inbound streams, and initial TSN, in that order. Each field may be specified as number, string, or rN for N (should be 2 or 4) random bytes. Other variable parameters may be appended to this chunk.

-s4 x
SCTP IPv4 address TLV
Default: none
-s6 x
SCTP IPv6 address TLV
Default: none
-sC x
SCTP cookie preservative TLV
Default: none
-sH x
SCTP host name address TLV
Default: none
-sA x
SCTP supported address types TLV
Default: none
-sE
SCTP ECN capable (boolean)
Default: (false)
-sW
SCTP forward TSN supported (boolean)
Default: (false)
-sY x
SCTP adaptation layer indication parameter
Default: none
 

Arguments for module wesp.so:

-wv x
WESP Version
Default: 0
-we x
WESP Encrypted Payload flag
Default: 0
-wp x
WESP Padded flag (also adds 4 bytes padding)
Default: 0
-wr x
WESP Reserved field
Default: 0
-wh x
WESP Header Length
Default: Correct
-wt x
WESP Trailer Length
Default: Correct
-wn x
WESP Next Header
Default: Correct


 

Index

NAME
SYNOPSIS
OPTIONS
Modules available at compile time:
Arguments for module bgp.so:
Arguments for module icmp.so:
Arguments for module ipv4.so:
Arguments for module ipv6.so:
Arguments for module ntp.so:
Arguments for module rip.so:
Arguments for module ripng.so:
Arguments for module tcp.so:
Arguments for module udp.so:
Arguments for module ah.so:
Arguments for module dest.so:
Arguments for module esp.so:
Arguments for module frag.so:
Arguments for module gre.so:
Arguments for module hop.so:
Arguments for module route.so:
Arguments for module sctp.so:
Arguments for module wesp.so:

This document was created by man2html, using the manual pages.
Time: 19:45:51 GMT, September 02, 2010