History log of /freebsd-head/usr.bin/netstat/netstat.h
Revision Date Author Comments
a93bdf696399217f88b8cebf0d5961053e1c4acd 22-Mar-2018 jtl <jtl@FreeBSD.org> Add the "TCP Blackbox Recorder" which we discussed at the developer
summits at BSDCan and BSDCam in 2017.

The TCP Blackbox Recorder allows you to capture events on a TCP connection
in a ring buffer. It stores metadata with the event. It optionally stores
the TCP header associated with an event (if the event is associated with a
packet) and also optionally stores information on the sockets.

It supports setting a log ID on a TCP connection and using this to correlate
multiple connections that share a common log ID.

You can log connections in different modes. If you are doing a coordinated
test with a particular connection, you may tell the system to put it in
mode 4 (continuous dump). Or, if you just want to monitor for errors, you
can put it in mode 1 (ring buffer) and dump all the ring buffers associated
with the connection ID when we receive an error signal for that connection
ID. You can set a default mode that will be applied to a particular ratio
of incoming connections. You can also manually set a mode using a socket
option.

This commit includes only basic probes. rrs@ has added quite an abundance
of probes in his TCP development work. He plans to commit those soon.

There are user-space programs which we plan to commit as ports. These read
the data from the log device and output pcapng files, and then let you
analyze the data (and metadata) in the pcapng files.

Reviewed by: gnn (previous version)
Obtained from: Netflix, Inc.
Relnotes: yes
Differential Revision: https://reviews.freebsd.org/D11085
872b698bd4a1bfc0bf008c09228e6fd238809c75 20-Nov-2017 pfg <pfg@FreeBSD.org> General further adoption of SPDX licensing ID tags.

Mainly focus on files that use BSD 3-Clause license.

The Software Package Data Exchange (SPDX) group provides a specification
to make it easier for automated tools to detect and summarize well known
opensource licenses. We are gradually adopting the specification, noting
that the tags are considered only advisory and do not, in any way,
superceed or replace the license texts.

Special thanks to Wind River for providing access to "The Duke of
Highlander" tool: an older (2014) run over FreeBSD tree was useful as a
starting point.
a0dcb7af20af24ddca704b4e021f4402309cd149 27-Jul-2017 bz <bz@FreeBSD.org> After inpcb route caching was put back in place there is no need for
flowtable anymore (as flowtable was never considered to be useful in
the forwarding path).

Reviewed by: np
Differential Revision: https://reviews.freebsd.org/D11448
7e6cabd06e6caa6a02eeb86308dc0cb3f27e10da 28-Feb-2017 imp <imp@FreeBSD.org> Renumber copyright clause 4

Renumber cluase 4 to 3, per what everybody else did when BSD granted
them permission to remove clause 3. My insistance on keeping the same
numbering for legal reasons is too pedantic, so give up on that point.

Submitted by: Jan Schaumann <jschauma@stevens.edu>
Pull Request: https://github.com/freebsd/freebsd/pull/96
1b12c4f0adbb7641116ff77a2a7eb4fb00abf1bc 05-Jan-2017 delphij <delphij@FreeBSD.org> Use strlcpy and snprintf in netstat(1).

Expand inet6name() line buffer to NI_MAXHOST and use strlcpy/snprintf
in various places.

Reported by: Anton Yuzhaninov <citrin citrin ru>
MFC after: 3 days
Differential Revision: https://reviews.freebsd.org/D8916
00d578928eca75be320b36d37543a7e2a4f9fbdb 27-May-2016 grehan <grehan@FreeBSD.org> Create branch for bhyve graphics import.
c39b2fd5d1f987bd7aa2e9893a928d17dbafecd4 15-Mar-2016 glebius <glebius@FreeBSD.org> Print running TCP connection counts with TCP statistics.
513e9b690f5bb0abdec4b77b4ab0de8385608740 07-Jan-2016 markj <markj@FreeBSD.org> MFC r287649:
Use a common subroutine to fetch and zero protocol stats instead of
duplicating roughly similar code for each protocol.
65d9a559eb7b19c7541531c4e8891e6d45b00ff2 11-Sep-2015 markj <markj@FreeBSD.org> Use a common subroutine to fetch and zero protocol stats instead of
duplicating roughly similar code for each protocol.

MFC after: 2 weeks
052afc4e16793e18813ac7c44c547b992592656d 11-Sep-2015 markj <markj@FreeBSD.org> Remove prototypes for undefined functions from netstat.h.
07e5aa0065f06f476317da8415d66994ec2d47e2 02-Sep-2015 hrs <hrs@FreeBSD.org> Simplify kvm symbol resolution and error handling. The symbol table
nl_symbols will eventually be organized into several modules depending
on MK_* variables.
df2a89db2bc25e73b139f02c6fbe0095a4168253 01-Sep-2015 hrs <hrs@FreeBSD.org> - Add -W flag support for network column in intpr() (-i flag) and
routepr() (-r flag). It is too narrow to show an IPv6 prefix
in most cases.

- Accept "local" as a synonym of "unix" in protocol family name.

- Show a prefix length in CIDR notation when name resolution failed in
netname().

- Make routename() and netname() AF-independent and remove
unnecessary typecasting from struct sockaddr.

- Use getnameinfo(3) to format L2 addr in intpr().

- Fix a bug which showed "Address" when -A flag is specfied in pr_rthdr().

- Replace cryptic GETSA() macro with SA_SIZE().

- Fix declarations shadowing local variables with the same names.

- Add more static, remove unused header files and variables.

MFC after: 1 week
39fb34452ff3bc4927f319c53cfad417efb4e883 06-Apr-2015 hiren <hiren@FreeBSD.org> MFC r266418, r266448

Add the flowtype to the inpcb.
Add -R to netstat to dump RSS/flow information.

Reviewed by: delphij
Relnotes: yes (for r266448)
Sponsored by: Limelight Networks
0ea1b83e3703e39c50804c558e396324cec66c74 21-Feb-2015 marcel <marcel@FreeBSD.org> Convert netstat to use libxo.

Obtained from: Phil Shafer <phil@juniper.net>
Ported to -current by: alfred@ (mostly), Kim Shrier
Formatting: marcel@
Sponsored by: Juniper Networks, Inc.
a2ba9f176ff963b871323eae90c27c214cbb165c 19-May-2014 adrian <adrian@FreeBSD.org> Add -R to netstat to dump RSS/flow information.

This is intended to help in diagnostics and debugging of NIC and stack
flowid support.

Eventually this will grow another column (RSS CPU ID) but
that currently isn't cached in the inpcb.

