Commit Graph

145 Commits

Author SHA1 Message Date
David Malone
a5c4836d39 Replace the mbuf external reference counting code with something
that should be better.

The old code counted references to mbuf clusters by using the offset
of the cluster from the start of memory allocated for mbufs and
clusters as an index into an array of chars, which did the reference
counting. If the external storage was not a cluster then reference
counting had to be done by the code using that external storage.

NetBSD's system of linked lists of mbufs was cosidered, but Alfred
felt it would have locking issues when the kernel was made more
SMP friendly.

The system implimented uses a pool of unions to track external
storage. The union contains an int for counting the references and
a pointer for forming a free list. The reference counts are
incremented and decremented atomically and so should be SMP friendly.
This system can track reference counts for any sort of external
storage.

Access to the reference counting stuff is now through macros defined
in mbuf.h, so it should be easier to make changes to the system in
the future.

The possibility of storing the reference count in one of the
referencing mbufs was considered, but was rejected 'cos it would
often leave extra mbufs allocated. Storing the reference count in
the cluster was also considered, but because the external storage
may not be a cluster this isn't an option.

The size of the pool of reference counters is available in the
stats provided by "netstat -m".

PR:		19866
Submitted by:	Bosko Milekic <bmilekic@dsuper.net>
Reviewed by:	alfred (glanced at by others on -net)
2000-08-19 08:32:59 +00:00
Hajimu UMEMOTO
d84a1df489 To make compilable without -DINET6.
PR:		bin/20407
Submitted by:	Patrick Bihan-Faou <patrick@mindstep.com>
2000-08-07 16:39:33 +00:00
Ruslan Ermilov
61793a0c8b Do not display icmp(4) sockets as non-existent bridge(4) sockets. 2000-08-03 14:53:41 +00:00
John Polstra
3cfac2c58d Fix bug: "netstat -si" prints interface information, but the header
line is missing.  This apparently was broken in revision 1.31 of
"if.c".

Submitted by:	Maxime Henrion <mhenrion@cybercable.fr>
2000-07-28 04:05:04 +00:00
Alfred Perlstein
af0e6bcdf0 Make mbstat.m_mtypes seperate and viewable via sysctl, also
expand the size from short to ulong

Submitted by: Ian Dowse <iedowse@maths.tcd.ie>
PR: kern/19809
2000-07-15 06:02:48 +00:00
Jun-ichiro itojun Hagino
a1eca46648 remove m_pulldown related statistics, it is not for production system
(it belongs to kame experiment).
2000-07-12 16:13:02 +00:00
Jun-ichiro itojun Hagino
3b8a8567a1 add pfkeystat. sync with kame 2000-07-05 02:02:54 +00:00
Jun-ichiro itojun Hagino
32cd1d9601 sync with latest kame netstat. basically, more statistics 2000-07-04 16:26:46 +00:00
Mark Murray
097c3a616c Use Garrett's new (clearer) names. 2000-04-23 14:18:18 +00:00
Guido van Rooij
9ef6ceee15 Add '-L' option to usage(). 2000-03-20 18:33:11 +00:00
Yoshinobu Inoue
b1d49ce7b6 Don't suppress Flags and Refs info for IPv4 entries.
(They need to be suppressed by default for IPv6 entries to keep the column
size of each entries in 80.)
2000-03-14 17:18:43 +00:00
Yoshinobu Inoue
5f2cd67530 Add a flag to the usage display.
There was a missing description for a new flags to netstat.
  I already added the fix to netstat man, but usage() change is
  also necessary.

Specified by: Ben Smithurst <ben@scientia.demon.co.uk>
Approved by: jkh
2000-03-11 20:14:08 +00:00
Yoshinobu Inoue
1c6d96a173 Add "-l" option description.
Noticed the necessity by Ben Smithurst <ben@scientia.demon.co.uk> message
on freebsd-current.
2000-03-11 14:33:13 +00:00
Sheldon Hearn
87faa07bec Remove single-space hard sentence breaks. These degrade the quality
of the typeset output, tend to make diffs harder to read and provide
bad examples for new-comers to mdoc.
2000-03-01 12:20:22 +00:00
Yoshinobu Inoue
0fea3d5165 IPv6 multicast routing.
kernel IPv6 multicast routing support.
  pim6 dense mode daemon
  pim6 sparse mode daemon
  netstat support of IPv6 multicast routing statistics

  Merging to the current and testing with other existing multicast routers
  is done by Tatsuya Jinmei <jinmei@kame.net>, who writes and maintainances
  the base code in KAME distribution.

  Make world check and kernel build check was also successful.
