Package: freebsd-utils / 10.1~svn273304-1

netstat_maddrs.diff Patch series | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
Temporarily disable showing multicast addresses in netstat -a

The necessary getifmaddrs and freeifaddrs functions are currently only
available in FreeBSD libc

--- a/src/usr.bin/netstat/if.c
+++ b/src/usr.bin/netstat/if.c
@@ -202,6 +202,7 @@
 	}
 }
 
+#if 0
 /*
  * Find next multiaddr for a given interface name.
  */
@@ -220,6 +221,7 @@
 
 	return (ifma);
 }
+#endif
 
 /*
  * Print a description of the network interfaces.
@@ -228,15 +230,19 @@
 intpr(int interval, void (*pfunc)(char *), int af)
 {
 	struct ifaddrs *ifap, *ifa;
+#if 0
 	struct ifmaddrs *ifmap, *ifma;
+#endif
 	
 	if (interval)
 		return sidewaysintpr(interval);
 
 	if (getifaddrs(&ifap) != 0)
 		err(EX_OSERR, "getifaddrs");
+#if 0
 	if (aflag && getifmaddrs(&ifmap) != 0)
 		err(EX_OSERR, "getifmaddrs");
+#endif
 
 	if (!pfunc) {
 		if (Wflag)
@@ -390,6 +396,7 @@
 		if (!aflag)
 			continue;
 
+#if 0
 		/*
 		 * Print family's multicast addresses.
 		 */
@@ -449,11 +456,14 @@
 
 			ifma = ifma->ifma_next;
 		}
+#endif
 	}
 
 	freeifaddrs(ifap);
+#if 0
 	if (aflag)
 		freeifmaddrs(ifmap);
+#endif
 }
 
 struct iftot {