There's also no clean flowtype -> flowtype identifier string. This is
the mbuf M_HASHTYPE_* values for RSS.

Here's some example output:

adrian@adrian-hackbox:~/work/freebsd/head/src % netstat -Rn | more
Active Internet connections
Proto Recv-Q Send-Q Local Address Foreign Address flowid ftype
tcp4 0 0 10.11.1.65.22 10.11.1.64.12409 29041942 2
udp4 0 0 127.0.0.1.123 *.* 00000000 0
udp6 0 0 fe80::1%lo0.123 *.* 00000000 0
udp6 0 0 ::1.123 *.* 00000000 0
udp4 0 0 10.11.1.65.123 *.* 00000000 0

Tested:

* amd64 system w/ igb NIC; local driver changes to expose RSS flowid in if_igb.
03fdc2934eb61c44c049a02b02aa974cfdd8a0eb 21-Mar-2014 glebius <glebius@FreeBSD.org> Merge r262763, r262767, r262771, r262806 from head:
- Remove rt_metrics_lite and simply put its members into rtentry.
- Use counter(9) for rt_pksent (former rt_rmx.rmx_pksent). This
removes another cache trashing ++ from packet forwarding path.
- Create zini/fini methods for the rtentry UMA zone. Via initialize
mutex and counter in them.
- Fix reporting of rmx_pksent to routing socket.
- Fix netstat(1) to report "Use" both in kvm(3) and sysctl(3) mode.
78bde6490528c198cd485385ecb997b6031f1bdb 19-Mar-2014 glebius <glebius@FreeBSD.org> Merge r259562,r259566,r259638,r259645,r260124 by melifaro:

Switch netstat -rn to use standard API for retrieving list
of routes instead of peeking inside in-kernel radix via kget.
80e85e32a582ff3a03a87cb98dd996b7929f824b 14-Mar-2014 glebius <glebius@FreeBSD.org> Remove AppleTalk support.

AppleTalk was a network transport protocol for Apple Macintosh devices
in 80s and then 90s. Starting with Mac OS X in 2000 the AppleTalk was
a legacy protocol and primary networking protocol is TCP/IP. The last
Mac OS X release to support AppleTalk happened in 2009. The same year
routing equipment vendors (namely Cisco) end their support.

Thus, AppleTalk won't be supported in FreeBSD 11.0-RELEASE.
d494babace1c51efd0d2c4582515a1e1ae5fa9d2 14-Mar-2014 glebius <glebius@FreeBSD.org> Remove IPX support.

IPX was a network transport protocol in Novell's NetWare network operating
system from late 80s and then 90s. The NetWare itself switched to TCP/IP
as default transport in 1998. Later, in this century the Novell Open
Enterprise Server became successor of Novell NetWare. The last release
that claimed to still support IPX was OES 2 in 2007. Routing equipment
vendors (e.g. Cisco) discontinued support for IPX in 2011.

Thus, IPX won't be supported in FreeBSD 11.0-RELEASE.
8a3e4bbebb00c94db1ecf732ad3a6e3aa982384d 05-Mar-2014 glebius <glebius@FreeBSD.org> - Remove rt_metrics_lite and simply put its members into rtentry.
- Use counter(9) for rt_pksent (former rt_rmx.rmx_pksent). This
removes another cache trashing ++ from packet forwarding path.
- Create zini/fini methods for the rtentry UMA zone. Via initialize
mutex and counter in them.
- Fix reporting of rmx_pksent to routing socket.
- Fix netstat(1) to report "Use" both in kvm(3) and sysctl(3) mode.

The change is mostly targeted for stable/10 merge. For head,
rt_pksent is expected to just disappear.

Discussed with: melifaro
Sponsored by: Netflix
Sponsored by: Nginx, Inc.
ed41469327bef074f42d569aee03907897699292 04-Mar-2014 glebius <glebius@FreeBSD.org> Merge r261582, r261601, r261610, r261613, r261627, r261640, r261641, r261823,
r261825, r261859, r261875, r261883, r261911, r262027, r262028, r262029,
r262030, r262162 from head.

Large flowtable revamp. See commit messages for merged revisions for
details.

Sponsored by: Netflix
eb1a5f8de9f7ea602c373a710f531abbf81141c4 21-Feb-2014 gjb <gjb@FreeBSD.org> Move ^/user/gjb/hacking/release-embedded up one directory, and remove
^/user/gjb/hacking since this is likely to be merged to head/ soon.

Sponsored by: The FreeBSD Foundation
9d7706f9f4506fb689de9cbadb4452174b30d194 07-Feb-2014 glebius <glebius@FreeBSD.org> o Revamp API between flowtable and netinet, netinet6.
- ip_output() and ip_output6() simply call flowtable_lookup(),
passing mbuf and address family. That's the only code under
#ifdef FLOWTABLE in the protocols code now.
o Revamp statistics gathering and export.
- Remove hand made pcpu stats, and utilize counter(9).
- Snapshot of statistics is available via 'netstat -rs'.
- All sysctls are moved into net.flowtable namespace, since
spreading them over net.inet isn't correct.
o Properly separate at compile time INET and INET6 parts.
o General cleanup.
- Remove chain of multiple flowtables. We simply have one for
IPv4 and one for IPv6.
- Flowtables are allocated in flowtable.c, symbols are static.
- With proper argument to SYSINIT() we no longer need flowtable_ready.
- Hash salt doesn't need to be per-VNET.
- Removed rudimentary debugging, which use quite useless in dtrace era.

The runtime behavior of flowtable shouldn't be changed by this commit.

Sponsored by: Netflix
Sponsored by: Nginx, Inc.
c3a529c9ca25ce9bf60844fd55d7668812f638e4 27-Jan-2014 glebius <glebius@FreeBSD.org> Merged /head:r256510,256512,257376,257469,260052:

Make 'netstat -i' use getifaddrs(3) instead of kvm(3).
6b01bbf146ab195243a8e7d43bb11f8835c76af8 27-Dec-2013 gjb <gjb@FreeBSD.org> Copy head@r259933 -> user/gjb/hacking/release-embedded for initial
inclusion of (at least) arm builds with the release.

Sponsored by: The FreeBSD Foundation
8bd5f6c17c9114783f5e62ffeb7b2dac564d3a30 20-Dec-2013 melifaro <melifaro@FreeBSD.org> Use more fine-grained kvm(3) symbol lookup: routing code retrieves only
necessary symbols needed per subsystem. Main kvm(3) init is now delayed
as much as possbile. This finally fixes performance issues reported in
kern/167204.
Some non-working code (ng_socket.ko symbol addresses calculation) removed.
Some global variables eliminated.

