Initial import from FreeBSD RELENG_4:
[dragonfly.git] / contrib / ipfilter / ipsend / ipsend.1
1 .TH IPSEND 1
2 .SH NAME
3 ipsend \- sends IP packets
4 .SH SYNOPSIS
5 .B ipsend
6 [
7 .B \-dITUv
8 ] [
9 .B \-i
10 <interface>
11 ] [
12 .B \-f
13 <\fIoffset\fP>
14 ] [
15 .B \-g
16 <\fIgateway\fP>
17 ] [
18 .B \-m
19 <\fIMTU\fP>
20 ] [
21 .B \-o
22 <\fIoption\fP>
23 ] [
24 .B \-P
25 <protocol>
26 ] [
27 .B \-s
28 <\fIsource\fP>
29 ] [
30 .B \-t
31 <\fIdest. port\fP>
32 ] [
33 .B \-w
34 <\fIwindow\fP>
35 ] <destination> [TCP-flags]
36 .SH DESCRIPTION
37 .PP
38 \fBipsend\fP can be compiled in two ways.  The first is used to send one-off
39 packets to a destination host, using command line options to specify various
40 attributes present in the headers.  The \fIdestination\fP must be given as
41 the last command line option, except for when TCP flags are specified as
42 a combination of A, S, F, U, P and R, last.
43 .PP
44 The other way it may be compiled, with DOSOCKET defined, is to allow an
45 attempt at making a TCP connection using a with ipsend resending the SYN
46 packet as per the command line options.
47 .SH OPTIONS
48 .TP
49 .BR \-d
50 enable debugging mode.
51 .TP
52 .BR \-f \0<offset>
53 The \fI-f\fP allows the IP offset field in the IP header to be set to an
54 arbitrary value, which can be specified in decimal or hexidecimal.
55 .TP
56 .BR \-g \0<gateway>
57 Specify the hostname of the gateway through which to route packets.  This
58 is required whenever the destination host isn't directly attached to the
59 same network as the host from which you're sending.
60 .TP
61 .BR \-i \0<interface>
62 Set the interface name to be the name supplied.
63 .TP
64 .TP
65 .BR \-m \0<MTU>
66 Specify the MTU to be used when sending out packets.  This option allows you
67 to set a fake MTU, allowing the simulation of network interfaces with small
68 MTU's without setting them so.
69 .TP
70 .BR \-o \0<option>
71 Specify options to be included at the end of the IP header.  An EOL option
72 is automatically appended and need not be given.  If an option would also
73 have data associated with it (source as an IP# for a lsrr option), then
74 this will not be initialised.
75 .TP
76 .BR \-s \0<source>
77 Set the source address in the packet to that provided - maybe either a
78 hostname or IP#.
79 .TP
80 .BR \-t \0<dest. port>
81 Set the destination port for TCP/UDP packets.
82 .TP
83 .BR \-w \0<window>
84 Set the window size for TCP packets.
85 .TP
86 .B \-I
87 Set the protocol to ICMP.
88 .TP
89 .B \-P <protocol>
90 Set the protocol to the value given.  If the parameter is a name, the name
91 is looked up in the \fI/etc/protocols\fP file.
92 .TP
93 .B \-T
94 Set the protocol to TCP.
95 .TP
96 .B \-U
97 Set the protocol to UDP.
98 .TP
99 .BR \-v
100 enable verbose mode.
101 .DT
102 .SH SEE ALSO
103 ipsend(1), ipresend(1), iptest(1), protocols(4), bpf(4), dlpi(7p)
104 .SH DIAGNOSTICS
105 .PP
106 Needs to be run as root.
107 .SH BUGS
108 .PP
109 If you find any, please send email to me at darrenr@pobox.com