freebsd-skq/usr.bin/netstat
Gleb Smirnoff 0f9d0a73a4 Merge from projects/sendfile:
o Introduce a notion of "not ready" mbufs in socket buffers.  These
mbufs are now being populated by some I/O in background and are
referenced outside.  This forces following implications:
- An mbuf which is "not ready" can't be taken out of the buffer.
- An mbuf that is behind a "not ready" in the queue neither.
- If sockbet buffer is flushed, then "not ready" mbufs shouln't be
  freed.

o In struct sockbuf the sb_cc field is split into sb_ccc and sb_acc.
  The sb_ccc stands for ""claimed character count", or "committed
  character count".  And the sb_acc is "available character count".
  Consumers of socket buffer API shouldn't already access them directly,
  but use sbused() and sbavail() respectively.
o Not ready mbufs are marked with M_NOTREADY, and ready but blocked ones
  with M_BLOCKED.
o New field sb_fnrdy points to the first not ready mbuf, to avoid linear
  search.
o New function sbready() is provided to activate certain amount of mbufs
  in a socket buffer.

A special note on SCTP:
  SCTP has its own sockbufs.  Unfortunately, FreeBSD stack doesn't yet
allow protocol specific sockbufs.  Thus, SCTP does some hacks to make
itself compatible with FreeBSD: it manages sockbufs on its own, but keeps
sb_cc updated to inform the stack of amount of data in them.  The new
notion of "not ready" data isn't supported by SCTP.  Instead, only a
mechanical substitute is done: s/sb_cc/sb_ccc/.
  A proper solution would be to take away struct sockbuf from struct
socket and allow protocols to implement their own socket buffers, like
SCTP already does.  This was discussed with rrs@.

Sponsored by:	Netflix
Sponsored by:	Nginx, Inc.
2014-11-30 12:52:33 +00:00
..
bpf.c
flowtable.c Whenever flowtable lookup fails, we do route lookup and then try to 2014-02-14 10:56:26 +00:00
if.c Now, after r263102 we have ifi_oqdrops in if_data, restore printing of 2014-03-19 03:33:32 +00:00
inet6.c Add the ability to set `prefer_source' flag to an IPv6 address. 2014-09-09 10:52:50 +00:00
inet.c Merge from projects/sendfile: 2014-11-30 12:52:33 +00:00
ipsec.c Remove the large part of struct ipsecstat. Only few fields of this 2013-07-23 14:14:24 +00:00
main.c Further updates to the netstat(1) man page and usage message 2014-06-04 04:18:33 +00:00
Makefile Convert to usr.bin/ to LIBADD 2014-11-25 14:29:10 +00:00
mbuf.c Remove obtained, but never used data. 2013-10-15 09:21:05 +00:00
mroute6.c Use more fine-grained kvm(3) symbol lookup: routing code retrieves only 2013-12-20 00:17:26 +00:00
mroute.c Fix "netstat -gW" behavior broken in r259638. 2014-04-29 16:51:28 +00:00
netgraph.c Merge from projects/sendfile: 2014-11-30 12:52:33 +00:00
netisr.c
netstat.1 Minor mdoc nit. 2014-06-06 08:42:03 +00:00
netstat.h Add -R to netstat to dump RSS/flow information. 2014-05-19 17:11:43 +00:00
pfkey.c Migrate structs ahstat, espstat, ipcompstat, ipipstat, pfkeystat, 2013-07-09 10:08:13 +00:00
route.c - Fix a bug which can make sysctl() fail when -F is specified. 2014-05-21 10:04:51 +00:00
sctp.c
unix.c Merge from projects/sendfile: 2014-11-30 12:52:33 +00:00