PR: kern/167204
MFC after: 4 weeks
2f0743dad34f9fe5f923cf3f0490c19d31fcb3cf 18-Dec-2013 melifaro <melifaro@FreeBSD.org> Restore corefiles handling via kvm(3).

Found by: John-Mark Gurney <jmg at funkthat.com>
MFC after: 4 weeks
4abf8ebc710cee8231b65b3b909809fd612465bb 15-Oct-2013 glebius <glebius@FreeBSD.org> Rewrite netstat/if.c to use getifaddrs(3) and getifmaddrs(3) instead of
libkvm digging in kernel memory. This is possible since r231506 made
getifaddrs(3) to supply if_data for each ifaddr.

The pros of this change is that now netstat(1) doesn't know about kernel
struct ifnet and struct ifaddr. And these structs are about to change
significantly in head soon. New netstat binary will work well with 10.0
and any future kernel.

The cons is that now it isn't possible to obtain interface statistics
from a vmcore.

Functions intpr() and sidewaysintpr() were rewritten from scratch.

The output of netstat(1) has underwent the following changes:

1) The MTU is not printed for protocol addresses, since it has no notion.
Dash is printed instead. If there would be a strong desire to return
previous output, it is doable.
2) Output interface queue drops are not printed. Currently this data isn't
available to userland via any API. We plan to drop 'struct ifqueue' from
'struct ifnet' very soon, so old kvm(3) access to queue drops is soon
to be broken, too. The plan is that drivers would handle their queues
theirselves and a new field in if_data would be updated in case of drops.
3) In-kernel reference count for multicast addresses isn't printed. I doubt
that anyone used it. Anyway, netstat(1) is sysadmin tool, not kernel
debugger.

Sponsored by: Netflix
Sponsored by: Nginx, Inc.
459d12c7d5472343947dc3ef6e2fdd1dbeaa90fe 12-Jul-2013 hrs <hrs@FreeBSD.org> Add -F fibnum option to specify an FIB number for -r flag.
1b1e1de2b2e27f692afabbf18eee1f7a70caa049 09-Jul-2013 ae <ae@FreeBSD.org> Use new macros to implement ipstat and tcpstat using PCPU counters.
Change interface of kread_counters() similar ot kread() in the netstat(1).
21122c283428cb5befbc9946b8191cc085c8d996 10-Apr-2013 glebius <glebius@FreeBSD.org> Use kvm_counter_u64_fetch() to fix obtaining ipstat and tcpstat from
kernel core files.

Sponsored by: Nginx, Inc.
95417d69062ea9181cd7b53a2910a7ec94edc83b 20-Jan-2011 ume <ume@FreeBSD.org> - Hide the internal scope address representation of the KAME IPv6
stack from the output of `netstat -ani'.
- The node-local multicast address in the output of `netstat -rn'
should be handled as well.

Spotted by: Bernd Walter <ticso__at__cicely7.cicely.de>
29af67e52c02dc751039a3117bc88ae6192e891e 11-Dec-2010 joel <joel@FreeBSD.org> Remove the advertising clause from UCB copyrighted files in usr.bin. This
is in accordance with the information provided at
ftp://ftp.cs.berkeley.edu/pub/4bsd/README.Impt.License.Change

Also add $FreeBSD$ to a few files to keep svn happy.

Discussed with: imp, rwatson
79e78b2c61c034f70491270cd04b4c5672a6c0c7 18-Nov-2010 dim <dim@FreeBSD.org> Sync: merge r215396 through r215463 from ^/head.
67b3b6b168c800611c4683cb81384e4a678517c6 17-Nov-2010 gnn <gnn@FreeBSD.org> Add new, per connection, statistics for TCP, including:
Retransmitted Packets
Zero Window Advertisements
Out of Order Receives

These statistics are available via the -T argument to
netstat(1).
MFC after: 2 weeks
09f9c897d33c41618ada06fbbcf1a9b3812dee53 19-Oct-2010 jamie <jamie@FreeBSD.org> A new jail(8) with a configuration file, to replace the work currently done
by /etc/rc.d/jail.
f1216d1f0ade038907195fc114b7e630623b402c 19-Mar-2010 delphij <delphij@FreeBSD.org> Create a custom branch where I will be able to do the merge.
6c94ea5b8def520d68000f11d54e509022f2437d 01-Mar-2010 rwatson <rwatson@FreeBSD.org> Teach netstat -Q to work with -N and -M by adding libkvm versions of data
query routines. This code is necessarily more fragile in the presence of
kernel changes than querying the kernel via sysctl (the default), but
useful when investigating crashes or live kernel state via firewire.

MFC after: 1 week
Sponsored by: Juniper Networks
d193f17354c51e84fa496618fb458bd1c0a98e76 22-Feb-2010 rwatson <rwatson@FreeBSD.org> Teach netstat(1) to print out netisr statistics when given the -Q argument.
Currently supports only reporting on live systems via sysctl, kmem support
needs to be edded.

MFC after: 1 week
Sponsored by: Juniper Networks
56c6dfba43330adcd014d353900bc76289b651d9 10-Feb-2010 delphij <delphij@FreeBSD.org> MFC r202060:

Add a new option, -q howmany, which when used in conjuction with -w,
exits netstat after _howmany_ outputs.

Requested by: thomasa
Reviewed by: freebsd-net (bms, old version in early 2007)
889d37774b3df1dc9414bebc108c1960664dfb1c 28-Jan-2010 gnn <gnn@FreeBSD.org> MFC r196797:

Add ARP statistics to the kernel and netstat.
689b6abf98d8f9ae31541c526ff14fc4fda4b89a 11-Jan-2010 delphij <delphij@FreeBSD.org> Add a new option, -q howmany, which when used in conjuction with -w,
exits netstat after _howmany_ outputs.

Requested by: thomasa
Reviewed by: freebsd-net (bms, old version in early 2007)
MFC after: 1 month
3595d5cfed7d9eaa4ef3c6d382c4564a6df138f2 01-Dec-2009 bz <bz@FreeBSD.org> Unbreak user space after if_timer/if_watchdog removal in r199975.

Tested by: glebius
39779f43a947160c4a83b0847f41cdeea2a9ed68 05-Oct-2009 rwatson <rwatson@FreeBSD.org> netstat(1) support for UNIX SOCK_SEQPACKET sockets -- changes were required
only for the kvm case, as we supported SOCK_SEQPACKET via sysctl already.

Sponsored by: Google
MFC after: 3 months
60eb51e7a3e3a1dfacd9d9284b7e21e1fe4de011 03-Sep-2009 gnn <gnn@FreeBSD.org> Add ARP statistics to the kernel and netstat.

