Commit Graph

94 Commits

Author SHA1 Message Date
Poul-Henning Kamp
c6620a13c0 Make netstat work again. 1998-08-08 08:13:04 +00:00
Poul-Henning Kamp
99453c6ab8 Don't open /dev/mem until we need it, most cases we don't. 1998-08-05 13:54:07 +00:00
Bruce Evans
22694ebad5 Fixed printf format errors. 1998-07-06 21:01:54 +00:00
Bruce Evans
b45d09e830 Fixed type mismatches and style bugs in rev.1.30. 1998-07-06 20:52:08 +00:00
Warner Losh
9a1f6729af o Use snprintf over sprintf.
o Use strncpy correctly.
o Use enough buffer for line.

Inspired by or Obtained from: Similar changes in OpenBSD
1998-06-09 04:13:03 +00:00
Pierre Beyssac
958d6f7fc3 Make "netstat -s" display stats on fast-forwarded packets.
Obtained from: NetBSD code
1998-05-19 16:00:55 +00:00
Garrett Wollman
8ad9b1a36b Fix rev. 1.7: get offsetof from the correct header file. 1998-05-16 18:04:00 +00:00
Andrey A. Chernov
bc6ee716d5 Fix broken sun_len usage: it is not sun_path length but bigger 1998-05-16 08:31:49 +00:00
Garrett Wollman
4f81ef5056 mbuf, inet, and unix modules no longer read kvm. 1998-05-15 20:19:21 +00:00
Steve Price
b2ab9053e3 Remove (now) invalid .Xr trsp 8
PR:		6494
Submitted by:	Don Morrison <dmorrisn@u.washington.edu>
1998-05-03 21:34:34 +00:00
David Greenman
ca67f4589b Output mbuf clusters as current/peak/max. Requires new kern.ipc.nmbclusters
sysctl variable (previously committed).
1998-04-24 04:30:27 +00:00
Poul-Henning Kamp
384606eb2c netstat truncates info in sockaddr* between kgetsa and p_sockaddr
by dereferencing pointer to smaller structure

PR:		5256
Reviewed by:	phk
Submitted by:	Gregory D. Moncreaff <moncrg@bt340707.res.ray.com>
1998-04-22 06:54:31 +00:00
Poul-Henning Kamp
c5d1ef4169 The current version of netstat does not print the interface
name for AF_LINK routing entries. This makes debugging
network problems more difficult.
PR:		4182
Reviewed by:	phk
Submitted by:	Craig Leres <leres@ee.lbl.gov>
1998-04-19 18:18:25 +00:00
Andrey A. Chernov
881377bc7d Add (unsigned) cast to prevent overflow in %
Submitted by:  "Alex G. Bulushev" <bag@demos.su>
1997-11-10 08:03:36 +00:00
Steve Price
fbf8628c08 Typo fix.
PR:		docs/4579
Submitted by:	Stephen J. Roznowski <sjr@home.net>
1997-10-27 03:31:57 +00:00
Garrett Wollman
4e00c309c0 Print out the two new fields in the ICMP stats. While we're at it, also
convert icmp_stats() to use sysctl(3) to retrieve the information
rather than kvm.  This makes it easy to also print whether ICMP address
mask responses are enabled, so do so.
1997-08-25 16:57:05 +00:00
Garrett Wollman
e4bb0b9a5b While I'm in here, fix address printing for `netstat -f unix' which has been
broken for a couple of weeks now...
1997-08-25 16:55:00 +00:00
Peter Wemm
5cc5ba1dd3 Bandaid to make this compile.. These old mbuf types should probably be
ripped out.
1997-08-17 09:12:43 +00:00
Philippe Charnier
5d422d6aa7 Remove prog, unused variables.
Cosmetic in usage string.
1997-07-29 06:51:41 +00:00
Guido van Rooij
11523cf5fb Remove -I/sys 1997-07-13 11:51:42 +00:00
Poul-Henning Kamp
ef1f3a4fd4 Remove some quite bogus code that tried to find subnet names but instead
spammed named with bogus queries.
1997-05-25 08:36:20 +00:00
John Hay
64a0cc86b5 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.
1997-05-10 10:03:43 +00:00
Warner Losh
1c8af87873 compare return value from getopt against -1 rather than EOF, per the final
posix standard on the topic.
1997-03-29 04:34:07 +00:00
Garrett Wollman
13ae2e2d75 Use the new sysctl(3) interface to mbuf statistics rather than
groveling about in kmem.
1997-02-24 20:40:40 +00:00
Peter Wemm
c115df18cd Revert $FreeBSD$ to $Id$ 1997-02-22 19:58:13 +00:00
Garrett Wollman
2fde9bd6de When the mbuf code was changed to use a private allocator instead of
the kernel malloc, netstat was never updated to reflect the fact that
there are once again allocated-but-free mbufs, just as there are
clusters, and so the information presented about how much memory was
allocated to the network was bogus.  Fixed.
1997-02-12 19:33:22 +00:00
Garrett Wollman
a5969f5ffc Print out the new uninteresting-multicast-packets statistic. 1997-01-21 21:08:57 +00:00
Jordan K. Hubbard
1130b656e5 Make the long-awaited change from $Id$ to $FreeBSD$
This will make a number of things easier in the future, as well as (finally!)
avoiding the Id-smashing problem which has plagued developers for so long.

