From c8e726a25b40023308ad315f3bb0959bb478bf42 Mon Sep 17 00:00:00 2001 From: schwarze <> Date: Wed, 12 Feb 2020 14:46:36 +0000 Subject: Standardize argument naming for "sourceaddr" and unify the wording a bit, similar to what deraadt@ recently did in other manual pages. --- src/usr.bin/nc/nc.1 | 13 ++++++------- src/usr.bin/nc/netcat.c | 6 +++--- 2 files changed, 9 insertions(+), 10 deletions(-) (limited to 'src') diff --git a/src/usr.bin/nc/nc.1 b/src/usr.bin/nc/nc.1 index 746a055944..fff5857229 100644 --- a/src/usr.bin/nc/nc.1 +++ b/src/usr.bin/nc/nc.1 @@ -1,4 +1,4 @@ -.\" $OpenBSD: nc.1,v 1.94 2019/10/24 17:27:08 kn Exp $ +.\" $OpenBSD: nc.1,v 1.95 2020/02/12 14:46:36 schwarze Exp $ .\" .\" Copyright (c) 1996 David Sacerdote .\" All rights reserved. @@ -25,7 +25,7 @@ .\" (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF .\" THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. .\" -.Dd $Mdocdate: October 24 2019 $ +.Dd $Mdocdate: February 12 2020 $ .Dt NC 1 .Os .Sh NAME @@ -47,7 +47,7 @@ .Op Fl P Ar proxy_username .Op Fl p Ar source_port .Op Fl R Ar CAfile -.Op Fl s Ar source +.Op Fl s Ar sourceaddr .Op Fl T Ar keyword .Op Fl V Ar rtable .Op Fl W Ar recvlimit @@ -228,10 +228,9 @@ instead of sequentially within a range or in the order that the system assigns them. .It Fl S Enable the RFC 2385 TCP MD5 signature option. -.It Fl s Ar source -Send packets from the interface with the -.Ar source -IP address. +.It Fl s Ar sourceaddr +Set the source address to send packets from, +which is useful on machines with multiple interfaces. For .Ux Ns -domain datagram sockets, specifies the local temporary socket file diff --git a/src/usr.bin/nc/netcat.c b/src/usr.bin/nc/netcat.c index c4b524431b..503095584a 100644 --- a/src/usr.bin/nc/netcat.c +++ b/src/usr.bin/nc/netcat.c @@ -1,4 +1,4 @@ -/* $OpenBSD: netcat.c,v 1.216 2020/01/26 23:47:57 beck Exp $ */ +/* $OpenBSD: netcat.c,v 1.217 2020/02/12 14:46:36 schwarze Exp $ */ /* * Copyright (c) 2001 Eric Jackson * Copyright (c) 2015 Bob Beck. All rights reserved. @@ -1822,7 +1822,7 @@ help(void) \t-R CAfile CA bundle\n\ \t-r Randomize remote ports\n\ \t-S Enable the TCP MD5 signature option\n\ - \t-s source Local source address\n\ + \t-s sourceaddr Local source address\n\ \t-T keyword TOS value or TLS options\n\ \t-t Answer TELNET negotiation\n\ \t-U Use UNIX domain socket\n\ @@ -1848,7 +1848,7 @@ usage(int ret) "\t [-i interval] [-K keyfile] [-M ttl] [-m minttl] [-O length]\n" "\t [-o staplefile] [-P proxy_username] [-p source_port] " "[-R CAfile]\n" - "\t [-s source] [-T keyword] [-V rtable] [-W recvlimit] " + "\t [-s sourceaddr] [-T keyword] [-V rtable] [-W recvlimit] " "[-w timeout]\n" "\t [-X proxy_protocol] [-x proxy_address[:port]] " "[-Z peercertfile]\n" -- cgit v1.2.3-55-g6feb