New counters now exist for:
requests sent
replies sent
requests received
replies received
packets received
total packets dropped due to no ARP entry
entrys timed out
Duplicate IPs seen

The new statistics are seen in the netstat command
when it is given the -s command line switch.

MFC after: 2 weeks
In collaboration with: bz
76f193cd692e42617fb7f33b9581e7e5a3da58f0 19-Mar-2009 bms <bms@FreeBSD.org> Introduce a number of changes to the MROUTING code.
This is purely a forwarding plane cleanup; no control plane
code is involved.

Summary:
* Split IPv4 and IPv6 MROUTING support. The static compile-time
kernel option remains the same, however, the modules may now
be built for IPv4 and IPv6 separately as ip_mroute_mod and
ip6_mroute_mod.
* Clean up the IPv4 multicast forwarding code to use BSD queue
and hash table constructs. Don't build our own timer abstractions
when ratecheck() and timevalclear() etc will do.
* Expose the multicast forwarding cache (MFC) and virtual interface
table (VIF) as sysctls, to reduce netstat's dependence on libkvm
for this information for running kernels.
* bandwidth meters however still require libkvm.
* Make the MFC hash table size a boot/load-time tunable ULONG,
net.inet.ip.mfchashsize (defaults to 256).
* Remove unused members from struct vif and struct mfc.
* Kill RSVP support, as no current RSVP implementation uses it.
These stubs could be moved to raw_ip.c.
* Don't share locks or initialization between IPv4 and IPv6.
* Don't use a static struct route_in6 in ip6_mroute.c.
The v6 code is still using a cached struct route_in6, this is
moved to mif6 for the time being.
* More cleanup remains to be merged from ip_mroute.c to ip6_mroute.c.

v4 path tested using ports/net/mcast-tools.
v6 changes are mostly mechanical locking and *have not* been tested.
As these changes partially break some kernel ABIs, they will not
be MFCed. There is a lot more work to be done here.

Reviewed by: Pavlin Radoslavov
2b08fb6e8b2328729bcba43b64645d790ed605ef 15-Feb-2009 bms <bms@FreeBSD.org> Now that ifmcstat(8) does not suck, retire host-mode netstat -g.
This change will not be back-ported.
19b6af98ec71398e77874582eb84ec5310c7156f 22-Nov-2008 dfr <dfr@FreeBSD.org> Clone Kip's Xen on stable/6 tree so that I can work on improving FreeBSD/amd64
performance in Xen's HVM mode.
cf5320822f93810742e3d4a1ac8202db8482e633 19-Oct-2008 lulf <lulf@FreeBSD.org> - Import the HEAD csup code which is the basis for the cvsmode work.
9c3d2ffcdff40754b2207eb84c1ff0843e225c71 21-Sep-2008 sam <sam@FreeBSD.org> add new build knobs and jigger some existing controls to improve
control over the result of buildworld and installworld; this especially
helps packaging systems such as nanobsd

Reviewed by: various (posted to arch)
MFC after: 1 month
5dc67fc4b3450e41c41b69ce34725367c0c87228 01-Sep-2008 obrien <obrien@FreeBSD.org> Minimize changes CURRENT<->releng7.
368bdf05e9188bfc74fa11ed733351ed1c1e5c2c 15-May-2008 gnn <gnn@FreeBSD.org> Update the kernel to count the number of mbufs and clusters
(all types) used per socket buffer.

Add support to netstat to print out all of the socket buffer
statistics.

Update the netstat manual page to describe the new -x flag
which gives the extended output.

Reviewed by: rwatson, julian
4e4c1baf05facc6b498b90fd6adbd3a8e2c1444a 16-Mar-2008 obrien <obrien@FreeBSD.org> MFC: style(9)
6dc790e802e79ebbee70817ecf7f02bb2c5330e7 14-Feb-2008 marius <marius@FreeBSD.org> MFC: netstat.h 1.53; route.c 1.86, 1.87

Fix netname() (though for RELENG_6 more or less cosmetic only) and
routename() on big-endian LP64 archs.
90b85453b57ed3895521a79b07200daa06ea9827 10-Feb-2008 marius <marius@FreeBSD.org> MFC: netstat.h 1.53; route.c 1.86

Fix netname() and routename() on big-endian LP64 archs.
1811facdc68ad94c8c4a23211234958cb208f15f 07-Feb-2008 marius <marius@FreeBSD.org> Fix netname() [1] and routename() on big-endian LP64 archs.

