Home | History | Annotate | Download | only in netstat
History log of /src/usr.bin/netstat/inet.c
RevisionDateAuthorComments
 1.119  28-Oct-2022  ozaki-r Adjust userland commands for struct inpcb separation

Only kvm users are affected.
 1.118  28-Oct-2022  ozaki-r Adjust userland commands for struct inpcb integration

Only kvm users are affected.
 1.117  21-Sep-2022  msaitoh s/u_quad_t/uint64_t/. No functional change.
 1.116  02-Sep-2022  msaitoh KNF. No functional change.
 1.115  01-Sep-2022  msaitoh KNF. No functional change.
 1.114  30-Oct-2021  nia netstat(1): convert malloc(x * y) and realloc(x * y) to reallocarr
 1.113  28-Aug-2020  ozaki-r netstat: strengthen against kernel changes

netstat uses sysctlbyname to get counter data from the kernel.
sysctlbyname fails with ENOMEM if actual counter data in the kernel is
larger than a passed buffer. netstat just skips showing counters of a
category if sysctlbyname fails, so if we added new counters of the
category to the kernel, nestat shows nothing for the category.

Fortunately sysctlbyname fills data as much as possible even if a passed
buffer is short. So we can allow netstat to show the filled data anyway
if sysctlbyname fails with ENOMEM.

Note that this backcompat mechanism works only if new counters are
appended, and doesn't work if new counters are inserted into the middle
or counters are moved.
 1.112  28-Aug-2020  ozaki-r netstat: support new packet counters
 1.111  06-Aug-2020  knakahara add missing {IP,IP6}_STAT_NOIPSEC to netstat.
 1.110  18-Aug-2019  kamil netstat: Add indirection of symbols to remove clash with sanitizers

Add indirection and symbol renaming under MKSANITIZER for the linked in
version of sysctlbyname, sysctlgetmibinfo and sysctlnametomib.
 1.109  13-May-2019  ozaki-r branches: 1.109.2;
Show the number of packets dropped by pfil
 1.108  03-May-2018  maxv branches: 1.108.2;
Remove now unused tcpip.h includes. Some were already unused before.
 1.107  23-Dec-2016  mrg branches: 1.107.6; 1.107.12;
in getpcblist_sysctl() if sysctlnametomib() fails, return NULL and
set *len = 0, rather than bailing. now "netstat" doesn't give up
early on kernels without INET6.
 1.106  08-Feb-2015  christos branches: 1.106.2;
Allocate the right size for pcb blocks.
XXX: pullup-7!
 1.105  07-Feb-2015  christos print the timer flags.
 1.104  23-Nov-2013  christos branches: 1.104.4;
Update for new pcb tailq's.
While here fix ipv6 pcb printing by making tcp6_dump with tcp.
XXX: Merge the inet and the inet6 code. It is silly to need to specify
-p tcp6 to print a tcp6 pcb, we already know what it is.
 1.103  20-Jun-2013  martin Not all pointers are 64bit - use uintptr_t instead of uint64_t.
 1.102  19-Jun-2013  christos Don't use -P as a kmem printer, verify that the address points to a pcb first!
 1.101  24-Dec-2011  christos branches: 1.101.2; 1.101.6; 1.101.8; 1.101.14;
use the names from the include files.
 1.100  04-Oct-2011  shattered branches: 1.100.2;
PR/43968 -- add 'segqlen' of TCPCB to 'netstat -P'.

OK by wiz@
 1.99  11-May-2011  dyoung Suppress whitespace at EOL to fix lib/librumphijack/t_tcpip.
 1.98  11-May-2011  drochner use getmicrouptime(9) rather than microtime(9) for TIME_WAIT duration
calculation, because this doesn't get confused by system time changes,
and uses less CPU cycles
reviewed by dyoung
 1.97  03-May-2011  dyoung Do not display expired or reclaimed vestigial TIME_WAIT entries.
 1.96  03-May-2011  dyoung Reduces the resources demanded by TCP sessions in TIME_WAIT-state using
methods called Vestigial Time-Wait (VTW) and Maximum Segment Lifetime
Truncation (MSLT).

MSLT and VTW were contributed by Coyote Point Systems, Inc.

