Commit Graph

377 Commits

Author SHA1 Message Date
plunky
f183cc477b no need to forward declare struct uio and proc before including
<sys/file.h> as it does that internally, and don't continue the
_KERNEL definition afterwards as it causes some other problems
with pcc relating to unreferenced symbols in unused static
inline functions which gcc optimises away.
2010-04-22 14:37:06 +00:00
plunky
cb88fa41a4 it is not [any longer] necessary to #define _KERNEL while including
<net/route.h> so remove it.

This fixes a build problem with pcc which is not as clever as gcc
when optimising away unused static inline functions which refer to
unknown symbols (eg sockaddr_dup).
2010-04-22 14:32:30 +00:00
pooka
bc1cf39b94 Add -h, which makes output of bytes counts "humanized" (e.g. -bih)
(netstat had -h some 15 years ago, but since then it has been just
a fancy way of calling usage())
2010-02-24 11:00:27 +00:00
christos
8f7e9f408c PR/42243: Yasuoka Masahiko: Add support for "net.inet.icmp.bmcastecho" support.
Print the current status.
2009-12-07 18:48:45 +00:00
plunky
98f75b5b42 protecting sockaddr_in6 with -DINET6 2009-09-27 18:19:18 +00:00
degroote
2d48ac808c Import pfsync support from OpenBSD 4.2
Pfsync interface exposes change in the pf(4) over a pseudo-interface, and can
be used to synchronise different pf.

This work was part of my 2009 GSoC

No objection on tech-net@
2009-09-14 10:36:48 +00:00
pgoyette
ca6d65ecdd Use PRIu64 for printf'ing stuff. Fixes build breakage on part-amd64
introduced in rev 1.64 (and reverts a partial fix provided in rev 1.65)
2009-09-13 21:46:23 +00:00
elad
dc553b0f9c Put some unsigned long long casts (as was in the original printing code).
Should fix build breakage noticed by pgoyette@ on current-users@:

    http://mail-index.netbsd.org/current-users/2009/09/13/msg010554.html

