Skip to content

Commit

Permalink
Document -D divert packet feature.
Browse files Browse the repository at this point in the history
  • Loading branch information
bluhm committed Aug 1, 2022
1 parent f6c8eed commit d974504
Showing 1 changed file with 22 additions and 0 deletions.
22 changes: 22 additions & 0 deletions udpbench.1
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@
.Sh SYNOPSIS
.Nm
.Bk -words
.Op Fl D
.Op Fl b Ar bufsize
.Op Fl d Ar delaypacket
.Op Fl l Ar length
Expand Down Expand Up @@ -56,6 +57,21 @@ The options are as follows:
.Bl -tag -width Ds
.It Fl b Ar bufsize
Set size of send or receive socket buffer.
.It Fl D
OpenBSD
.Xr pf 4
.Ic divert-packet
is used to receive packets on divert socket.
The pf rule has to be configured manually, the option only changes
the socket type on the
.Cm recv
side.
In
.Cm send
mode this option has no effect on local sending.
With dynamic
.Ic ssh
the option is passed to the remote process.
.It Fl d Ar delaypacket
The value specifies the number of packets to send within a second.
This adds a small delay between
Expand Down Expand Up @@ -123,6 +139,12 @@ The address of the receiving side is not optional.
This sends the traffic in the opposite direction of the previous
example.
.D1 Nm Fl r Ar root@remotehost Cm send Ar remoteip
.Pp
Receive packets from remote host and divert them to local socket.
This needs configuration in
.Xr pf.conf 5 .
.D1 Ic pass Ic proto Ic udp Ic to Ar localip Ic port Ar 1234 Ic divert-packet Ic port Ar 1234
.D1 Nm Fl D Fl p Ar 1234 Fl r Ar root@remotehost Cm recv Ar localip
.Sh SEE ALSO
.Xr iperf3 1 ,
.Xr tcpbench 1
Expand Down

0 comments on commit d974504

Please sign in to comment.