summaryrefslogtreecommitdiffstats
path: root/usr.bin/netstat/inet6.c
diff options
context:
space:
mode:
authorassar <assar@FreeBSD.org>2001-06-15 00:25:44 +0000
committerassar <assar@FreeBSD.org>2001-06-15 00:25:44 +0000
commitea6e16bc20e4706c99c89ec7b7f3ab3be1791a4c (patch)
tree4c8e50bedba0b4b6d215e040dc90818e756c7c91 /usr.bin/netstat/inet6.c
parent5f504c676b2624b656e970c104fbdb1b8bb95ce6 (diff)
downloadFreeBSD-src-ea6e16bc20e4706c99c89ec7b7f3ab3be1791a4c.zip
FreeBSD-src-ea6e16bc20e4706c99c89ec7b7f3ab3be1791a4c.tar.gz
add the option -S for printing port numbers symbolically but addresses
numerically. clean up the CFLAGS in Makefile.
Diffstat (limited to 'usr.bin/netstat/inet6.c')
-rw-r--r--usr.bin/netstat/inet6.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/usr.bin/netstat/inet6.c b/usr.bin/netstat/inet6.c
index c41ab90..e027d7f 100644
--- a/usr.bin/netstat/inet6.c
+++ b/usr.bin/netstat/inet6.c
@@ -1022,7 +1022,7 @@ rip6_stats(off, name)
/*
* Pretty print an Internet address (net address + port).
- * If the nflag was specified, use numbers instead of names.
+ * Take numeric_addr and numeric_port into consideration.
*/
#define GETSERVBYPORT6(port, proto, ret)\
{\
@@ -1060,7 +1060,7 @@ inet6print(in6, port, proto, numeric)
/*
* Construct an Internet address representation.
- * If the nflag has been supplied, give
+ * If the numeric_addr has been supplied, give
* numeric value, otherwise try for symbolic name.
*/
@@ -1074,7 +1074,7 @@ inet6name(in6p)
static char domain[MAXHOSTNAMELEN];
static int first = 1;
- if (first && !nflag) {
+ if (first && !numeric_addr) {
first = 0;
if (gethostname(domain, MAXHOSTNAMELEN) == 0 &&
(cp = index(domain, '.')))
@@ -1083,7 +1083,7 @@ inet6name(in6p)
domain[0] = 0;
}
cp = 0;
- if (!nflag && !IN6_IS_ADDR_UNSPECIFIED(in6p)) {
+ if (!numeric_addr && !IN6_IS_ADDR_UNSPECIFIED(in6p)) {
hp = gethostbyaddr((char *)in6p, sizeof(*in6p), AF_INET6);
if (hp) {
if ((cp = index(hp->h_name, '.')) &&
OpenPOWER on IntegriCloud