summaryrefslogtreecommitdiffstats
path: root/usr.bin/netstat/iso.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/iso.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/iso.c')
-rw-r--r--usr.bin/netstat/iso.c9
1 files changed, 5 insertions, 4 deletions
diff --git a/usr.bin/netstat/iso.c b/usr.bin/netstat/iso.c
index 1cec3b2..735498a 100644
--- a/usr.bin/netstat/iso.c
+++ b/usr.bin/netstat/iso.c
@@ -366,7 +366,8 @@ tp_inproto(pcb)
/*
* Pretty print an iso address (net address + port).
- * If the nflag was specified, use numbers instead of names.
+ * If the numeric_addr or numeric_port were specified,
+ * use numbers instead of names.
*/
#ifdef notdef
@@ -387,7 +388,7 @@ isonetname(iso)
sa.siso_addr = *iso;
sa.siso_tsuffix = 0;
- if (!nflag )
+ if ( !numeric_addr )
ihe = iso_gethostentrybyaddr( &sa, 0, 0 );
if( ihe ) {
Ihe = *ihe;
@@ -426,7 +427,7 @@ isonetprint(iso, sufx, sufxlen, islocal)
if(Aflag)
islocal += 10 ;
- if(!nflag) {
+ if(!numeric_addr) {
if( (cp -line)>10 ) {
cp = line+10;
bzero(cp, sizeof(line)-10);
@@ -435,7 +436,7 @@ isonetprint(iso, sufx, sufxlen, islocal)
*cp++ = '.';
if(sufxlen) {
- if( !Aflag && !nflag && (ihe=iso_getserventrybytsel(sufx, sufxlen))) {
+ if( !Aflag && !numeric_port && (ihe=iso_getserventrybytsel(sufx, sufxlen))) {
Ihe = *ihe;
ihe = &Ihe;
}
OpenPOWER on IntegriCloud