7a5e8bb518
to terminate at the first EOF condition on local input (as opposed to waiting for the network end to shut down). Can be useful when talking to network servers that never drop the connection on their end, like an port 9100 printer server in my case. I've also submitted that to the OpenBSD maintainer, so in case they accept, we can later on undo my local patch. Approved by: dd (maintainer)
53 lines
1.9 KiB
Groff
53 lines
1.9 KiB
Groff
--- nc.1.orig Tue Feb 19 23:45:18 2002
|
|
+++ nc.1 Wed Jul 30 11:41:47 2003
|
|
@@ -33,7 +33,8 @@
|
|
.Nd "arbitrary TCP and UDP connections and listens"
|
|
.Sh SYNOPSIS
|
|
.Nm nc
|
|
-.Op Fl 46hklnrtuvzU
|
|
+.Op Fl 46EhklnortuvzU
|
|
+.Op Fl e Ar IPsec policy
|
|
.Op Fl i Ar interval
|
|
.Op Fl p Ar source port
|
|
.Op Fl s Ar source ip address
|
|
@@ -89,6 +90,12 @@
|
|
Prints out
|
|
.Nm
|
|
help.
|
|
+.It Fl E
|
|
+Shortcut for "-e 'in ipsec esp/transport//require' -e 'out ipsec esp/transport//require'", which enables IPsec ESP transport mode in both directions.
|
|
+.It Fl e
|
|
+If IPsec support is available, then one can specify the IPsec policies to be used using the syntax described in
|
|
+.Xr ipsec_set_policy 3 .
|
|
+This flag can be specified up to two times, as typically one policy for each direction is needed.
|
|
.It Fl i Ar interval
|
|
Specifies a delay time interval between lines of text sent and received.
|
|
Also causes a delay time between connections to multiple ports.
|
|
@@ -105,6 +112,15 @@
|
|
.It Fl n
|
|
Do not do any DNS or service lookups on any specified addresses,
|
|
hostnames or ports.
|
|
+.It Fl o
|
|
+.Dq Once-only mode .
|
|
+By default,
|
|
+.Nm
|
|
+does not terminate on EOF condition on input,
|
|
+but continues until the network side has been closed down.
|
|
+Specifying
|
|
+.Fl o
|
|
+will make it terminate on EOF as well.
|
|
.It Fl p Ar port
|
|
Specifies the source port
|
|
.Nm
|
|
@@ -157,6 +173,10 @@
|
|
.It Li "nc -s 10.1.2.3 example.host 42"
|
|
Open a TCP connection to port 42 of example.host using 10.1.2.3 as the
|
|
IP for the local end of the connection.
|
|
+.It Li "nc -E example.host 42"
|
|
+Open a TCP connection to port 42 of example.host using IPsec ESP for incoming and outgoing traffic.
|
|
+.It Li "nc -e 'out ipsec esp/transport//require' example.host 42"
|
|
+Open a TCP connection to port 42 of example.host using IPsec ESP for outgoing traffic only.
|
|
.It Li "nc -v hostname 42"
|
|
Open a TCP connection to port 42 of hostname, displaying some
|
|
diagnostic messages on stderr.
|