(sorry, don't have an amd64 anymore!)
2009-09-13 19:04:29 +00:00
wiz
76e34094ac Fix section for sysctl xref (it is 3, not 2). 2009-09-13 09:17:26 +00:00
elad
a363352277 Checkin work in progress to make netstat use sysctl rather than kvm(3).
This commit mostly adds code written by Claudio Jeker for OpenBSD to
support sysctl in the interface printing parts (-i, -I, -w). The port has
been ported to NetBSD with tiny adjustments -- of course all bugs etc.
are mine.

Also add and document a -X flag to force sysctl usage. The documentation
notes this flag may be removed at any time and its presence should not be
relied on.

Some misc. comments/#ifdef changes/code snippet moves as well.

Please note that no functionality should change as the routing and
interface printing code is still not fully supported.

Mailing list reference:

    http://mail-index.netbsd.org/tech-userlevel/2009/09/09/msg002604.html
2009-09-13 02:53:17 +00:00
dholland
69388abb04 Fix typo 2009-06-28 19:02:46 +00:00
christos
3b9e5891ba fix typo (Silas Silva) 2009-05-28 14:57:42 +00:00
lukem
d5a0caad3b Fix many WARNS=4 issues (-Wshadow -Wcast-qual -Wsign-compare).
Fix probable bug with numeric printing of anon ports when using sysctl.
2009-04-12 16:08:37 +00:00
joerg
c094012060 Fix markup 2009-03-11 13:54:05 +00:00
dholland
e203f53315 Make netstat handle -a properly; that is, don't show unconnected
listener sockets unless -a was given. (It was checking the local
address instead of the remote address for being INADDR_ANY or
equivalent.)

PR 38093 from Dieter Roelants; I adjusted the patch a little.

This needs pullups for both -4 and -5.
2009-02-22 07:43:01 +00:00
wiz
3ca38c6b62 Sort option descriptions, and options in usage.
Covers PR 40627.
2009-02-14 11:08:17 +00:00
christos
72b21d3647 fix for 64 bit time_t 2008-12-29 01:33:03 +00:00
lukem
98e5374ccb Remove the \n and tabs from the __COPYRIGHT() strings.
Tweak to use a consistent format.
2008-07-21 14:19:20 +00:00
martin
ce099b4099 Remove clause 3 and 4 from TNF licenses 2008-04-28 20:22:51 +00:00
thorpej
c7ece08d20 net.atalk, not net.at. 2008-04-24 04:09:50 +00:00
thorpej
40edcfedc2 Note which things are not available by KVM, and print a nice message
stating so if someone specifically asks for it.
2008-04-24 04:09:27 +00:00
thorpej
9af7365b12 Make note of a few things no longer available via kvm. 2008-04-24 03:46:25 +00:00
thorpej
2654d13326 netns is no longer in the tree; completely purge it from netstat(1). 2008-04-23 15:35:37 +00:00
thorpej
d2d995427e Make DDP stats per-cpu. While here, bump the counters to 64-bit and
make them available by sysctl.
2008-04-23 15:17:42 +00:00
plunky
6aadc469d7 don't include <cons_pcb.h> as it is unnecessary 2008-04-23 08:26:47 +00:00
thorpej
02f63fe1bf PF_KEY stats for IPSEC and FAST_IPSEC are now per-CPU. 2008-04-23 07:29:47 +00:00
thorpej
caf49ea572 Make IPSEC and FAST_IPSEC stats per-cpu. Use <net/net_stats.h> and
netstat_sysctl().
2008-04-23 06:09:04 +00:00
thorpej
6144958d8f ARP and IGMP stats are now available by sysctl. 2008-04-15 16:06:28 +00:00
thorpej
83dd106948 Make IGMP stats per-cpu. 2008-04-15 16:02:03 +00:00
thorpej
881a947288 Make ARP stats per-cpu. 2008-04-15 15:17:54 +00:00
thorpej
1121526b25 Make CARP status per-cpu. 2008-04-15 06:03:28 +00:00
thorpej
0e499be12d Make pim6 stats per-cpu. 2008-04-15 05:40:15 +00:00
thorpej
16497cdf28 Make raw6 stats per-cpu. 2008-04-15 05:13:37 +00:00
thorpej
db098952cf Use ANSI function decls throughout. 2008-04-15 04:50:05 +00:00
thorpej
c2da059bc6 Make udp6 stats per-cpu. 2008-04-15 04:43:25 +00:00
thorpej
3f466bce48 Change IPv6 stats from a structure to an array of uint64_t's.
Note: This is ABI-compatible with the old ip6stat structure; old netstat
binaries will continue to work properly.
2008-04-08 23:37:43 +00:00
thorpej
aa8724ff7b Change ICMP6 stats from a structure to an array of uint64_t's.
Note: This is ABI-compatible with the old icmp6stat structure; old netstat
binaries will continue to work properly.
2008-04-08 15:04:35 +00:00
thorpej
f5c68c0b9f Change TCP stats from a structure to an array of uint64_t's.
Note: This is ABI-compatible with the old tcpstat structure; old netstat
binaries will continue to work properly.
2008-04-08 01:03:58 +00:00
thorpej
88d65e9212 Change IP stats from a structure to an array of uint64_t's.
Note: This is ABI-compatible with the old ipstat structure; old netstat
binaries will continue to work properly.
2008-04-07 06:31:27 +00:00
jnemeth
65c35115a2 fix build problem introduced in 1.79 2008-04-06 21:53:25 +00:00
thorpej
738aabaf82 Change UDP stats from a structure to an array of uint64_t's.
Note: This is ABI-compatible with the old icmpstat structure; old netstat
binaries will continue to work properly.
2008-04-06 20:17:27 +00:00
thorpej
67b7abb1ce Change ICMP stats from a structure to an array of uint64_t's.
Note: This is ABI-compatible with the old icmpstat structure; old netstat
binaries will continue to work properly.
2008-04-06 19:04:48 +00:00
ad
835572acdb - Define _KERNEL for sys/types.h in unix.c.
- caddr_t -> char * in a couple of places.
2008-02-27 16:36:54 +00:00
matt
3b1e7dbd0b Fix more -combine fallout. (mismatched definitions) 2008-02-16 07:16:01 +00:00
dyoung
5448ecad57 #include <stdbool.h> for 'bool', so that this kernel groveller will
hopefully compile again.
2008-01-21 20:34:13 +00:00
yamt
0116b931c2 sync with kernel. (make some mbuf related statistics per-cpu.) 2008-01-17 14:53:18 +00:00
yamt
bfc70617c5 mbpr: fix a harmless bug. (sizeof pointer -> sizeof *pointer) 2008-01-14 12:56:05 +00:00
degroote
11c94c257e Report the new ipcomp stats under FAST_IPSEC : ipcomps_minlen and
ipcomps_uselesscomp
2007-12-29 21:36:43 +00:00
seanb
769f8347e5 Report ipsecstats.ips_spdcache_miss under FAST_IPSEC correctly. 2007-12-05 00:51:12 +00:00
yamt
bea40b2aa3 don't bother to print unmaintained statistics. (m_drops, m_wait) 2007-11-10 12:05:08 +00:00