summaryrefslogtreecommitdiff
path: root/usr.bin/netstat
AgeCommit message (Collapse)Author
2013-11-23Update for new pcb tailq's.christos
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.
2013-10-19use correct function and symbolic constantschristos
2013-10-19use new scopeid functionschristos
2013-10-18Make the -f option accept multiple address families.bad
Bump man page date.
2013-10-18- avoid pointer gymnasticschristos
- remove unused variables
2013-06-20Not all pointers are 64bit - use uintptr_t instead of uint64_t.martin
2013-06-19Don't use -P as a kmem printer, verify that the address points to a pcb first!christos
2013-04-15PR/47744: Frank Kardel: netstat -s stops output prematurely when ipsec is notchristos
compiled. If the first sysctl fails return silently. XXX: pullup-6
2013-03-01Retire OSI network stack. OK core@joerg
2013-01-28Use sysctl based code netstat -r. Remove support for post-mortemjoerg
analysis.
2012-12-14Fix memory leak.msaitoh
2012-10-19Add -t flag.msaitoh
2012-10-19Add note about -l option. Fixes PR#47085 reported by Julian Fagir.msaitoh
2012-10-19Line up total numbers again (for -b case and -X case).msaitoh
2012-09-25Sort -h option properly (not between -I and -i)pgoyette
XXX Should the date be updated?
2012-03-22remove KAME IPSEC, replaced by FAST_IPSECdrochner
2012-03-20Use C89 function definitionsmatt
2012-02-12PR/44889: Yamamoto Takashi: netstat -d option is broken (from Elad)christos
2012-01-06split the ipsec.c source file into the pfkey part which is shareddrochner
with FAST_IPSEC and KAME specific IPSEC statistics
2012-01-06more IPSEC header cleanup: don't install unneeded headers to userland,drochner
and remove some differences berween KAME and FAST_IPSEC
2011-12-24use the names from the include files.christos
2011-11-11Move RTF_ANNOUNCE flag so that it no longer conflicts with RTF_PROTO2.gdt
RTF_ANNOUNCE was defined as RTF_PROTO2. The flag is used to indicated that host should act as a proxy for a link level arp or ndp request. (If RTF_PROTO2 is used as an experimental flag (as advertised), various problems can occur.) This commit provides a first-class definition with its own bit for RTF_ANNOUNCE, removes the old aliasing definitions, and adds support for the new RTF_ANNOUNCE flag to netstat(8) and route(8)., Also, remove unused RTF_ flags that collide with RTF_PROTO1: netinet/icmp6.h defined RTF_PROBEMTU as RTF_PROTO1 netinet/if_inarp.h defined RTF_USETRAILERS as RTF_PROTO1 (Neither of these flags are used anywhere. Both have been removed to reduce chances of collision with RTF_PROTO1.) Figuring this out and the diff are the work of Beverly Schwartz of BBN. (Passed release build, boot in VM, with no apparently related atf failures.) Approved for Public Release, Distribution Unlimited This material is based upon work supported by the Defense Advanced Research Projects Agency and Space and Naval Warfare Systems Center, Pacific, under Contract No. N66001-09-C-2073.
2011-10-04PR/43968 -- add 'segqlen' of TCPCB to 'netstat -P'.shattered
OK by wiz@
2011-09-16Use __deadjoerg
2011-08-16document non-literal format stringschristos
2011-07-17Use errx() to display kvm_openfiles error message, the provided buffernjoly
already has it.
2011-06-21New sentence, new line.wiz
2011-06-21add a sentence regarding multiple tagskefren
2011-06-21print multiple tags if exists, comma separatedkefren
2011-05-29Display SOCK_SEQPACKET local sockets in sockstat and netstatmanu
2011-05-26pull in AES-GCM/GMAC support from OpenBSDdrochner
This is still somewhat experimental. Tested between 2 similar boxes so far. There is much potential for performance improvement. For now, I've changed the gmac code to accept any data alignment, as the "char *" pointer suggests. As the code is practically used, 32-bit alignment can be assumed, at the cost of data copies. I don't know whether bytewise access or copies are worse performance-wise. For efficient implementations using SSE2 instructions on x86, even stricter alignment requirements might arise.
2011-05-26Default to -Wno-sign-compare -Wno-pointer-sign for clang.joerg
Push -Wno-array-bounds down to the cases that depend on it. Selectively disable warnings for 3rd party software or non-trivial issues to be reviewed later to get clang -Werror to build most of the tree.
2011-05-24copy AES-XCBC-MAC support from KAME IPSEC to FAST_IPSECdrochner
For this to fit, an API change in cryptosoft was adopted from OpenBSD (addition of a "Setkey" method to hashes) which was done for GCM/GMAC support there, so it might be useful in the future anyway. tested against KAME IPSEC AFAICT, FAST_IPSEC now supports as much as KAME.
2011-05-24RA flood mitigation via a limit on accepted routes:spz
- introduce a limit for the routes accepted via IPv6 Router Advertisement: a common 2 interface client will have 6, the default limit is 100 and can be adjusted via sysctl - report the current number of routes installed via RA via sysctl - count discarded route additions. Note that one RA message is two routes. This is at present only across all interfaces even though per-interface would be more useful, since the per-interface structure complies to RFC2466 - bump kernel version due to the previous change - adjust netstat to use the new value (with netstat -p icmp6)
2011-05-23report aes-ctr statistic counter by namedrochner
2011-05-11Suppress whitespace at EOL to fix lib/librumphijack/t_tcpip.dyoung
2011-05-11use getmicrouptime(9) rather than microtime(9) for TIME_WAIT durationdrochner
calculation, because this doesn't get confused by system time changes, and uses less CPU cycles reviewed by dyoung
2011-05-10Use ptrdiff_t to hold pointer difference to avoid coredump on LP64 system.enami
2011-05-05decode camellia-cbc in stats histogramdrochner
2011-05-04Use %zx for _both_ size_t formats!pgoyette
2011-05-04On second thought, make a more conservative change: use %zx instead ofdyoung
%x for size_t.
2011-05-04Use %zu format for size_t instead of %x.dyoung
2011-05-04Always try to open kmem, do not always set use_sysctl to 1, and do notdyoung
fail if opening kmem fails unless !use_sysctl. Fixes netstat(1) options such as -s.
2011-05-04Access the kvm_t using get_kvmd(), only.dyoung
2011-05-04Don't use type qualifier 'register'.dyoung
2011-05-03Do not display expired or reclaimed vestigial TIME_WAIT entries.dyoung
2011-05-03Reduces the resources demanded by TCP sessions in TIME_WAIT-state usingdyoung
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.
2011-04-19fix some labels for ipcomp counters which didn't make sense at alldrochner
2011-03-02Use __arraycount() and PRIu64. Delete unnecessary casts to unsigneddyoung
long long.
2011-03-01Pull pfsync_stats() out of inet.c and into pfsync.c so that inet.c doesdyoung
not have to #include PF header files that pollute the global namespace by #defining v4 and v6 (sheesh).