Even after a TCP session enters the TIME_WAIT state, its corresponding
socket and protocol control blocks (PCBs) stick around until the TCP
Maximum Segment Lifetime (MSL) expires. On a host whose workload
necessarily creates and closes down many TCP sockets, the sockets & PCBs
for TCP sessions in TIME_WAIT state amount to many megabytes of dead
weight in RAM.

Maximum Segment Lifetimes Truncation (MSLT) assigns each TCP session to
a class based on the nearness of the peer. Corresponding to each class
is an MSL, and a session uses the MSL of its class. The classes are
loopback (local host equals remote host), local (local host and remote
host are on the same link/subnet), and remote (local host and remote
host communicate via one or more gateways). Classes corresponding to
nearer peers have lower MSLs by default: 2 seconds for loopback, 10
seconds for local, 60 seconds for remote. Loopback and local sessions
expire more quickly when MSLT is used.

Vestigial Time-Wait (VTW) replaces a TIME_WAIT session's PCB/socket
dead weight with a compact representation of the session, called a
"vestigial PCB". VTW data structures are designed to be very fast and
memory-efficient: for fast insertion and lookup of vestigial PCBs,
the PCBs are stored in a hash table that is designed to minimize the
number of cacheline visits per lookup/insertion. The memory both
for vestigial PCBs and for elements of the PCB hashtable come from
fixed-size pools, and linked data structures exploit this to conserve
memory by representing references with a narrow index/offset from the
start of a pool instead of a pointer. When space for new vestigial PCBs
runs out, VTW makes room by discarding old vestigial PCBs, oldest first.
VTW cooperates with MSLT.

It may help to think of VTW as a "FIN cache" by analogy to the SYN
cache.

A 2.8-GHz Pentium 4 running a test workload that creates TIME_WAIT
sessions as fast as it can is approximately 17% idle when VTW is active
versus 0% idle when VTW is inactive. It has 103 megabytes more free RAM
when VTW is active (approximately 64k vestigial PCBs are created) than
when it is inactive.
 1.95  02-Mar-2011  dyoung Use __arraycount() and PRIu64. Delete unnecessary casts to unsigned
long long.
 1.94  01-Mar-2011  dyoung Pull pfsync_stats() out of inet.c and into pfsync.c so that inet.c does
not have to #include PF header files that pollute the global namespace
by #defining v4 and v6 (sheesh).
 1.93  13-Dec-2010  pooka branches: 1.93.2;
Add netstat rump client. For now, it always sets -X, i.e. will
use only sysctl and no kvm (implementing /dev/mem for a rump kernel
would probably not be hard, but still a non-zero effort).

Note: since there is absolutely no network activity in a fresh rump
kernel, rump.netstat usually displays exactly nothing when invoked
without parameters. Arguments like -r, -bi, -p icmp etc. produce
more stuff.
 1.92  07-Dec-2009  christos PR/42243: Yasuoka Masahiko: Add support for "net.inet.icmp.bmcastecho" support.
Print the current status.
 1.91  14-Sep-2009  degroote 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@
 1.90  12-Apr-2009  lukem Fix many WARNS=4 issues (-Wshadow -Wcast-qual -Wsign-compare).
Fix probable bug with numeric printing of anon ports when using sysctl.
 1.89  22-Feb-2009  dholland 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.
 1.88  24-Apr-2008  thorpej branches: 1.88.6; 1.88.8;
Note which things are not available by KVM, and print a nice message
stating so if someone specifically asks for it.
 1.87  15-Apr-2008  thorpej branches: 1.87.2;
Make IGMP stats per-cpu.
 1.86  15-Apr-2008  thorpej Make ARP stats per-cpu.
 1.85  15-Apr-2008  thorpej Make CARP status per-cpu.
 1.84  15-Apr-2008  thorpej Use ANSI function decls throughout.
 1.83  08-Apr-2008  thorpej 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.
 1.82  07-Apr-2008  thorpej 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.
 1.81  06-Apr-2008  jnemeth fix build problem introduced in 1.79
 1.80  06-Apr-2008  thorpej 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.
 1.79  06-Apr-2008  thorpej 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.
 1.78  10-Jul-2007  ad Make netstat build again. I don't see why it has any business dumping
the raw contents of tcpcb but that's another story.
 1.77  22-Sep-2006  elad branches: 1.77.2;
PR/31347: Geoff C. Wing: netstat err message is ambiguous about cause
Applied patch, thanks!
 1.76  05-Sep-2006  rpaulo Import of TCP ECN algorithm for congestion control.
