summaryrefslogtreecommitdiffstats
path: root/contrib/netcat/nc.1
diff options
context:
space:
mode:
authordelphij <delphij@FreeBSD.org>2011-05-11 21:52:26 +0000
committerdelphij <delphij@FreeBSD.org>2011-05-11 21:52:26 +0000
commit8387350bb5178014090e94d6042a08dcb81c168f (patch)
tree2ada676374f8a269621594f3e6db578572546407 /contrib/netcat/nc.1
parent34effb6be75df2ae78f96037e59acf89881522df (diff)
downloadFreeBSD-src-8387350bb5178014090e94d6042a08dcb81c168f.zip
FreeBSD-src-8387350bb5178014090e94d6042a08dcb81c168f.tar.gz
MFV: nc(1) from OpenBSD 4.9.
MFC after: 1 month Obtained from: OpenBSD
Diffstat (limited to 'contrib/netcat/nc.1')
-rw-r--r--contrib/netcat/nc.147
1 files changed, 34 insertions, 13 deletions
diff --git a/contrib/netcat/nc.1 b/contrib/netcat/nc.1
index 9a6e836..7fe212a 100644
--- a/contrib/netcat/nc.1
+++ b/contrib/netcat/nc.1
@@ -1,4 +1,4 @@
-.\" $OpenBSD: nc.1,v 1.55 2010/07/25 07:51:39 guenther Exp $
+.\" $OpenBSD: nc.1,v 1.57 2011/01/09 22:16:46 jeremy Exp $
.\"
.\" Copyright (c) 1996 David Sacerdote
.\" All rights reserved.
@@ -27,7 +27,7 @@
.\"
.\" $FreeBSD$
.\"
-.Dd July 25, 2010
+.Dd January 8, 2011
.Dt NC 1
.Os
.Sh NAME
@@ -44,7 +44,7 @@
.Op Fl O Ar length
.Op Fl P Ar proxy_username
.Op Fl p Ar source_port
-.Op Fl s Ar source_ip_address
+.Op Fl s Ar source
.Op Fl T Ar ToS
.Op Fl V Ar rtable
.Op Fl w Ar timeout
@@ -53,7 +53,7 @@
.Fl x Ar proxy_address Ns Oo : Ns
.Ar port Oc
.Xc Oc
-.Op Ar hostname
+.Op Ar destination
.Op Ar port
.Ek
.Sh DESCRIPTION
@@ -61,8 +61,10 @@ The
.Nm
(or
.Nm netcat )
-utility is used for just about anything under the sun involving TCP
-or UDP.
+utility is used for just about anything under the sun involving TCP,
+UDP, or
+.Ux Ns -domain
+sockets.
It can open TCP connections, send UDP packets, listen on arbitrary
TCP and UDP ports, do port scanning, and deal with both IPv4 and
IPv6.
@@ -175,8 +177,12 @@ instead of sequentially within a range or in the order that the system
assigns them.
.It Fl S
Enables the RFC 2385 TCP MD5 signature option.
-.It Fl s Ar source_ip_address
+.It Fl s Ar source
Specifies the IP of the interface which is used to send the packets.
+For
+.Ux Ns -domain
+datagram sockets, specifies the local temporary socket file
+to create and use so that datagrams can be received.
It is an error to use this option in conjunction with the
.Fl l
option.
@@ -201,6 +207,16 @@ Specifies to use
sockets.
.It Fl u
Use UDP instead of the default option of TCP.
+For
+.Ux Ns -domain
+sockets, use a datagram socket instead of a stream socket.
+If a
+.Ux Ns -domain
+socket is used, a temporary receiving socket is created in
+.Pa /tmp
+unless the
+.Fl s
+flag is given.
.It Fl V Ar rtable
Set the routing table
.Pq Dq FIB
@@ -244,7 +260,7 @@ If the protocol is not specified, SOCKS version 5 is used.
Requests that
.Nm
should connect to
-.Ar hostname
+.Ar destination
using a proxy at
.Ar proxy_address
and
@@ -262,16 +278,22 @@ It is an error to use this option in conjunction with the
option.
.El
.Pp
-.Ar hostname
+.Ar destination
can be a numerical IP address or a symbolic hostname
(unless the
.Fl n
option is given).
-In general, a hostname must be specified,
+In general, a destination must be specified,
unless the
.Fl l
option is given
(in which case the local host is used).
+For
+.Ux Ns -domain
+sockets, a destination is required and is the socket path to connect to
+(or listen on if the
+.Fl l
+option is given).
.Pp
.Ar port
can be a single integer or a range of ports.
@@ -280,8 +302,7 @@ In general,
a destination port must be specified,
unless the
.Fl U
-option is given
-(in which case a socket must be specified).
+option is given.
.Sh CLIENT/SERVER MODEL
It is quite simple to build a very basic client/server model using
.Nm .
@@ -424,7 +445,7 @@ outgoing traffic only.
.Pp
Create and listen on a
.Ux Ns -domain
-socket:
+stream socket:
.Pp
.Dl $ nc -lU /var/tmp/dsocket
.Pp
OpenPOWER on IntegriCloud