History log of /freebsd-current/contrib/netcat/nc.1
Revision Date Author Comments
# d4b3aefd 17-Aug-2023 Pietro Cerutti <gahr@FreeBSD.org>

netcat: add --crlf to convert LF into CRLF

This adds the --crlf option to netcat, which triggers translation of \n
characters into \r\n sequences in the input -> network direction.
The Linux version of nc also supports this functionality with --crlf and
-C. The OpenBSD version uses -C to specify client certificates. Our
version is too old and doesn't have it, but I avoided adding -C anyway
to ease future syncs with upstream.

Attempts to upstream the feature were unsuccessful:
https://marc.info/?t=169282068500001

Differential Revision: https://reviews.freebsd.org/D41489


# cef7ab70 17-Jan-2023 Tom Jones <thj@FreeBSD.org>

netcat: Allow nc to be an if_tun tunnel broker

Reviewed by: kevans
Relnotes: yes
Sponsored by: Zenarmor
Sponsored by: OPNsense
Sponsored by: Klara, Inc.
Differential Revision: https://reviews.freebsd.org/D37435


# 5c346ead 10-Jul-2020 Mark Johnston <markj@FreeBSD.org>

Adjust .Dd, missed in r363084.

MFC with: r363084


# d0415892 10-Jul-2020 Mark Johnston <markj@FreeBSD.org>

Add a --sctp flag to nc.

The change adds an SCTP mode akin to UDP mode. This is handy for doing
smoke testing of SCTP.

Use a long option to minimize the risk of option conflicts with OpenBSD.
For bonus points, this change unbreaks --no-tcpopt by adding a missing
case required by getopt_long().

Reviewed by: delphij, tuexen
MFC after: 2 weeks
Sponsored by: The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D25610


# 1e62eced 14-Dec-2019 Edward Tomasz Napierala <trasz@FreeBSD.org>

Add -M option to nc(1), which makes it print the TCP connection
statistics obtained with stats(3) in JSON format to standard error.

Reviewed by: allanjude, thj, cem (earlier version)
Tested by: thj
MFC after: 2 weeks
Relnotes: yes
Sponsored by: Klara Inc.
Differential Revision: https://reviews.freebsd.org/D21324


# a7d5f7eb 19-Oct-2010 Jamie Gritton <jamie@FreeBSD.org>

A new jail(8) with a configuration file, to replace the work currently done
by /etc/rc.d/jail.


# dadef94c 18-Oct-2010 Rebecca Cran <brucec@FreeBSD.org>

Remove extra word, which looks like a left-over from a deleted sentence.


# bc694058 26-Jul-2010 Benedict Reuschling <bcr@FreeBSD.org>

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


# b36b15fd 21-Apr-2010 Xin LI <delphij@FreeBSD.org>

MFC: netcat 4.7.


# 55e99985 15-Apr-2010 Xin LI <delphij@FreeBSD.org>

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.


# fe0506d7 09-Mar-2010 Marcel Moolenaar <marcel@FreeBSD.org>

Create the altix project branch. The altix project will add support
for the SGI Altix 350 to FreeBSD/ia64. The hardware used for porting
is a two-module system, consisting of a base compute module and a
CPU expansion module. SGI's NUMAFlex architecture can be an excellent
platform to test CPU affinity and NUMA-aware features in FreeBSD.


# 281e5d86 01-Feb-2010 Xin LI <delphij@FreeBSD.org>

MFC r202640:

Update to 4.6.

Note: the -V option from OpenBSD is implemented using setfib(2) on FreeBSD.


# f15e71c2 11-Jul-2009 Colin Percival <cperciva@FreeBSD.org>

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)


# c9b4549c 29-May-2009 Xin LI <delphij@FreeBSD.org>

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


# d7f03759 19-Oct-2008 Ulf Lilleengen <lulf@FreeBSD.org>

- Import the HEAD csup code which is the basis for the cvsmode work.


# b6642dad 10-May-2008 Antoine Brodin <antoine@FreeBSD.org>

Document freebsd extensions to netcat a bit better:
- sort the options
- document -o and -O everywhere

Reviewed by: delphij
Approved by: rwatson (mentor)


# 2308b50e 21-Apr-2008 Xin LI <delphij@FreeBSD.org>

Resolve conflicts.


# c7c53f7a 21-Apr-2008 Xin LI <delphij@FreeBSD.org>

Import netcat as of today's OPENBSD_4_3 snapshot.


# bc38f653 01-Apr-2008 Bruce M Simpson <bms@FreeBSD.org>

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


# bdb0aaa1 27-Mar-2007 Xin LI <delphij@FreeBSD.org>

Resolve conflicts.


# b2f6436d 27-Mar-2007 Xin LI <delphij@FreeBSD.org>

Import netcat as of today's OPENBSD_4_1 snapshot.


# 2440a458 21-May-2006 Xin LI <delphij@FreeBSD.org>

Resolve conflicts.


# 7a997a69 21-May-2006 Xin LI <delphij@FreeBSD.org>

Import netcat from OpenBSD 3.9-RELEASE.


# c0f08122 07-Mar-2006 Hiroki Sato <hrs@FreeBSD.org>

Fix incorrect command line examples.

Submitted by: Yoshihiko Sarumaru (mistral at imasy dot or dot jp)
PR: docs/94158
MFC after: 2 days


# 4bdc2338 27-Jun-2005 Ruslan Ermilov <ru@FreeBSD.org>

Fix markup in local FreeBSD additions.

Approved by: re (blanket manpages)


# b0683dae 06-Feb-2005 Xin LI <delphij@FreeBSD.org>

Undo the VCS tag move to reduce diff hunks.

Pointed out by: ru


# 04def624 06-Feb-2005 Xin LI <delphij@FreeBSD.org>

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.


# 8c384020 04-Feb-2005 Xin LI <delphij@FreeBSD.org>

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@