summaryrefslogtreecommitdiff
path: root/net/netcat
diff options
context:
space:
mode:
authorhubertf <hubertf@pkgsrc.org>2001-01-12 00:44:23 +0000
committerhubertf <hubertf@pkgsrc.org>2001-01-12 00:44:23 +0000
commitfc14fe92efbf5196fa4704e811f45ac72d5793ce (patch)
treec0ceb38cd6b91405374ddb340f3e5ae5d746b944 /net/netcat
parent3876630b9c87df2f3dd6599d260fd05b6006fc69 (diff)
downloadpkgsrc-fc14fe92efbf5196fa4704e811f45ac72d5793ce.tar.gz
Add manpage.
Submitted by Andrew Brown <atatat@atatdot.net> in PR 11935.
Diffstat (limited to 'net/netcat')
-rw-r--r--net/netcat/Makefile3
-rw-r--r--net/netcat/files/nc.1127
-rw-r--r--net/netcat/pkg/PLIST3
3 files changed, 131 insertions, 2 deletions
diff --git a/net/netcat/Makefile b/net/netcat/Makefile
index e8b94ffc03d..eea75c3f986 100644
--- a/net/netcat/Makefile
+++ b/net/netcat/Makefile
@@ -1,4 +1,4 @@
-# $NetBSD: Makefile,v 1.5 2000/11/20 04:47:17 christos Exp $
+# $NetBSD: Makefile,v 1.6 2001/01/12 00:44:23 hubertf Exp $
DISTNAME= nc110
PKGNAME= netcat-1.10
@@ -42,5 +42,6 @@ do-install:
done; \
${ECHO} "@dirrm ${EXAMPLE_DIR}" >> PLIST.data; \
)
+ ${INSTALL_MAN} ${FILESDIR}/nc.1 ${PREFIX}/man/man1/nc.1
.include "../../mk/bsd.pkg.mk"
diff --git a/net/netcat/files/nc.1 b/net/netcat/files/nc.1
new file mode 100644
index 00000000000..5cc1b759cff
--- /dev/null
+++ b/net/netcat/files/nc.1
@@ -0,0 +1,127 @@
+.Dd October 1, 1999
+.Dt NC 1
+.Sh NAME
+.Nm nc (netcat)
+.Nd use network sockets from the command line
+.Sh SYNOPSIS
+.Nm
+.Op Fl h
+.Nm ""
+.Op Fl ruvz
+.Op Fl g Ar gateway
+.Op Fl G Ar num
+.Op Fl i Ar secs
+.Op Fl p Ar port
+.Op Fl o Ar file
+.Op Fl s Ar addr
+.Op Fl w Ar secs
+.Ar hostname port[s] [ports] ...
+.Ek
+.Nm ""
+.Ar -l
+.Ar -p port
+.Op Fl nsuvwz
+.Op Fl o Ar file
+.Ar [hostname] [port]
+.\" ae:g:G:hi:lno:p:rs:tuvw:z
+.\"connect to somewhere: nc [-options] hostname port[s] [ports] ...
+.\"listen for inbound: nc -l -p port [-options] [hostname] [port]
+.\"options:
+.\" -g gateway source-routing hop point[s], up to 8
+.\" -G num source-routing pointer: 4, 8, 12, ...
+.\" -h this cruft
+.\" -i secs delay interval for lines sent, ports scanned
+.\" -l listen mode, for inbound connects
+.\" -n numeric-only IP addresses, no DNS
+.\" -o file hex dump of traffic
+.\" -p port local port number
+.\" -r randomize local and remote ports
+.\" -s addr local source address
+.\" -u UDP mode
+.\" -v verbose [use twice to be more verbose]
+.\" -w secs timeout for connects and final net reads
+.\" -z zero-I/O mode [used for scanning]
+.\"port numbers can be individual or ranges: lo-hi [inclusive]
+.Sh DESCRIPTION
+.Nm
+allows you to use network sockets (tcp or udp) from the shell. I'm
+merely writing this man page so that i can "man nc" and find out
+what I've already forgotten.
+.Pp
+For connecting to remote sites, it's usually only necessary to supply the
+.Ar host
+or
+.Ar ip address
+and
+.Ar port
+for the connection. For a listening on a socket, you must specify
+.Ar -l
+for listening, and
+.Ar -p port
+to specify the port on which you want to listen.
+.Pp
+The options are as follows (with C and S indicating whether the option
+applies to the "client" or "server" roles in a tcp conversation):
+.Bl -tag -width Ds
+.It Fl g Ar gateway (C)
+Specifies a source routing hop for outbound connections.
+.It Fl G Ar num (C)
+Can be used to specify the source routing pointer in the ip header,
+presumably in order to forge unused previous steps in the source
+routed path.
+.It Fl h
+Minor help. Not very helpful, hence this man page.
+.It Fl i Ar secs (C)
+Delay interval for lines sent or ports scanned.
+.It Fl l Ar (S)
+Selects "listen" mode instead of connect mode so that people
+can connect to you.
+.It Fl n Ar (S)
+The
+.Fl n
+option indicates that all ip addresses should be printed out instead
+of being looked up in the DNS.
+.It Fl o Ar file (CS)
+Sends a hex-dump of the traffic to the specified file.
+.It Fl p Ar local port number (CS)
+When connecting to a remote service, this is the port from which the
+connection will originate. When listening for remote clients, this
+specifies the local port on which to listen.
+.It Fl r Ar (C)
+Randomizes local source ports and addresses for outbound connections.
+.It Fl s Ar source address (CS)
+Specifies the local source address on which to listen, or from which
+to connect.
+.It Fl u Ar (CS)
+Selects UDP transport as opposed to TCP (the default).
+.It Fl v Ar (CS)
+Turns on verbosity. Use two (or more) for more verbosity.
+.It Fl w Ar secs (CS)
+This sets a timeout for connects or for final net reads.
+.It Fl z Ar (CS)
+Zero I/O mode. While mostly used for scanning, I'm sure you could find
+a way to use it for connect mode.
+.El
+.Pp
+The
+.Nm
+utility exits after both input streams (it's stdin and the remote socket)
+have been closed. It doesn't do this very well, and relies rather
+heavily on the network layers at both ends for this, and as such, if
+microsoft products are used, it might not notice a close because microsoft
+sucks.
+.Sh BUGS
+I don't know...I didn't write the damn thing. But there are probably
+a bunch. Go blame microsoft.
+.Sh SEE ALSO
+.Xr cat 1
+.Sh HISTORY
+The
+.Nm
+utility, a "damn useful little backend utility" begun 950915 or thereabouts,
+as *Hobbit*'s first real stab at some sockets programming. Something that
+should have and indeed may have existed ten years ago, but never became a
+standard Unix utility. IMHO,
+.Nm
+could take its place right next to cat,
+cp, rm, mv, dd, ls, and all those other cryptic and Unix-like things.
diff --git a/net/netcat/pkg/PLIST b/net/netcat/pkg/PLIST
index 8affb56e727..07be556cc27 100644
--- a/net/netcat/pkg/PLIST
+++ b/net/netcat/pkg/PLIST
@@ -1,5 +1,6 @@
-@comment $NetBSD: PLIST,v 1.1.1.1 1998/09/29 23:11:12 kim Exp $
+@comment $NetBSD: PLIST,v 1.2 2001/01/12 00:44:24 hubertf Exp $
sbin/nc
sbin/nc-data
sbin/nc-rservice
sbin/nc-xor
+man/man1/nc.1