Submitted by: Yuri Pankov [1]
MFC after: 3 days
74070565806ee33326b76dcdd5e1e0a86cd4e6ed 02-Jan-2008 obrien <obrien@FreeBSD.org> style(9)
+ kread is not a boolean, so check it as such
+ fix $FreeBSD$ Ids
+ denote copyrights with /*-
+ misc whitespace changes.
818361dec31495e88061ffe2312c04e835d973d5 04-Oct-2007 obrien <obrien@FreeBSD.org> MFC: Use uintmax_t to pass around 64-bit quantities, including to printf().
Using uintmax_t is also robust to further extensions in both the C language
and the bitwidth of kernel counters.
44ff2749c081059ba6487d842a736b022cce05bb 23-Jul-2007 jhb <jhb@FreeBSD.org> MFC: Restore netstat -M functionality for most statistics on core dumps.
One change in this patch relative to the changes in HEAD is that the
mroute statistics will still fallback to using libkvm on live kernels
if the sysctl fails.
27187e7f6bd04a94e9ada0ca994e7c828abb4514 16-Jul-2007 jhb <jhb@FreeBSD.org> Restore netstat -M functionality for most statistics on core dumps. In
general, when support was added to netstat for fetching data using sysctl,
no provision was left for fetching equivalent data from a core dump, and
in fact, netstat would _always_ fetch data from the live kernel using
sysctl even when -M was specified resulting in the user believing they
were getting data from coredumps when they actually weren't. Some specific
changes:
- Add a global 'live' variable that is true if netstat is running against
the live kernel and false if -M has been specified.
- Stop abusing the sysctl flag in the protocol tables to hold the protocol
number. Instead, the protocol is now its own field in the tables, and
it is passed as a separate parameter to the PCB and stat routines rather
than overloading the KVM offset parameter.
- Don't run PCB or stats functions who don't have a namelist offset if we
are being run against a crash dump (!live).
- For the inet and unix PCB routines, we generate the same buffer from KVM
that the sysctl usually generates complete with the header and trailer.
- Don't run bpf stats for !live (before it would just silently always run
live).
- kread() no longer trashes memory when opening the buffer if there is an
error on open and the passed in buffer is smaller than _POSIX2_LINE_MAX.
- The multicast routing code doesn't fallback to kvm on live kernels if
the sysctl fails. Keeping this made the code rather hairy, and netstat
is already tied to the kernel ABI anyway (even when using sysctl's since
things like xinpcb contain an inpcb) so any kernels this is run against
that have the multicast routing stuff should have the sysctls.
- Don't try to dig around in the kernel linker in the netgraph PCB routine
for core dumps.

Other notes:
- sctp's PCB routine only works on live kernels, it looked rather
complicated to generate all the same stuff via KVM. Someone can always
add it later if desired though.
- Fix the ipsec removal bug where N_xxx for IPSEC stats weren't renumbered.
- Use sysctlbyname() everywhere rather than hardcoded mib values.

MFC after: 1 week
Approved by: re (rwatson)
f5875f045c1546f7504a2a0c4bc6744948772a54 01-Jul-2007 gnn <gnn@FreeBSD.org> Commit IPv6 support for FAST_IPSEC to the tree.
This commit includes all remaining changes for the time being including
user space updates.

Submitted by: bz
Approved by: re
af285a5d356346bc793bdb7693bb0ab8399d24b9 09-Jun-2007 rrs <rrs@FreeBSD.org> Adds support for SCTP.
e1db503689ae54aa3513f73b6e1aa4212ded2641 28-Jul-2006 yar <yar@FreeBSD.org> Achieve WARNS=2 by using uintmax_t to pass around 64-bit quantities,
including to printf(). Using uintmax_t is also robust to further
extensions in both the C language and the bitwidth of kernel counters.

Tested on: i386 amd64 ia64
e0bfda5a3c624fc117d13eb8067b671bc7d5917d 05-Jan-2006 kbyanc <kbyanc@FreeBSD.org> MFC:
kbyanc 2005-12-28 20:36:55 UTC

FreeBSD src repository

Modified files:
usr.bin/netstat Makefile ipsec.c main.c netstat.h
Added files:
usr.bin/netstat pfkey.c
Log:
Add support for printing IPSEC protocol stats if the kernel was
compiled with FAST_IPSEC rather than the KAME IPSEC stack.

Note that the output of "netstat -s -p ipsec" differs depending on
which stack is compiled into the kernel since they each keep different
stats. This delta also adds the "esp", "ah", and "ipcomp" protocol
stats, which are also available when the kernel is compiled with the
FAST_IPSEC stack (e.g. "netstat -s -p esp").

Submitted by: Matt Titus <titus at nttmcl dot com>

Revision Changes Path
1.31 +2 -1 src/usr.bin/netstat/Makefile
1.13 +266 -94 src/usr.bin/netstat/ipsec.c
1.81 +29 -0 src/usr.bin/netstat/main.c
1.47 +6 -0 src/usr.bin/netstat/netstat.h
1.1 +184 -0 src/usr.bin/netstat/pfkey.c (new)
980b33f2248dbad05539c02647a069261d17092d 28-Dec-2005 kbyanc <kbyanc@FreeBSD.org> Add support for printing IPSEC protocol stats if the kernel was compiled
with FAST_IPSEC rather than the KAME IPSEC stack.

Note that the output of "netstat -s -p ipsec" differs depending on which
stack is compiled into the kernel since they each keep different stats.
This delta also adds the "esp", "ah", and "ipcomp" protocol stats, which
are also available when the kernel is compiled with the FAST_IPSEC stack
(e.g. "netstat -s -p esp").

Submitted by: Matt Titus <titus at nttmcl dot com>
MFC after: 3 days
22f2501d2269dac3134234d311502940b50259b3 27-Dec-2005 csjp <csjp@FreeBSD.org> MFC bpf stats functionality into netstat
5bea52cfc53a8ac452ab83a8f71453aabd34ea99 20-Nov-2005 rwatson <rwatson@FreeBSD.org> Merge main.c:1.80, mbuf.c:1.45, netstat.h:1.46 from HEAD to RELENG_6:

Modify netstat -mb to use libmemstat when accessing a core dump or live
kernel memory and not using sysctl. Previously, libmemstat was used
only for the live kernel via sysctl paths.

This results in netstat output becoming both more consistent between
core dumps and the live kernel, and also more information in the core
dump case than previously (i.e., mbuf cache information).

Statistics relating to sfbufs still rely on a kvm descriptor as they
are not currently exposed via libmemstat. netstat -m operating on a
core is still unable to print certain sfbuf stats available on the live
kernel.
8361c9bf55cb150764894682ffd27a118a54d89a 13-Nov-2005 rwatson <rwatson@FreeBSD.org> Modify netstat -mb to use libmemstat when accessing a core dump or live
kernel memory and not using sysctl. Previously, libmemstat was used
only for the live kernel via sysctl paths.

This results in netstat output becoming both more consistent between
core dumps and the live kernel, and also more information in the core
dump case than previously (i.e., mbuf cache information).

Statistics relating to sfbufs still rely on a kvm descriptor as they
are not currently exposed via libmemstat. netstat -m operating on a
core is still unable to print certain sfbuf stats available on the live
kernel.

MFC after: 1 week
a42af632d87879621ea936244e0eb8a934e9054c 27-Sep-2005 mlaier <mlaier@FreeBSD.org> Remove bridge(4) from the tree. if_bridge(4) is a full functional
replacement and has additional features which make it superior.

Discussed on: -arch
Reviewed by: thompsa
X-MFC-after: never (RELENG_6 as transition period)
ba6ab73cea264da3e4f119e5b2bd7fc4c05f6410 07-Sep-2005 csjp <csjp@FreeBSD.org> Merge bpfstat's functionality into the netstat(1) utility. This adds
a -B option which causes bpf peers to be printed. This option can be
used in conjunction with -I if information about specific interfaces
is desired. This is similar to what NetBSD added to their version of
netstat.

$ netstat -B
Pid Netif Flags Recv Drop Match Sblen Hblen Command
1137 lo0 p--s-- 0 0 0 0 0 tcpdump
205 sis0 -ifs-l 37331 0 1 0 0 dhclient
$

$ netstat -I lo0 -B
Pid Netif Flags Recv Drop Match Sblen Hblen Command
1174 lo0 p--s-- 0 0 0 0 0 tcpdump
$

-Add bpf.c which stores all the code for retrieving and parsing bpf
related statistics.
-Modify main.c to add support for the -B option and hook it into the
program logic.
-Add bpf.c to the build.
-Document this new functionality in the man page and bump the revision
date.
-Add prototype for bpf_stats function.
d4bfa24b972d70f5fe0c7571484b9b57568cf229 19-Aug-2005 glebius <glebius@FreeBSD.org> MFC:
Add a new switch -h for interface stats mode, which prints all interface
statistics in human readable form.

In collaboration with: vsevolod
Reviewed by: cperciva

Approved by: re (kensmith)
cf4f3e357511611027fdf884b61a81c71608775f 18-Aug-2005 glebius <glebius@FreeBSD.org> Add a new switch -h for interface stats mode, which prints all interface
statistics in human readable form.

In collaboration with: vsevolod
Reviewed by: cperciva
6b5cea57ef66a5fc8ebeca58f433178c83f8d72d 23-Jul-2005 mlaier <mlaier@FreeBSD.org> MFC: -sp pfsync

Print newly exported pfsync statistics with netstat(8).

Requested by: glebius

Approved by: re (kensmith)
c224d596cf8de5c957244e362536d42d21579fa4 14-Jul-2005 mlaier <mlaier@FreeBSD.org> Print newly exported pfsync statistics with netstat(8).

Requested by: glebius
MFC after: 1 week
e1d22638d0a8257ed01b7f95d1b6d5cef74ebd07 22-Feb-2005 glebius <glebius@FreeBSD.org> Add CARP (Common Address Redundancy Protocol), which allows multiple
hosts to share an IP address, providing high availability and load
balancing.

Original work on CARP done by Michael Shalayeff, with many
additions by Marco Pfatschbacher and Ryan McBride.

FreeBSD port done solely by Max Laier.

Patch by: mlaier
Obtained from: OpenBSD (mickey, mcbride)
f7574a2276b935509aba6b131a39c685a68e61d2 31-May-2004 bmilekic <bmilekic@FreeBSD.org> Bring in mbuma to replace mballoc.

mbuma is an Mbuf & Cluster allocator built on top of a number of
extensions to the UMA framework, all included herein.

Extensions to UMA worth noting:
- Better layering between slab <-> zone caches; introduce
Keg structure which splits off slab cache away from the
zone structure and allows multiple zones to be stacked
on top of a single Keg (single type of slab cache);
perhaps we should look into defining a subset API on
top of the Keg for special use by malloc(9),
for example.
- UMA_ZONE_REFCNT zones can now be added, and reference
counters automagically allocated for them within the end
of the associated slab structures. uma_find_refcnt()
does a kextract to fetch the slab struct reference from
the underlying page, and lookup the corresponding refcnt.

mbuma things worth noting:
- integrates mbuf & cluster allocations with extended UMA
and provides caches for commonly-allocated items; defines
several zones (two primary, one secondary) and two kegs.
- change up certain code paths that always used to do:
m_get() + m_clget() to instead just use m_getcl() and
try to take advantage of the newly defined secondary
Packet zone.
- netstat(1) and systat(1) quickly hacked up to do basic
stat reporting but additional stats work needs to be
done once some other details within UMA have been taken
care of and it becomes clearer to how stats will work
within the modified framework.

From the user perspective, one implication is that the
NMBCLUSTERS compile-time option is no longer used. The
maximum number of clusters is still capped off according
to maxusers, but it can be made unlimited by setting
the kern.ipc.nmbclusters boot-time tunable to zero.
Work should be done to write an appropriate sysctl
handler allowing dynamic tuning of kern.ipc.nmbclusters
at runtime.

Additional things worth noting/known issues (READ):
- One report of 'ips' (ServeRAID) driver acting really
slow in conjunction with mbuma. Need more data.
Latest report is that ips is equally sucking with
and without mbuma.
- Giant leak in NFS code sometimes occurs, can't
reproduce but currently analyzing; brueffer is
able to reproduce but THIS IS NOT an mbuma-specific
problem and currently occurs even WITHOUT mbuma.
- Issues in network locking: there is at least one
code path in the rip code where one or more locks
are acquired and we end up in m_prepend() with
M_WAITOK, which causes WITNESS to whine from within
UMA. Current temporary solution: force all UMA
allocations to be M_NOWAIT from within UMA for now
to avoid deadlocks unless WITNESS is defined and we
can determine with certainty that we're not holding
any locks when we're M_WAITOK.
- I've seen at least one weird socketbuffer empty-but-
mbuf-still-attached panic. I don't believe this
to be related to mbuma but please keep your eyes
open, turn on debugging, and capture crash dumps.

This change removes more code than it adds.

A paper is available detailing the change and considering
various performance issues, it was presented at BSDCan2004:
http://www.unixdaemons.com/~bmilekic/netbuf_bmilekic.pdf
Please read the paper for Future Work and implementation
details, as well as credits.

Testing and Debugging:
rwatson,
brueffer,
Ketrien I. Saihr-Kesenchedra,
...
Reviewed by: Lots of people (for different parts)
af30ef411877ee85c0a9a04733de71036b589e8c 25-Mar-2004 bms <bms@FreeBSD.org> Teach netstat(1) how to print the multicast group memberships present
within the running system.

Sponsored by: Ralf the Wonder Llama
870b768c6b023c434beeecf13588347080677ae9 29-Dec-2003 bde <bde@FreeBSD.org> Fixed missing declaration of pluralies(). This showed up as strange
printf format warnings for inet6.c (pluralies() was implicit int, but
the context requires a "char *").

Added WARNS?=2 to the Makefile so that such errors don't come back.
Added NO_WERROR?= to the Makefile because I haven't checked that setting
WARNS doesn't uncover more bugs except on i386's.
e288c5ef902411655bc9a78a5a199b9023603d7e 29-Dec-2003 bde <bde@FreeBSD.org> Fixed style bugs created in rev.1.27 by removing "__P(" and its closing ")"
without removing the space before it.
abd1027a01880a215e2c2f5c955c21a22e7424bd 23-Dec-2003 alfred <alfred@FreeBSD.org> Restore old netstat -m output.
A new flag '-c' can be used to ask for the cache stats.
27325403c64a9b3337b47535dc2680886c4064fe 07-Aug-2003 hsu <hsu@FreeBSD.org> 1. Add support for printing PIM-related statistics with
netstat -s -p pim

2. Print information about the bandwidth meters installed in the kernel with
netstat -g

Submitted by: Pavlin Radoslavov <pavlin@icir.org>
26ba0eb55ca13bca8cb911b471a949574a3b513b 20-Feb-2003 bmilekic <bmilekic@FreeBSD.org> o Allow "buckets" in mb_alloc to be differently sized (according to
compile-time constants). That is, a "bucket" now is not necessarily
a page-worth of mbufs or clusters, but it is MBUF_BUCK_SZ, CLUS_BUCK_SZ
worth of mbufs, clusters.
o Rename {mbuf,clust}_limit to {mbuf,clust}_hiwm and introduce
{mbuf,clust}_lowm, which currently has no effect but will be used
to set the low watermarks.
o Fix netstat so that it can deal with the differently-sized buckets
and teach it about the low watermarks too.
o Make sure the per-cpu stats for an absent CPU has mb_active set to 0,
explicitly.
o Get rid of the allocate refcounts from mbuf map mess. Instead,
just malloc() the refcounts in one shot from mbuf_init()
o Clean up / update comments in subr_mbuf.c
cb4604919fc3c4fef1de7daff27468d6c5fbd56d 05-Sep-2002 dwmalone <dwmalone@FreeBSD.org> Warns cleanups for netstat:
1) Include arpa/inet.h for ntohs.
2) Constness fixes.
3) Fix shadowing except for "sin" which shouldn't be in scope.
4) Remove register keyword.
5) Add missing initialsers to user defined structs.
5) Make prototype of netname6 globally visable.
6) Use right macros for printing syncache stats (even though entrie isn't
a word).
63326af6cd5d7d77a690b61ec9797fbd94a36ad0 07-Sep-2001 ru <ru@FreeBSD.org> Deprecate the -l option in favour of more natural -W.
The compatibility glue is still provided.

(This change is not yet reflected in the manpage, nor
in usage(). This will be fixed at a later time today,
with the general manpage cleanup commit.)
ada9cef5f64d23c4c424d2825f90a044ef38d1d5 29-Jun-2001 ru <ru@FreeBSD.org> Make `rttrash' variable (#routes not in table but not freed) visible
through ``netstat -rs''.
f8e11dde2671e192fa12edbf3487f63e8e0ade6e 23-Jun-2001 ru <ru@FreeBSD.org> Add netstat(1) knob to reset net.inet.{ip|icmp|tcp|udp|igmp}.stats.
For example, ``netstat -s -p ip -z'' will show and reset IP stats.

PR: bin/17338
5d710b296b16892625e76899c986dd7697754050 22-Jun-2001 bmilekic <bmilekic@FreeBSD.org> Introduce numerous SMP friendly changes to the mbuf allocator. Namely,
introduce a modified allocation mechanism for mbufs and mbuf clusters; one
which can scale under SMP and which offers the possibility of resource
reclamation to be implemented in the future. Notable advantages:

o Reduce contention for SMP by offering per-CPU pools and locks.
o Better use of data cache due to per-CPU pools.
o Much less code cache pollution due to excessively large allocation macros.
o Framework for `grouping' objects from same page together so as to be able
to possibly free wired-down pages back to the system if they are no longer
needed by the network stacks.

Additional things changed with this addition:

- Moved some mbuf specific declarations and initializations from
sys/conf/param.c into mbuf-specific code where they belong.
- m_getclr() has been renamed to m_get_clrd() because the old name is really
confusing. m_getclr() HAS been preserved though and is defined to the new
name. No tree sweep has been done "to change the interface," as the old
name will continue to be supported and is not depracated. The change was
merely done because m_getclr() sounds too much like "m_get a cluster."
- TEMPORARILY disabled mbtypes statistics displaying in netstat(1) and
systat(1) (see TODO below).
- Fixed systat(1) to display number of "free mbufs" based on new per-CPU
stat structures.
- Fixed netstat(1) to display new per-CPU stats based on sysctl-exported
per-CPU stat structures. All infos are fetched via sysctl.

TODO (in order of priority):

- Re-enable mbtypes statistics in both netstat(1) and systat(1) after
introducing an SMP friendly way to collect the mbtypes stats under the
already introduced per-CPU locks (i.e. hopefully don't use atomic() - it
seems too costly for a mere stat update, especially when other locks are
already present).
- Optionally have systat(1) display not only "total free mbufs" but also
"total free mbufs per CPU pool."
- Fix minor length-fetching issues in netstat(1) related to recently
re-enabled option to read mbuf stats from a core file.
- Move reference counters at least for mbuf clusters into an unused portion
of the cluster itself, to save space and need to allocate a counter.
- Look into introducing resource freeing possibly from a kproc.

Reviewed by (in parts): jlemon, jake, silby, terry
Tested by: jlemon (Intel & Alpha), mjacob (Intel & Alpha)
Preliminary performance measurements: jlemon (and me, obviously)
URL: http://people.freebsd.org/~bmilekic/mb_alloc/
f5fc9b53400a054604623dad4c679865150873d4 15-Jun-2001 assar <assar@FreeBSD.org> remove warnings
remove superfluous declarations
make things more consistent
ee746c97f9f42b279e24583560b4f0eaef1e081b 15-Jun-2001 assar <assar@FreeBSD.org> remove K&R support
6c0b683445bcb0c4262928ed96c5600046fd89c4 15-Jun-2001 assar <assar@FreeBSD.org> revert removal of warning and K&R support

Requested by: bde
67653866aa83c06cbc92828ae2988bbeea1e776d 15-Jun-2001 ru <ru@FreeBSD.org> First round of netstat(1) cleanup.

Removed the ambiguity in -s, -f, -p and -i flags handling.
Basically, there are four displays (except others):

1. PCB display.
2. Protocol statistics display. (-s)
3. Interface statistics display. (-i)
4. Per-interface protocol statistics display. (-i -s)

All of the above except 3) can be limited to a particular
protocol family (-f) or a single protocol (-p).

Some examples:

1. netstat -f inet -- show PCBs of all INET protocols
2. netstat -p udp -- show PCB of UDP protocol only (NEW!)
3. netstat -s -- show protocol statistics for all families
4. netstat -s -f inet -- show INET protocols statistics
5. netstat -s -p icmp -- show ICMP protocol statistics

This is a work in progress. Manpage has been fixed slightly,
but is still incomplete.
9e34fe7efd02802c8741141cf670713ba1ade2e5 15-Jun-2001 assar <assar@FreeBSD.org> remove most of the warnings
ea6e16bc20e4706c99c89ec7b7f3ab3be1791a4c 15-Jun-2001 assar <assar@FreeBSD.org> add the option -S for printing port numbers symbolically but addresses
numerically. clean up the CFLAGS in Makefile.
bf0e940d3c46e6420e5bc6760b2340164800d440 14-Jun-2001 ru <ru@FreeBSD.org> Restore -M -N support for -m.

PR: 20808
832f8d224926758a9ae0b23a6b45353e44fbc87a 11-Jun-2001 ume <ume@FreeBSD.org> Sync with recent KAME.
This work was based on kame-20010528-freebsd43-snap.tgz and some
critical problem after the snap was out were fixed.
There are many many changes since last KAME merge.

TODO:
- The definitions of SADB_* in sys/net/pfkeyv2.h are still different
from RFC2407/IANA assignment because of binary compatibility
issue. It should be fixed under 5-CURRENT.
- ip6po_m member of struct ip6_pktopts is no longer used. But, it
is still there because of binary compatibility issue. It should
be removed under 5-CURRENT.

Reviewed by: itojun
Obtained from: KAME
MFC after: 3 weeks
cd8d72036779073e9a559040e5b29558621cdc99 15-Mar-2001 des <des@FreeBSD.org> Add a -W flag that tells netstat not to truncate addresses even if they are
too long for the column they're printed in.

Move variable definitions out of netstat.h and into main.c.

Clean up some warnings.
dd004da290c46c50b50ee5c919ad6eab35694921 14-Mar-2001 brian <brian@FreeBSD.org> MAXHOSTNAMELEN includes space for a NUL.
Don't roll our own version of trimdomain(), use the one in libutil.

Not objected to by: freebsd-audit
e512fbcdce2f18d76d6051b0381f8a70cd9ec039 05-Jul-2000 itojun <itojun@FreeBSD.org> add pfkeystat. sync with kame
77ac5d68c962311b7a303ced7d56bbcf8e95f7d2 04-Jul-2000 itojun <itojun@FreeBSD.org> sync with latest kame netstat. basically, more statistics
b42951578188c5aab5c9f8cbcde4a743f8092cdc 02-Apr-2000 cvs2svn <cvs2svn@FreeBSD.org> This commit was manufactured by cvs2svn to create branch 'ALSA'.
417b54f8df0382bc71e299bb3cf35e74b2579e6c 28-Jan-2000 shin <shin@FreeBSD.org> 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.
1ce5be54c5d6613129ed0ee873ba9c43205db862 21-Dec-1999 shin <shin@FreeBSD.org> also, changed prototype of pr_rthdr(), as my previous fix
for netstat/route.c
39eef9ac50edc8fec68a286507de869f0ca3af45 13-Dec-1999 guido <guido@FreeBSD.org> 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>
70f0bdf6818a73c858bc47a23afc1e9d7c56d716 07-Dec-1999 shin <shin@FreeBSD.org> 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
c5c63975d538cf48ceb99ba48c341293676d15c0 21-Oct-1999 julian <julian@FreeBSD.org> 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
564d182065fdf8f65991755b00f96cb3a2bcf24b 26-Apr-1999 luigi <luigi@FreeBSD.org> Add support for printing bridging statistics with ``-p bdg '' .
If someone has a better flag to use I'll be glad to change it.
f2b133839414cc17ec766c3e27f03fcee58a694d 18-Jan-1999 fenner <fenner@FreeBSD.org> 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)
e37570d81294700974f15cb7d91068b206166646 15-May-1998 wollman <wollman@FreeBSD.org> mbuf, inet, and unix modules no longer read kvm.
0506343883d62f6649f7bbaf1a436133cef6261d 11-Jan-1998 cvs2svn <cvs2svn@FreeBSD.org> This commit was manufactured by cvs2svn to create branch 'jb'.
7c6e96080c4fb49bf912942804477d202a53396c 10-Jan-1998 cvs2svn <cvs2svn@FreeBSD.org> This commit was manufactured by cvs2svn to create branch 'JB'.
e97a8f1bb5fbb72a7aba41985727d01d65f488c2 29-Jul-1997 charnier <charnier@FreeBSD.org> Remove prog, unused variables.
Cosmetic in usage string.
7805978130bff3d12577cd0f7ab22e16fcf455ed 23-Jul-1996 julian <julian@FreeBSD.org> Submitted by: archie@whistle.com

appletalk cleanups
0ba97cb21fbbde5b6af767531299e42fe088ad43 10-Jun-1996 julian <julian@FreeBSD.org> better appletalk support.
989c61cbbb3c500504ffb558fb497e4b70ff59b1 08-Jun-1996 julian <julian@FreeBSD.org> patches to allow netstat to monitor appletalk sockets openned using the
/sys/netatalk protocol stack

more cleanups and fixes are likely
297db4d6f76e22d93e587a48e8ba9cc319d61a24 15-Jan-1996 peter <peter@FreeBSD.org> tidy up the domain name trimming code, and move it to a single place
rather than having the same bit of code duplicated in three places,
each with their own static copy of the host's local name.
86f1bc4514fdcfd255f37f3218fe234bdc3664fc 05-Nov-1995 cvs2svn <cvs2svn@FreeBSD.org> This commit was manufactured by cvs2svn to create branch 'LINUX'.
90ae06d6ac1d2da3758389a70a20c91f3e9fd1dc 26-Oct-1995 julian <julian@FreeBSD.org> Reviewed by: julian and jhay@mikom.csir.co.za
Submitted by: Mike Mitchell, supervisor@alb.asctmd.com

This is a bulk mport of Mike's IPX/SPX protocol stacks and all the
related gunf that goes with it..
it is not guaranteed to work 100% correctly at this time
but as we had several people trying to work on it
I figured it would be better to get it checked in so
they could all get teh same thing to work on..

Mikes been using it for a year or so
but on 2.0

more changes and stuff will be merged in from other developers now that this is in.

Mike Mitchell, Network Engineer
AMTECH Systems Corporation, Technology and Manufacturing
8600 Jefferson Street, Albuquerque, New Mexico 87113 (505) 856-8000
supervisor@alb.asctmd.com
2e14d9ebc3d3592c67bdf625af9ebe0dfc386653 14-Mar-1995 cvs2svn <cvs2svn@FreeBSD.org> This commit was manufactured by cvs2svn to create branch 'MATT_THOMAS'.
ec62e724b8eecbb45b5b63e1fa140326e65d35c3 12-Oct-1994 dg <dg@FreeBSD.org> Added '-b' option to display the number of in and out bytes on a given
interface (used with -i and -I flag).
34cd81d75f398ee455e61969b118639dacbfd7a6 23-Sep-1994 cvs2svn <cvs2svn@FreeBSD.org> This commit was manufactured by cvs2svn to create branch 'MACKERRAS'.
e16baf7a5fe7ac1453381d0017ed1dcdeefbc995 07-Aug-1994 cvs2svn <cvs2svn@FreeBSD.org> This commit was manufactured by cvs2svn to create branch 'SUNRPC'.
f9ab90d9d6d02989a075d0f0074496d5b1045e4b 27-May-1994 rgrimes <rgrimes@FreeBSD.org> BSD 4.4 Lite Usr.bin Sources