2000-01-28 05:10:56 +00:00
Rodney W. Grimes
f22f5e6ba8 Instead of reporting all 0.0.0.0 as ``default'' only report
a true default of 0.0.0.0/0 as default.

Reviewed by:	wollman
2000-01-07 19:56:57 +00:00
Yoshinobu Inoue
fc60ab7b0f -permit protocol specific statistics at iflag,
only when either of sflag and "-f inet6" is specified.
-fix the indentation of default output

Specified by: Stephen McKay <syssgm@detir.qld.gov.au>

Reviewed and Confirmed by: Stephen McKay <syssgm@detir.qld.gov.au>
2000-01-07 05:17:09 +00:00
Yoshinobu Inoue
9a4365d0e0 libipsec and IPsec related apps. (and some KAME related man pages)
Reviewed by: freebsd-arch, cvs-committers
Obtained from: KAME project
2000-01-06 12:40:54 +00:00
Jordan K. Hubbard
e54ca68cb8 Print mac addresses in standard byte:byte format rather than
byte.byte.  This makes it consistent with our other utilities
like arp(8) and ifconfig(8).

Submitted by:	Paul Vixie <paul@vix.com>
2000-01-03 17:48:36 +00:00
Mike Smith
8266cbec26 Add display of maximum allowed mbuf count to match mbuf cluster count.
Submitted by:	Bosko Milekic <bmilekic@dsuper.net>
1999-12-28 06:38:37 +00:00
Yoshinobu Inoue
7d56d3747c Getaddrinfo(), getnameinfo(), and etc support in libc/net.
Several udp and raw apps IPv6 support.

Reviewed by: freebsd-arch, cvs-committers
Obtained from: KAME project
1999-12-28 02:37:14 +00:00
Yoshinobu Inoue
f7503444cf also, changed prototype of pr_rthdr(), as my previous fix
for netstat/route.c
1999-12-21 11:28:27 +00:00
Yoshinobu Inoue
49302f437a Added missing declaration for argment specification at pr_rthdr(),
caused by my previous patch, sorry.
Also, changed its var name from 'af' to 'wid_af', to avoid confusion with
global var 'af'.
1999-12-21 11:25:30 +00:00
Yoshinobu Inoue
c64893b10c define WID_DST6 and WID_GW6 and use them only for IPv6, to keep IPv4 related
information in 80 columns.

TODO: IPv6 related information is not likely to be kept in 80 columns, anyway.
      Some more print modes could be added,
      but what is the priority between those modes?
	-print out all information even if they don't fit into 80 columns
	-strip off some information to fit them into 80 columns

Reviewed by: markm
1999-12-21 09:31:14 +00:00
Yoshinobu Inoue
57a40e9ee7 Enable INET6 by default.
This should be OK on non INET6 enabled kernel.
1999-12-15 05:13:22 +00:00
Guido van Rooij
ac55add06c Add new option, -L that will listen the various listen queue lengths.
Reviewed by:	Garrett Wollman <wollman@khavrinen.lcs.mit.edu>,
		Clive Lin <clive@GnatS.CirX.ORG>
1999-12-13 20:08:44 +00:00
Yoshinobu Inoue
cfa1ca9dfa udp IPv6 support, IPv6/IPv4 tunneling support in kernel,
packet divert at kernel for IPv6/IPv4 translater daemon

This includes queue related patch submitted by jburkhol@home.com.

Submitted by: queue related patch from jburkhol@home.com
Reviewed by: freebsd-arch, cvs-committers
Obtained from: KAME project
1999-12-07 17:39:16 +00:00
Doug Rabson
890bc2a54a Fix the output of 'netstat -I de0 1' for the alpha. Fix a bunch of
warnings while I'm here.
1999-11-09 22:22:36 +00:00
Alexey Zelkin
df48b0d01c uncomment FILES section (it look reasonable here)
mdoc(7)'fy
1999-10-30 14:35:22 +00:00
Matthew Dillon
ebdb21f429 Put include <netgraph.h> back in - problem was due to a cvsup mess on
freefall.  There may also be a real problem w/ buildworld but the fix
    would go somewhere else, not here.
