summaryrefslogtreecommitdiff
path: root/usr.sbin/ipsend/ipresend/ipresend.1
blob: c380c638d2e23428108c5872a082a60f53144f36 (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
./" $OpenBSD: ipresend.1,v 1.10 2000/11/09 17:53:15 aaron Exp $
.Dd October 9, 1999
.Dt IPRESEND 1
.Os
.Sh NAME
.Nm ipresend
.Nd resend IP packets out to network
.Sh SYNOPSIS
.Nm ipsend
.Op Fl EHPRSTX
.Op Fl d Ar device
.Op Fl g Ar gateway
.Op Fl m Ar mtu
.Op Fl r Ar filename
.Sh DESCRIPTION
.Nm
was designed to allow captured packets to be resent
onto the network for use in testing.
.Nm
supports a
number of different file formats as input, including saved snoop and
.Xr tcpdump 8
binary data.
.Pp
.Nm
must be run as root.
.Pp
The options are as follows:
.Bl -tag -width Ds
.It Fl d Ar interface
Set the interface name to be the name supplied.
This is useful with the
.Fl P ,
.Fl S ,
.Fl T ,
and
.Fl E
options, where it is not otherwise possible
to associate a packet with an interface.
Normal
.Sq text packets
can override this setting.
.It Fl g Ar gateway
Specify the hostname of the gateway through which to route packets.
This is required whenever the destination host isn't directly attached to the
same network as the host from which you're sending.
.It Fl m Ar mtu
Set the MTU used when sending out packets to
.Ar mtu .
This option allows you
to set a fake MTU, allowing the simulation of network interfaces with small
MTU's.
.It Fl r Ar filename
Specify the filename from which to take input.
Default is
.Va stdin .
.It Fl E
The input file is to be text output from etherfind.
The text formats which
are currently supported are those which result from the following etherfind
option combinations:
.Bd -literal -offset indent
etherfind -n
etherfind -n -t
.Ed
.It Fl H
The input file is to be hex digits, representing the binary makeup of the
packet.
No length correction is made if an incorrect length is put in
the IP header.
.It Fl P
The input file specified by
.Fl r
is a binary file produced using libpcap
(i.e.,
.Xr tcpdump 8
version 3).
Packets are read from this file as being input (for rule purposes).
.It Fl R
When sending packets out, send them out
.Sq raw
(the way they came in).
The only real significance here is that it will expect the link layer (i.e.,
Ethernet) headers to be prepended to the IP packet being output.
.It Fl S
The input file is to be in
.Sq snoop
format (see
.Tn RFC 1761 ) .
Packets are read
from this file and used as input from any interface.
This is perhaps the most useful input type, currently.
.It Fl T
The input file is to be text output from
.Xr tcpdump 8 .
The text formats which
are currently supported are those which result from the following
.Xr tcpdump 8
option combinations:
.Bd -literal -offset indent
tcpdump -n
tcpdump -nq
tcpdump -nqt
tcpdump -nqtt
tcpdump -nqte
.Ed
.It Fl X
The input file is composed of text descriptions of IP packets.
.El
.Sh SEE ALSO
.Xr ipftest 1 ,
.Xr ipresend 1 ,
.Xr iptest 1 ,
.Xr bpf 4 ,
.Xr tcpdump 8
.Sh BUGS
Not all of the input formats are sufficiently capable of introducing a
wide enough variety of packets for them to be all useful in testing.
If you find any, please send email to me at darrenr@cyber.com.au