Page Menu
Home
FreeBSD
Search
Configure Global Search
Log In
Files
F105560128
D32720.id97641.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Flag For Later
Award Token
Size
1 KB
Referenced Files
None
Subscribers
None
D32720.id97641.diff
View Options
Index: usr.bin/systat/netstat.c
===================================================================
--- usr.bin/systat/netstat.c
+++ usr.bin/systat/netstat.c
@@ -206,7 +206,7 @@
next = &inpcb;
if (!aflag) {
if (inpcb.inp_vflag & INP_IPV4) {
- if (inet_lnaof(inpcb.inp_laddr) == INADDR_ANY)
+ if (inpcb.inp_laddr.s_addr == INADDR_ANY)
continue;
}
#ifdef INET6
@@ -303,8 +303,7 @@
if (!aflag) {
if (xip->inp_vflag & INP_IPV4) {
- if (inet_lnaof(xip->inp_laddr) ==
- INADDR_ANY)
+ if (xip->inp_laddr.s_addr == INADDR_ANY)
continue;
}
#ifdef INET6
@@ -584,7 +583,6 @@
char *cp = 0;
static char line[NI_MAXHOST];
struct hostent *hp;
- struct netent *np;
struct in_addr in;
#ifdef INET6
@@ -601,19 +599,9 @@
in = ((struct sockaddr_in *)sa)->sin_addr;
if (!nflag && in.s_addr != INADDR_ANY) {
- int net = inet_netof(in);
- int lna = inet_lnaof(in);
-
- if (lna == INADDR_ANY) {
- np = getnetbyaddr(net, AF_INET);
- if (np)
- cp = np->n_name;
- }
- if (cp == NULL) {
- hp = gethostbyaddr((char *)&in, sizeof (in), AF_INET);
- if (hp)
- cp = hp->h_name;
- }
+ hp = gethostbyaddr((char *)&in, sizeof (in), AF_INET);
+ if (hp)
+ cp = hp->h_name;
}
if (in.s_addr == INADDR_ANY)
strcpy(line, "*");
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Wed, Dec 18, 4:27 PM (17 h, 50 s)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
15490266
Default Alt Text
D32720.id97641.diff (1 KB)
Attached To
Mode
D32720: systat: clean up code assuming network classes
Attached
Detach File
Event Timeline
Log In to Comment