Boy, I'm glad we're not using sup anymore.  This update would have been
insane otherwise.
1997-01-14 07:20:47 +00:00
Garrett Wollman
75fb877061 Print out the interface's multicast addresses using the new
structures.
1997-01-13 21:27:46 +00:00
Paul Traina
e1fb4daa3e TCP statistics are unsigned counters.
Tor Egge reports counter wrap and requests and update to quad_t sized
counters, which is also a good thing to do,  but I'm unhappy about adding
two more instructions into the  code path every time we doink a counter.

Maybe with or after the Lite2 merge...
Submitted by:	Tor Egge <Tor.Egge@idt.ntnu.no>
1997-01-07 20:09:28 +00:00
Garrett Wollman
8766942543 Update to match changes in <net/if.h> and <netinet/ip_mroute.h>. 1997-01-03 20:16:31 +00:00
Garrett Wollman
15244cd5c2 Learn to follow the new interface address lists. 1996-12-13 21:29:59 +00:00
Garrett Wollman
0e27dc0563 Understand queue-ized ifnet structures. 1996-12-11 20:39:43 +00:00
Garrett Wollman
628d2ac1b0 Fix up programs which expect <net/if.h> to include <sys/time.h> to instead
do it themselves.  (Some of these programs actually depended on this
beyond compiling the definition of struct ifinfo!)  Also fix up some
other #include messes while we're at it.
1996-12-10 17:11:53 +00:00
Bill Fenner
f6719675d2 Display multicast addresses if the "a" flag is used in combination
with "-i".  This was already in the man page but was not implemented.

Obtained from:	Multicast release 3.5
1996-12-02 06:38:30 +00:00
Garrett Wollman
9086499893 Eliminate unnecessary include of <sys/mbuf.h>. PCBs aren't stored in mbufs
any more.
1996-10-28 18:56:44 +00:00
Garrett Wollman
924a8fa376 Remove reference to oobsolete RTF_MASK flag (soon to be removed). 1996-10-09 18:19:07 +00:00
Julian Elischer
d4b2a43950 make appletalk networks not show an un-needed host
part in displaying the routes.
1996-09-05 23:34:09 +00:00
Bruce Evans
5b963fa12e Fixed DPADD. 1996-09-05 17:16:10 +00:00
Julian Elischer
a8d3784533 fix printing of netranges in the i and r displays for netatalk 1996-08-31 07:43:01 +00:00
Poul-Henning Kamp
8d612dd2fc Try to make netstat more smart about port numbers.
Feedback most welcome.
1996-08-23 19:05:34 +00:00
Julian Elischer
e56dd1bb4f Submitted by: archie@whistle.com
slight cleanups on yesterday's patches
1996-07-23 22:00:14 +00:00
Julian Elischer
3a67d2bc37 Submitted by: archie@whistle.com
appletalk cleanups
1996-07-23 01:18:47 +00:00
Julian Elischer
93e0e11657 Adding changes to ipfw and the kernel to support ip packet diversion..
This stuff should not be too destructive if the IPDIVERT is not compiled in..
 be aware that this changes the size of the ip_fw struct
so ipfw needs to be recompiled to use it.. more changes coming to clean this up.
1996-07-10 19:44:30 +00:00
Julian Elischer
6ffcfd6c9e appletalk cleanups
e.g.
Active ATALK connections
Proto Recv-Q Send-Q  Local Address          Foreign Address        (state)
ddp        0      0  [69.230]130            [*.*]*
ddp        0      0  [69.230]128            [*.*]*
ddp        0      0  [69.230]1              [*.*]*

etc..
1996-07-09 02:55:47 +00:00
Peter Wemm
1336da0dea make netstat distinguish broadcast and blackhole routes where they appear.
(RTF_BLACKHOLE was already documented as being shown, but the code ignored
it)

Sumbitted by: Greg Lehey <grog@lemis.de>
1996-06-15 17:08:40 +00:00
Julian Elischer
cae2a25e65 better appletalk support. 1996-06-10 21:03:38 +00:00
Julian Elischer
ce1355d54c I guess the docs should mention the new protocol at least once. 1996-06-08 00:54:18 +00:00
Julian Elischer
63bf4575db patches to allow netstat to monitor appletalk sockets openned using the
/sys/netatalk protocol stack

more cleanups and fixes are likely
1996-06-08 00:20:42 +00:00
Garrett Wollman
759b7d75fb Print PCB hash miss statistic. 1996-06-05 17:24:33 +00:00