Both available for IPv4 and IPv6.
Basic implementation test results are available at
http://netbsd-soc.sourceforge.net/projects/ecn/testresults.html.

Work sponsored by the Google Summer of Code project 2006.
Special thanks to Kentaro Kurahone, Allen Briggs and Matt Thomas for their
help, comments and support during the project.
 1.75  17-Aug-2006  rpaulo Revert previous.
 1.74  17-Aug-2006  rpaulo Adapt to ECN.
 1.73  20-Jun-2006  rpaulo It's not an error if we can't print CARP stats, it just means it's not built
in.
 1.72  28-May-2006  elad Make netstat use sysctl when dumping routing tables/stats.
Heavily based on similar code from Claudio Jeker (at OpenBSD).

While here, fix inet/inet6 sysctl stuff commited previously to
actually work, and some other nits to make netstat more sysctl
friendly.

One step closer to losing setgid kmem on this one...
 1.71  21-May-2006  liamjfoy check if malloc(3) failed

ok joerg@
 1.70  18-May-2006  riz branches: 1.70.2;
Use PRIu64 to format uint64_t quantities, instead of %llu, in
newly-introduced code.

XXX more %llu cleanup is needed throughout netstat code.
 1.69  18-May-2006  liamjfoy Integrate Common Address Redundancy Procotol (CARP) from OpenBSD

'pseudo-device carp'

Thanks to: joerg@ christos@ riz@ and others who tested
Ok: core@
 1.68  12-Aug-2005  elad Use PRIxPTR when printing a pointer.
 1.67  08-Aug-2005  he Replace usage of caddr_t with intptr_t, to allow this to build cleanly
on both 32- and 64-bit archs.
 1.66  07-Aug-2005  elad Use sysctl to read live kernel PF_INET PCBs.
 1.65  06-Aug-2005  elad Use sysctl to fetch IP, ICMP, TCP, and UDP statistics.
 1.64  04-Aug-2005  rpaulo Added #include <kvm.h> since netstat.h, which is included too, needs it.
 1.63  06-Sep-2004  martin Make it compile on ports where u_quad_t is not printf-format-compatible
with unsigned long long.
 1.62  04-Sep-2004  manu IPv4 PIM support, from the submission of Pavlin Radoslavov on tech-net@
 1.61  18-May-2004  itojun print stat for TCP MD5 signature
 1.60  17-Oct-2003  enami Print ips_rcvmemdrop and ips_nogif.
 1.59  04-Sep-2003  itojun synchronize w/ inpcb/in6pcb change
 1.58  07-Aug-2003  agc Move UCB-licensed code from 4-clause to 3-clause licence.

Patches provided by Joel Baker in PR 22365, verified by myself.
 1.57  20-Jul-2003  he As a temporary workaround, apply the fix from PR#20390, thereby
cooperating with the callout code in working around the race
condition caused by the TCP code's use of the callout facility.

Instead of unconditionally releasing memory in tcp_close() and
SYN_CACHE_PUT(), check whether any of the related callout handlers
are about to be invoked (but have not yet done callout_ack()), and
if so, just mark the associated data structure (tcpcb or syn cache
entry) as "dead", and test for this (and release storage) in the
callout handler functions.
 1.56  12-Jul-2003  itojun strlcpy
 1.55  22-Mar-2003  jdolecek it's not necessary to limit the service name artificially to 8 characters
in inet*print() - only first 'width' characters of the 'host.service'
string would be printed anyway, so allow full service name if string would fit
 1.54  04-Feb-2003  thorpej Update for callout changes, and show TCP timers in relative, rather
than absolute ticks.
 1.53  03-Feb-2003  thorpej Test CALLOUT_PENDING, not CALLOUT_ACTIVE.
 1.52  26-May-2002  itojun path MTU discovery blackhole detection.
PR 12790 (sorry for not committing it for a long time)
 1.51  27-Feb-2002  lukem branches: 1.51.2;
if not -n and the local socket doesn't have INP_ANONPORT set, always try
to determine the symbolic name of the foreign port.

