summaryrefslogtreecommitdiffstats
path: root/usr.bin/netstat/route.c
diff options
context:
space:
mode:
authorjhay <jhay@FreeBSD.org>1997-05-10 10:03:43 +0000
committerjhay <jhay@FreeBSD.org>1997-05-10 10:03:43 +0000
commitc6d99f375062113c7077c48641b12703e3315eb8 (patch)
treed964ceaff31099de7b6049047e852e53c946a0bc /usr.bin/netstat/route.c
parent4f2a5d896ef4c868add74c88150f6cc2bbe07aae (diff)
downloadFreeBSD-src-c6d99f375062113c7077c48641b12703e3315eb8.zip
FreeBSD-src-c6d99f375062113c7077c48641b12703e3315eb8.tar.gz
Add the new ipx statistics variables.
Remove the dns lookup code in the ipx functions. That is bogus and slows things like netstat -r(f ipx) down, without gaining anything. Remove the ipx error protocol statistics.
Diffstat (limited to 'usr.bin/netstat/route.c')
-rw-r--r--usr.bin/netstat/route.c15
1 files changed, 3 insertions, 12 deletions
diff --git a/usr.bin/netstat/route.c b/usr.bin/netstat/route.c
index 710087a..b6487fe 100644
--- a/usr.bin/netstat/route.c
+++ b/usr.bin/netstat/route.c
@@ -36,7 +36,7 @@
static char sccsid[] = "From: @(#)route.c 8.6 (Berkeley) 4/28/95";
#endif
static const char rcsid[] =
- "$Id$";
+ "$Id: route.c,v 1.25 1997/02/22 19:56:23 peter Exp $";
#endif /* not lint */
#include <sys/param.h>
@@ -730,8 +730,6 @@ ipx_print(sa)
static char mybuf[50];
char cport[10], chost[15], cnet[15];
- if(!nflag)
- sp = getservbyport(work.x_port, "ipx");
port = ntohs(work.x_port);
if (ipx_nullnet(work) && ipx_nullhost(work)) {
@@ -745,9 +743,7 @@ static char mybuf[50];
return (mybuf);
}
- if (!nflag && (np = getnetbyaddr(*(u_long *)&work.x_net, AF_IPX)))
- net = np->n_name;
- else if (ipx_wildnet(work))
+ if (ipx_wildnet(work))
net = "any";
else if (ipx_nullnet(work))
net = "*";
@@ -760,9 +756,7 @@ static char mybuf[50];
net = p;
}
- if (!nflag && (hp = gethostbyaddr((char *)&work.x_host, 6, AF_IPX)))
- host = hp->h_name;
- else if (ipx_wildhost(work))
+ if (ipx_wildhost(work))
host = "any";
else if (ipx_nullhost(work))
host = "*";
@@ -800,9 +794,6 @@ static union ipx_net ipx_zeronet;
work = *sipx;
in = work.sipx_addr;
- hp = gethostbyaddr((char *)&in, sizeof(struct ipx_addr), AF_IPX);
- if (hp) return (hp->h_name);
-
work.sipx_addr.x_port = 0;
work.sipx_addr.x_net = ipx_zeronet;
p = ipx_print((struct sockaddr *)&work);
OpenPOWER on IntegriCloud