Commit Graph

48 Commits

Author SHA1 Message Date
Xin LI
8c54dbfb9b MFV r282611: netcat from OpenBSD 5.7.
MFC after:	2 weeks
2015-05-07 22:54:31 +00:00
Xin LI
a5570ae0d7 MFV r273617: netcat from OpenBSD 5.6.
MFC after:	2 weeks
2014-10-25 00:37:35 +00:00
Xin LI
3ae0125a99 MFV r258194-264360: nc(1) from OpenBSD 5.5.
MFC after:	2 weeks
2014-04-11 22:12:31 +00:00
Xin LI
5abd6fdcfa MFV: netcat from OpenBSD 5.4.
No functional change.
2013-11-15 22:45:14 +00:00
Xin LI
3719c1c85c Reflect version update.
MFC after:	13 days
2013-04-15 18:35:09 +00:00
Xin LI
0772266e63 MFV r249496,249498. The most visible change is that we no longer shuts
down the connection when stdin closes, by default.  This matches Hobbit's
original netcat and GNU netcat.

Old behavior can be restored with the new -N flag.

MFC after:	2 weeks
2013-04-15 05:31:59 +00:00
Xin LI
52dba105d2 MFV: netcat from OpenBSD 5.2.
MFC after:	1 month
2012-10-22 18:56:31 +00:00
Xin LI
0426af06b1 Update FREEBSD-vendor to reflect the current version. 2012-05-04 21:06:53 +00:00
Xin LI
ac3ea9104e Merge from OpenBSD 5.1.
MFC after:	3 weeks
2012-05-04 21:03:39 +00:00
Bjoern A. Zeeb
aaf04b7cb6 Switch from setfib(2) moving the process to a different FIB to setsockopt(2)
with SO_SETFIB to only tag the socket with the right FIB.

That way either setfib(1) or nc -V can be used depending on what wants to be
achieved.  This also allows nc to be used for simple regression testing of
either feature.

Sponsored by:	Cisco Systems, Inc.
2012-02-14 11:37:04 +00:00
Xin LI
42821a2fc9 Merge from OpenBSD 5.0 (this is a dummy change, the vendor change does not
apply to us).
2011-12-26 09:07:08 +00:00
Xin LI
59c7ad52aa MFV: nc(1) from OpenBSD 4.9.
MFC after:	1 month
Obtained from:	OpenBSD
2011-05-11 21:52:26 +00:00
Xin LI
4f2bbc00f2 MFV: nc(1) from OpenBSD 4.8.
While I'm there, bump WARNS level to 2 as the vendor
have the right printf format string now.

MFC after:	1 month
Obtained from:	OpenBSD
2010-10-19 00:01:53 +00:00
Rebecca Cran
dadef94c7a Remove extra word, which looks like a left-over from a deleted sentence. 2010-10-18 14:35:21 +00:00
Benedict Reuschling
bc6940585f Use "printf" instead of "echo -n" in an example because it
should be more compatible for most shells that are out there.

I contacted Philip Guenther at OpenBSD about this PR and he
corrected the issue in their tree pretty fast.

PR:			docs/142243
Submitted by:		Yasir (yasir27 at mail dot ru)
Obtained from:		OpenBSD
Discussed with:		delphij
MFC after:		7 days
2010-07-26 18:33:33 +00:00
Xin LI
6856a5e345 Utilize IP_BINDANY which provided the same semantics of OpenBSD's
SO_BINDANY.
2010-04-15 23:21:24 +00:00
Xin LI
55e999851d Diff reduction with OpenBSD:
- Remove unused locally added variable;
 - Deprecate -o: it's the default behavior on OpenBSD.

X-MFC:	along with nc 4.7.
2010-04-15 19:15:05 +00:00
Xin LI
d6655439ed Update metadata information as well as upgrade instructions. 2010-03-23 23:56:22 +00:00
Xin LI
26bf9c3b54 MFV: Update nc to the version from OpenBSD 4.7.
MFC after:	1 month
2010-03-23 23:00:35 +00:00
Xin LI
faa9a79099 Update the version number. 2010-02-02 00:30:44 +00:00
Xin LI
2d5ea05a45 Update to 4.6.
Note: the -V option from OpenBSD is implemented using setfib(2) on FreeBSD.

MFC after:	2 weeks
2010-01-19 18:45:29 +00:00
Xin LI
933ef0ba72 What we have in base system is actually OpenBSD 4.5's netcat,
update this file to reflect the fact.
2009-12-08 19:12:38 +00:00
Dag-Erling Smørgrav
9517e86625 Update and remove CVS-specific items
Approved by:	re (kib)
2009-08-13 06:07:38 +00:00
Colin Percival
f15e71c26a Fix .Dd value -- our mdoc macros don't know how to parse the $Mdocdate$
tag, so the file was being treated as having no date (i.e., the current
date was being inserted).