previously the foreign port would be displayed numerically in this case if
the local & foreign ports were different. this particular behaviour was
added in rev 1.28 when I added INP_ANONPORT support from FreeBSD, and for
the life of me I can't fathom the rationale for it ;-|
 1.50  15-Sep-2001  thorpej Fix a printf format/argument cast.
 1.49  10-Sep-2001  thorpej tcp_dump(): Also print the address of the in6pcb.
 1.48  10-Sep-2001  thorpej Update for TCP timer changes.
 1.47  10-Sep-2001  thorpej Update for field name changes in struct tcpcb.
 1.46  28-May-2001  assar add `-s' that prints port numbers symbolically but addresses numerically
 1.45  06-Apr-2001  itojun pedant changes for strcpy/sprintf.
 1.44  20-Mar-2001  itojun add few icmp type names.
http://www.isi.edu/in-notes/iana/assignments/icmp-parameters
 1.43  02-Mar-2001  itojun increase ipstat.ips_badaddr if the packet fails to pass address checks.
 1.42  18-Oct-2000  itojun count successful path MTU changes. good for debugging.
(there could be some discussion on when to increase the counter...)
 1.41  15-Aug-2000  jhawk Add kernel counters for arp events, displayable with netstat -s -f arp
 1.40  03-Jul-2000  enami Backout part of rev 1.29 which doesn't match with the log message.
 1.39  26-Feb-2000  itojun revise IPsec, pfkey, IPv6 multicast and IPv6 statistics. (sync with kame)
 1.38  19-Nov-1999  bouyer Change printf formats for 64bit counters.
 1.37  01-Jul-1999  itojun branches: 1.37.4;
make netstat IPv6-ready.
 1.36  29-Apr-1999  thorpej Print SYN,ACK retransmission statistics.
 1.35  18-Feb-1999  lukem branches: 1.35.2;
rework so that `-A -n' won't truncate the `ipaddr.port' fields, by displaying
an abbreviated state column in that case (to fit in 80 columns)
 1.34  25-Aug-1998  ross Add { and } to shut up egcs. Reformat the more questionable code.
 1.33  20-Jul-1998  sommerfe Fix bogon in length argument to snprintf when formatting port number
 1.32  12-Jul-1998  mrg - KNF
- use err(3)
- sprintf/strcpy -> snprintf/strncpy
- change route.c:domask() to take a size_t of the buffer passed.
 1.31  06-Jul-1998  mrg - use an array MAXHOSTNAMELEN+1 size to hold hostnames
- ensure hostname from gethostname() is nul-terminated in all cases
- minor KNF
- use MAXHOSTNAMELEN over various other values/defines
- be safe will buffers that hold hostnames
 1.30  03-Jun-1998  thorpej Add an option to dump the contents of a PCB at the specified address, and
implement this for TCP.
 1.29  29-Apr-1998  matt Add support for printing fast forwarded packets.
 1.28  07-Jan-1998  lukem if INP_ANONPORT is set in the pcb, don't getservbyport the local port,
as the service name is irrelevent. from freebsd
 1.27  17-Dec-1997  thorpej Print the connections dropped due to excessive persist timeouts.
 1.26  13-Dec-1997  thorpej Nuke "delayed window updates" statistic.
 1.25  11-Dec-1997  thorpej Print window updates delayed (piggybacked on delayed ACKs).
 1.24  10-Dec-1997  thorpej Report connections drained due to memory shortage.
 1.23  19-Oct-1997  lukem fix up .Nm usage, getopt returns -1 not EOF
 1.22  23-Jul-1997  thorpej Pull SYN_cache_branch down onto the main line.
 1.21  22-May-1997  christos branches: 1.21.2;
PR/3660: Dave Huang: Fix formatting misalignments in appletalk
PR/3659: Dave Huang: Fix PCB reporting in appletalk
 1.20  03-Apr-1997  christos - netatalk additions
- printf format fixes
- minor prototype cleanups
 1.19  09-Dec-1996  neil errors not generated 'cuz old message was icmp -> [EWW!]
errors not generated because old message was icmp
 1.18  25-Oct-1996  thorpej Add the `toolong' count to the IP stats display.
 1.17  08-Oct-1996  explorer use %lu, not %u. This covers more than my original %d -> %u change...
 1.16  07-Oct-1996  explorer Netstat -s should use %u for u_long parameters... Closes bin/2817 by me
 1.15  31-Jan-1996  mycroft branches: 1.15.4;
Update to match kernel.
 1.14  03-Oct-1995  thorpej branches: 1.14.2;