1999-10-24 02:58:39 +00:00
Matthew Dillon
f41f949d09 Cleanup missing includes, stale includes, and a few printf format
inconsistancies.
1999-10-23 17:45:11 +00:00
Julian Elischer
4cf49a4355 Whistle's Netgraph link-layer (sometimes more) networking infrastructure.
Been in production for 3 years now. Gives Instant Frame relay to if_sr
and if_ar drivers, and PPPOE support soon. See:
ftp://ftp.whistle.com/pub/archie/netgraph/index.html
for on-line manual pages.

Reviewed by: Doug Rabson (dfr@freebsd.org)
Obtained from:  Whistle CVS tree
1999-10-21 09:06:11 +00:00
Julian Elischer
a97a99221a Cleanup towards -Wall 1999-10-21 07:08:56 +00:00
Boris Popov
0abed1ff14 Allow suppress printing of lines with zero counts
for an IPX address family.

PR:		14168
1999-10-18 05:45:05 +00:00
Sheldon Hearn
5ff829fdbf Add xrefs to the {f,net,sock}stat.1 manpages. While I'm in there, fix
the sockstat.1 document title, which still remembers when sockstat was
called lsock.

Reviewed by:	mpp
1999-09-06 13:14:24 +00:00
Peter Wemm
f7406d04ca Zap $Source$ 1999-09-06 07:34:27 +00:00
Peter Wemm
a1a4f1a0d8 $Header$ -> $FreeBSD$ 1999-08-28 05:11:36 +00:00
Peter Wemm
c3aac50f28 $Id$ -> $FreeBSD$ 1999-08-28 01:08:13 +00:00
Nik Clayton
6d6189a455 Document the use of the -a flag in conjunction with the -r flag.
PR:             docs/13037
Submitted by:   Christopher Masto <chris@netmonger.net>
1999-08-11 22:25:55 +00:00
Nik Clayton
3be5f1f5ce Add $Id$, to make it simpler for members of the translation teams to
track.

The $Id$ line is normally at the bottom of the main comment block in the
man page, separated from the rest of the manpage by an empty comment,
like so;

     .\"    $Id$
     .\"

If the immediately preceding comment is a @(#) format ID marker than the
the $Id$ will line up underneath it with no intervening blank lines.
Otherwise, an additional blank line is inserted.

Approved by:            bde
1999-07-12 20:24:20 +00:00
Dag-Erling Smørgrav
8898c75d55 Don't truncate port numbers.
Submitted by:	ru
1999-07-06 19:10:15 +00:00
Luigi Rizzo
0024d1db07 Add support for printing bridging statistics with ``-p bdg '' .
If someone has a better flag to use I'll be glad to change it.
1999-04-26 16:11:50 +00:00
Bill Fumerola
9baac9f2e9 IPX address formatting nit.
PR:		bin/11179
Submitted by:	Dan Nelson <dnelson@emsphone.com>
1999-04-20 22:04:31 +00:00
Dag-Erling Smørgrav
e4ec3989d9 Fix fstat compatibility by printing the address of the tcppcb instead of
that of the regular socket pcb for TCP sockets.

PR:		bin/9963
Submitted by:	Ruslan Ermilov <ru@ucb.crimea.ua>
1999-03-10 17:25:42 +00:00
Bill Fenner
b13864ec1a Fix off-by-one error. 1999-02-16 19:05:09 +00:00
John Hay
e30e913cf7 Make the ipx part of netstat work again. 1999-02-06 19:12:48 +00:00
Ollivier Robert
bca92d96b8 Fix "make world" breakage because MT_RTABLE was still referenced here. 1999-01-18 12:40:44 +00:00
Bill Fenner
67a451cc89 Don't use ip_mrtproto to determine whether multicast routing is in
the kernel; this was left over from the earlier protocol-dependent
 kernel multicast routing code.

Learn how to handle the malloc'd multicast routing table (instead of
 expecting it to be in mbufs)
1999-01-18 02:09:15 +00:00
Gary Palmer
ed9ff6ddf7 Quick hack to allow netstat to compile once more: ifdef out MT_SOOPTS 1998-08-23 15:23:11 +00:00
John Birrell
acfd6b3968 Change casts from int to u_long and formats from %x to %lx.
Didn't fix the alignment of the output fields on alpha where addresses
require 16 characters to print.

Added a dummy field to the pt_u union to help the alpha compiler align
the u_sa field in a suiable way.
1998-08-18 13:41:38 +00:00