Approved by:	re (kib)
2009-07-11 17:35:55 +00:00
Xin LI
c9b4549c3d Add an EXIT STATUS section to the manual page. Currently, nc(1)
does not follow sysexits(3), and returns 1 for all error cases.

PR:		docs/126451
2009-05-29 07:18:31 +00:00
Xin LI
1a9dc239f5 Update netcat to the version carried with OpenBSD 4.5. 2009-05-28 23:23:49 +00:00
Xin LI
7dcaa833c8 Merge nc(1) from OpenBSD 4.4. While there, rename our '-O' (no
tcp options) to '--no-tcpopt' in order to resolve a comflicit
with OpenBSD's -O semantics.
2008-12-19 23:00:23 +00:00
Xin LI
b3b9c2bbcb Flatten all tags of the dist tree of netcat. 2008-09-27 00:53:34 +00:00
Antoine Brodin
b6642dadae Document freebsd extensions to netcat a bit better:
- sort the options
- document -o and -O everywhere

Reviewed by:	delphij
Approved by:	rwatson (mentor)
2008-05-10 18:50:45 +00:00
Xin LI
c784a71d0b Update instructions to match recent practices 2008-04-21 18:37:08 +00:00
Xin LI
0c2d6f72b7 Add vendor metadata 2008-04-21 18:36:52 +00:00
Xin LI
2308b50e15 Resolve conflicts. 2008-04-21 18:31:50 +00:00
Xin LI
c7c53f7a03 Import netcat as of today's OPENBSD_4_3 snapshot. 2008-04-21 18:30:26 +00:00
Xin LI
0b96cd80df This commit was generated by cvs2svn to compensate for changes in r178382,
which included commits to RCS files with non-trunk default branches.
2008-04-21 18:30:26 +00:00
Bruce M Simpson
bc38f653f1 Add an -O option to disable TCP options, for protocol testing purposes.
Do this for active and passive (-l switch) TCP sessions.

MFC after:	1 week
2008-04-01 13:54:24 +00:00
George V. Neville-Neil
8409aedfa6 Commit IPv6 support for FAST_IPSEC to the tree.
This commit includes all remaining changes for the time being including
user space updates.

Submitted by:    bz
Approved by:    re
2007-07-01 12:08:08 +00:00
Xin LI
bdb0aaa123 Resolve conflicts. 2007-03-28 01:57:03 +00:00
Xin LI
b2f6436d8f Import netcat as of today's OPENBSD_4_1 snapshot. 2007-03-28 01:55:49 +00:00
Xin LI
c262af8430 This commit was generated by cvs2svn to compensate for changes in r167961,
which included commits to RCS files with non-trunk default branches.
2007-03-28 01:55:49 +00:00
Xin LI
2440a45859 Resolve conflicts. 2006-05-21 15:52:24 +00:00
Xin LI
7a997a696b Import netcat from OpenBSD 3.9-RELEASE. 2006-05-21 15:49:27 +00:00
Xin LI
50973020f9 This commit was generated by cvs2svn to compensate for changes in r158795,
which included commits to RCS files with non-trunk default branches.
2006-05-21 15:49:27 +00:00
Hiroki Sato
c0f0812202 Fix incorrect command line examples.
Submitted by:	Yoshihiko Sarumaru (mistral at imasy dot or dot jp)
PR:		docs/94158
MFC after:	2 days
2006-03-07 18:34:18 +00:00
Ruslan Ermilov
4bdc233895 Fix markup in local FreeBSD additions.
Approved by:	re (blanket manpages)
2005-06-27 07:07:55 +00:00
Xin LI
b0683dae2d Undo the VCS tag move to reduce diff hunks.
Pointed out by:	ru
2005-02-07 05:34:35 +00:00
Xin LI
a58ff0abbb Add instructions about upgrading netcat(1). 2005-02-06 15:26:44 +00:00
Xin LI
04def62430 Finish the import of nc(1) from OpenBSD. This includes:
- Bring IPsec support from the ports collection [1].
	- Bring -o ("once only") option from the ports
	  collection [2].
	- Adopt the Makefile framework into
	  usr.bin/nc/Makefile.
	- Add a knob to control whether to build nc(1),
	  NO_NETCAT.
	- Bump __FreeBSD_version so ports collection can
	  detect this change.

Original patchset are contributed to the ports collection by:
[1] nectar, [2] joerg.

Note: WARNS?=6 patchset spined off in this commit, in order not
to take too many files off the vendor branch.
2005-02-06 14:44:27 +00:00
Xin LI
8c384020b3 Import a (stripped) snapshot of OpenBSD's nc(1) an excellent
reimplementation of the famous tool that can do arbitrary TCP
and UDP connections and listens.

This gaves sysadm the same tool the crackers have, so that
they may learn what the network is about and protect it better.
For developers, this is an invaluable debugging tool, and a
good build block of scripts.

Discussed on:	freebsd-hackers@
2005-02-04 08:41:44 +00:00