New-style RCS ids.
 1.13  19-Jun-1995  cgd update for new network structures
 1.12  12-Jun-1995  mycroft Update to match kernel changes.
 1.11  14-May-1995  cgd print out number of malformed fragments dropped
 1.10  24-Dec-1994  cgd a couple of these need <sys/queue.h>
 1.9  13-May-1994  mycroft Clean up import.
 1.8  01-Apr-1994  cgd kill lots of off_t's.
 1.7  28-Mar-1994  cgd clean up, for off_t... ugliest 'cleaning' possible, i think...
 1.6  11-Jan-1994  brezak Incorporate changes for IP mcast and IGMP from cmaeda@cs.washington.edu.
 1.5  01-Aug-1993  mycroft Add RCS identifiers.
 1.4  20-May-1993  cgd get rid of select.h inclusion, and clean up headers *more*.
 1.3  20-May-1993  cgd fix for new select & clean up headers
 1.2  26-Apr-1993  glass print out more of the gathered udp stats (actually all of them)
 1.1  21-Mar-1993  cgd branches: 1.1.1;
after 0.2.2 "stable" patches applied
 1.1.1.2  02-Jan-1997  mellon imported from 44lite2
 1.1.1.1  06-Oct-1994  mycroft Import original 4.4-Lite version.
 1.14.2.1  02-Feb-1996  mycroft Bring in changes for mondo patch 2.
 1.15.4.1  14-Nov-1996  thorpej Pull up from trunk:

> revision 1.18
> date: 1996/10/25 07:41:35; author: thorpej; state: Exp; lines: +3 -2
> Add the `toolong' count to the IP stats display.
 1.21.2.2  12-Jul-1997  thorpej Print statistics gather by the compressed TCP state engine.
 1.21.2.1  22-May-1997  thorpej file inet.c was added on branch SYN_cache_branch on 1997-07-12 18:06:27 +0000
 1.35.2.1  29-Apr-1999  perry pullup 1.35->1.36 (thorpej)
 1.37.4.1  27-Dec-1999  wrstuden Pull up to last week's -current.
 1.51.2.2  22-Oct-2003  jmc Pullup rev 1.57 (requested by he in ticket #1530)


Introduce a new INVOKING status for callouts, and use it to close
a race condition in the TCP code. Fixes PR#20390.
 1.51.2.1  05-Sep-2003  tron Pull up revision 1.52 (requested by tls in ticket #1445):
path MTU discovery blackhole detection.
PR 12790 (sorry for not committing it for a long time)
 1.70.2.1  19-Jun-2006  chap Sync with head.
 1.77.2.1  31-Mar-2009  bouyer Pull up following revision(s) (requested by dholland in ticket #1292):
usr.bin/netstat/inet.c: revision 1.89
usr.bin/netstat/inet6.c: revision 1.51
usr.bin/netstat/iso.c: revision 1.31
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.
 1.87.2.1  18-May-2008  yamt sync with head.
 1.88.8.1  13-May-2009  jym Sync with HEAD.

Third (and last) commit. See http://mail-index.netbsd.org/source-changes/2009/05/13/msg221222.html
 1.88.6.2  30-Jul-2013  msaitoh Pull up following revision(s) (requested by christos in ticket #1868):
usr.bin/netstat/main.c: revision 1.86
usr.bin/netstat/netstat.h: revision 1.47
usr.bin/netstat/inet.c: revision 1.102
usr.bin/netstat/inet.c: revision 1.103
usr.bin/netstat/inet6.c: revision 1.61
usr.bin/netstat/inet6.c: revision 1.62
Don't use -P as a kmem printer, verify that the address points to a pcb first!
Not all pointers are 64bit - use uintptr_t instead of uint64_t.
 1.88.6.1  26-Mar-2009  snj branches: 1.88.6.1.6; 1.88.6.1.10;
Pull up following revision(s) (requested by dholland in ticket #608):
usr.bin/netstat/inet.c: revision 1.89
usr.bin/netstat/inet6.c: revision 1.51
usr.bin/netstat/iso.c: revision 1.31
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.
 1.88.6.1.10.1  30-Jul-2013  msaitoh Pull up following revision(s) (requested by christos in ticket #1868):
usr.bin/netstat/main.c: revision 1.86
usr.bin/netstat/netstat.h: revision 1.47
usr.bin/netstat/inet.c: revision 1.102
usr.bin/netstat/inet.c: revision 1.103
usr.bin/netstat/inet6.c: revision 1.61
usr.bin/netstat/inet6.c: revision 1.62
Don't use -P as a kmem printer, verify that the address points to a pcb first!
Not all pointers are 64bit - use uintptr_t instead of uint64_t.
 1.88.6.1.6.1  30-Jul-2013  msaitoh Pull up following revision(s) (requested by christos in ticket #1868):
usr.bin/netstat/main.c: revision 1.86
usr.bin/netstat/netstat.h: revision 1.47
usr.bin/netstat/inet.c: revision 1.102
usr.bin/netstat/inet.c: revision 1.103
usr.bin/netstat/inet6.c: revision 1.61
usr.bin/netstat/inet6.c: revision 1.62
Don't use -P as a kmem printer, verify that the address points to a pcb first!
Not all pointers are 64bit - use uintptr_t instead of uint64_t.
 1.93.2.1  05-Mar-2011  bouyer Sync with HEAD
 1.100.2.2  22-May-2014  yamt sync with head.

for a reference, the tree before this commit was tagged
as yamt-pagecache-tag8.

this commit was splitted into small chunks to avoid
a limitation of cvs. ("Protocol error: too many arguments")
 1.100.2.1  17-Apr-2012  yamt sync with head
 1.101.14.1  29-Jul-2013  msaitoh Pull up following revision(s) (requested by christos in ticket #912):
usr.bin/netstat/main.c: revision 1.86
usr.bin/netstat/netstat.h: revision 1.47
usr.bin/netstat/inet.c: revision 1.102
usr.bin/netstat/inet.c: revision 1.103
usr.bin/netstat/inet6.c: revision 1.61
usr.bin/netstat/inet6.c: revision 1.62
Don't use -P as a kmem printer, verify that the address points to a pcb first!
Not all pointers are 64bit - use uintptr_t instead of uint64_t.
 1.101.8.1  29-Jul-2013  msaitoh Pull up following revision(s) (requested by christos in ticket #912):
usr.bin/netstat/main.c: revision 1.86
usr.bin/netstat/netstat.h: revision 1.47
usr.bin/netstat/inet.c: revision 1.102
usr.bin/netstat/inet.c: revision 1.103
usr.bin/netstat/inet6.c: revision 1.61
usr.bin/netstat/inet6.c: revision 1.62
Don't use -P as a kmem printer, verify that the address points to a pcb first!
Not all pointers are 64bit - use uintptr_t instead of uint64_t.
 1.101.6.2  20-Aug-2014  tls Rebase to HEAD as of a few days ago.
 1.101.6.1  23-Jun-2013  tls resync from head
 1.101.2.2  11-Feb-2015  martin Pull up following revision(s) (requested by christos in ticket #1249):
usr.bin/netstat/inet.c: revision 1.106
usr.bin/netstat/inet6.c: revision 1.68
Allocate the right size for pcb blocks.
 1.101.2.1  29-Jul-2013  msaitoh Pull up following revision(s) (requested by christos in ticket #912):
usr.bin/netstat/main.c: revision 1.86
usr.bin/netstat/netstat.h: revision 1.47
usr.bin/netstat/inet.c: revision 1.102
usr.bin/netstat/inet.c: revision 1.103
usr.bin/netstat/inet6.c: revision 1.61
usr.bin/netstat/inet6.c: revision 1.62
Don't use -P as a kmem printer, verify that the address points to a pcb first!
Not all pointers are 64bit - use uintptr_t instead of uint64_t.
 1.104.4.1  11-Feb-2015  snj Pull up following revision(s) (requested by christos in ticket #503):
usr.bin/netstat/inet.c: revision 1.106
usr.bin/netstat/inet6.c: revision 1.68
Allocate the right size for pcb blocks.
 1.106.2.1  07-Jan-2017  pgoyette Sync with HEAD. (Note that most of these changes are simply $NetBSD$
tag issues.)
 1.107.12.1  21-May-2018  pgoyette Sync with HEAD
 1.107.6.1  12-Sep-2022  martin Pull up the following, requested by msaitoh in ticket #1762:

usr.bin/netstat/atalk.c 1.18,1.20-1.21
usr.bin/netstat/bpf.c 1.16 via patch
usr.bin/netstat/fast_ipsec.c 1.24 via patch
usr.bin/netstat/if.c 1.97-1.99,1.101-1.104 via patch
usr.bin/netstat/inet.c 1.111,1.115-1.116 via patch
usr.bin/netstat/inet6.c 1.70,1.74-1.75,1.80-1.81 via patch
usr.bin/netstat/main.c 1.100,1.102-1.103
usr.bin/netstat/mbuf.c 1.34-1.35
usr.bin/netstat/mroute.c 1.26-1.27
usr.bin/netstat/mroute6.c 1.16
usr.bin/netstat/netstat.h 1.52-1.53
usr.bin/netstat/pfkey.c 1.4-1.5 via patch
usr.bin/netstat/pfsync.c 1.4-1.5 via patch
usr.bin/netstat/route.c 1.87-1.88
usr.bin/netstat/unix.c 1.36-1.37
usr.bin/netstat/vtw.c 1.11,1.13

- Add names of a few more ICMPv6 messages.
Also make the array be explicitly 256 entries long.
- sprintf() -> snprintf(), and adjust a buffer size to avoid any
potential for overflow.
- Add missing {IP,IP6}_STAT_NOIPSEC to netstat.
- Don't show any of the completely and utterly undocumented VTW info
if the feature isn't enabled.
- Print oqdrops correctly.
- netstat.1: Add various xrefs present in the body to "See Also".
- Limit maximum owner name to appease gcc.
- KNF. Style fixes.
 1.108.2.2  13-Apr-2020  martin Mostly merge changes from HEAD upto 20200411
 1.108.2.1  10-Jun-2019  christos Sync with HEAD
 1.109.2.2  12-Sep-2022  martin Pull up the following, requested by msaitoh in ticket #1522:

usr.bin/netstat/atalk.c 1.18,1.20-1.21
usr.bin/netstat/bpf.c 1.16 via patch
usr.bin/netstat/fast_ipsec.c 1.24
usr.bin/netstat/if.c 1.97-1.99,1.101-1.104 via patch
usr.bin/netstat/inet.c 1.111,1.115-1.116 via patch
usr.bin/netstat/inet6.c 1.74-1.75,1.80-1.81 via patch
usr.bin/netstat/main.c 1.100-1.103
usr.bin/netstat/mbuf.c 1.35
usr.bin/netstat/mroute.c 1.26-1.27
usr.bin/netstat/mroute6.c 1.16
usr.bin/netstat/netstat.h 1.52-1.53
usr.bin/netstat/pfkey.c 1.4-1.5 via patch
usr.bin/netstat/pfsync.c 1.4-1.5 via patch
usr.bin/netstat/route.c 1.86-1.88
usr.bin/netstat/unix.c 1.36-1.37
usr.bin/netstat/vtw.c 1.11,1.13

- sprintf() -> snprintf(), and adjust a buffer size to avoid any
potential for overflow.
- Fix netstat -rs to print it correctly.
- Add missing {IP,IP6}_STAT_NOIPSEC to netstat.
- Don't show any of the completely and utterly undocumented VTW info
if the feature isn't enabled.
- Print oqdrops correctly.
- Remove Network ATM soft intr queue reporting, we don't have that
in the kernel anymore.
- netstat.1: Add various xrefs present in the body to "See Also".
- KNF. Style fixes.
 1.109.2.1  19-Aug-2019  martin Pull up following revision(s) (requested by kamil in ticket #94):

usr.bin/netstat/netstat_rumpops.c: revision 1.2
usr.bin/netstat/netstat_hostops.c: revision 1.2
usr.bin/netstat/inet6.c: revision 1.73
usr.bin/netstat/bpf.c: revision 1.14
usr.bin/netstat/Makefile: revision 1.46
usr.bin/netstat/prog_ops.h: revision 1.3
usr.bin/netstat/pfsync.c: revision 1.2
usr.bin/netstat/pfkey.c: revision 1.2
usr.bin/netstat/fast_ipsec.c: revision 1.23
usr.bin/netstat/atalk.c: revision 1.17
usr.bin/netstat/inet.c: revision 1.110

netstat: Add indirection of symbols to remove clash with sanitizers

Add indirection and symbol renaming under MKSANITIZER for the linked in
version of sysctlbyname, sysctlgetmibinfo and sysctlnametomib.

RSS XML Feed