summaryrefslogtreecommitdiffstats
path: root/usr.bin/netstat
Commit message (Collapse)AuthorAgeFilesLines
* Add META_MODE support.sjg2015-06-131-0/+24
|\ | | | | | | | | | | | | | | | | | | | | Off by default, build behaves normally. WITH_META_MODE we get auto objdir creation, the ability to start build from anywhere in the tree. Still need to add real targets under targets/ to build packages. Differential Revision: D2796 Reviewed by: brooks imp
| * dirdeps.mk now sets DEP_RELDIRsjg2015-06-081-2/+0
| |
| * Merge sync of headsjg2015-05-2720-1862/+2504
| |\ | |/ |/|
| * Merge from head@274682sjg2014-11-191-8/+8
| |\
| * \ Merge head from 7/28sjg2014-08-195-261/+546
| |\ \
| * | | Updated dependenciessjg2014-05-161-1/+0
| | | |
| * | | Updated dependenciessjg2014-05-101-1/+2
| | | |
| * | | Merge from headsjg2014-05-083-13/+16
| |\ \ \
| * \ \ \ Merge headsjg2014-04-2814-1624/+874
| |\ \ \ \
| * \ \ \ \ Merge from headsjg2013-09-0510-324/+256
| |\ \ \ \ \
| * \ \ \ \ \ sync from headsjg2013-04-128-165/+216
| |\ \ \ \ \ \
| * | | | | | | Updated dependenciessjg2013-03-111-0/+1
| | | | | | | |
| * | | | | | | Updated dependenciessjg2013-02-161-2/+0
| | | | | | | |
| * | | | | | | Sync with HEAD.obrien2013-02-082-1/+7
| |\ \ \ \ \ \ \
| | \ \ \ \ \ \ \
| | \ \ \ \ \ \ \
| | \ \ \ \ \ \ \
| | \ \ \ \ \ \ \
| *---. \ \ \ \ \ \ \ Sync from headsjg2012-11-046-12/+62
| |\ \ \ \ \ \ \ \ \ \
| * | | | | | | | | | | Sync FreeBSD's bmake branch with Juniper's internal bmake branch.marcel2012-08-221-0/+25
| | |_|/ / / / / / / / | |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Requested by: Simon Gerraty <sjg@juniper.net>
* | | | | | | | | | | Properly align the header and the data columns for netstat -r with andloos2015-05-181-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | without the -W flag.
* | | | | | | | | | | Adjust the string format to match the actual number of arguments.loos2015-05-171-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This fix a segmentation fault on ARM when netstat -r is used together with -W. This issue was introduced in r279122.
* | | | | | | | | | | Printing interface names:glebius2015-05-061-3/+13
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | o Restore historical behaviour of appending '*' if interface is down, and we have enough space to print it (usually we don't). [1] o Do not truncate interface names when printing in encoded format. o Report interface flags into encoded format. PR: 199873 [1] Sponsored by: Nginx, Inc.
* | | | | | | | | | | Like it was already done for 'netstat -i', drop the kvm(3) supportglebius2015-04-072-394/+14
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | in 'netstat -r'. The netstat/route.c was the last abuser of struct ifnet and struct rtentry in the tree. With this change if_var.h can become kernel only include, _WANT_RTENTRY can go away and projects/ifnet and projects/routing can go forward. Differential Revision: https://reviews.freebsd.org/D2242 Reviewed by: melifaro, gnn Sponsored by: Nginx, Inc. Sponsored by: Netflix
* | | | | | | | | | | o Make net.inet6.ip6.mif6table return special API structure, that doesn'tglebius2015-04-062-66/+19
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | contain kernel pointers, and instead has interface index. Bump __FreeBSD_version for that change. o Now, netstat/mroute6.c no longer needs to kvm_read(3) struct ifnet, and no longer needs to include if_var.h Note that this change is far from being a complete move of IPv6 multicast routing to a proper API. Other structures are still dumped into their sysctls as is, requiring userland application to #define _KERNEL when including ip6_mroute.h and then call kvm_read(3) to gather all bits and pieces. But fixing this is out of scope of the opaque ifnet project. Sponsored by: Nginx, Inc. Sponsored by: Netflix
* | | | | | | | | | | Stop including if_var.h from userland.glebius2015-04-063-3/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Sponsored by: Nginx, Inc.
* | | | | | | | | | | Fix typo in dropped-packets attribute (missing s).marcel2015-03-041-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Pointed-out by: allanjude (excellent catch!)
* | | | | | | | | | | Fix "netstat -hdw 1" output.marcel2015-02-251-4/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Reported by: np@
* | | | | | | | | | | Document that netstat(1) supports libxo(3).marcel2015-02-221-1/+15
| | | | | | | | | | |
* | | | | | | | | | | Convert netstat to use libxo.marcel2015-02-2118-1428/+2541
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Obtained from: Phil Shafer <phil@juniper.net> Ported to -current by: alfred@ (mostly), Kim Shrier Formatting: marcel@ Sponsored by: Juniper Networks, Inc.
* | | | | | | | | | | Burn bridges to FreeBSD 7.x IGMP stats.glebius2015-02-191-62/+0
| | | | | | | | | | |
* | | | | | | | | | | Merge from projects/sendfile:glebius2014-11-303-4/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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.
* | | | | | | | | | | Convert to usr.bin/ to LIBADDbapt2014-11-251-4/+2
| |_|_|_|_|_|_|_|_|/ |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | Reduce overlinking
* | | | | | | | | | Add the ability to set `prefer_source' flag to an IPv6 address.ae2014-09-091-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | It affects the IPv6 source address selection algorithm (RFC 6724) and allows override the last rule ("longest matching prefix") for choosing among equivalent addresses. The address with `prefer_source' will be preferred source address. Obtained from: Yandex LLC MFC after: 1 month Sponsored by: Yandex LLC
* | | | | | | | | | Add the reverse part to rule #9. Also change its description in theae2014-09-011-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | netstat(8) output. MFC after: 1 week
* | | | | | | | | | Suppress warnings when retrieving protocol stats from interfaces thatmarkj2014-08-221-6/+6
| |_|_|_|_|_|_|_|/ |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | don't support IPv6 (e.g. pflog(4)). Reviewed by: hrs MFC after: 2 weeks
* | | | | | | | | Minor mdoc nit.joel2014-06-061-1/+1
| | | | | | | | |
* | | | | | | | | Sadly, we do not actually live in the future.allanjude2014-06-041-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Approved by: wblock (mentor)
* | | | | | | | | Further updates to the netstat(1) man page and usage messageallanjude2014-06-042-253/+515
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | - Reformat the entire man page - Create a proper synopsis section - Use itemized-lists to describe each flag, rather than paragraphs - Cross-reference common flags to a 'general flags' sub-section with short inline description of the flag - Label 'general flags' sub-section - Apply additional fixes suggested by wblock, brueffer, and bdrewery - Update .Dd that got undone previously - Change the order of the .Op Fl to be alphabetical - Add the -i | -I interface flags to the description of 'interface display mode' - Fix missing parameters in man page - Fix missing parameters in usage() - Sync man page and usage() MFC Note: stable/9 and stable/10 do not have -R, will need to be removed when merged CR: D58 Reviewed by: brueffer, bcr Approved by: wblock (mentor) MFC after: 7 days Sponsored by: ScaleEngine Inc.
* | | | | | | | | Add path markup on sys/mbuf.h to previous netstat(1) man page updateallanjude2014-05-251-1/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Submitted by: brueffer Reviewed by: eadler (mentor)
* | | | | | | | | Document the new -R flag of netstat(1) introduced in r266448 that tracks theallanjude2014-05-251-1/+9
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | flowid for each socket. Reviewed by: adrian Approved by: eadler (mentor)
* | | | | | | | | - Fix a bug which can make sysctl() fail when -F is specified.hrs2014-05-211-9/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | - Increase WID_IF_DEFAULT() from 6 to 8 (the default for AF_INET6) because we have interfaces with longer names than 6 chars like epairN{a,b}. - Style fixes.
* | | | | | | | | Add -R to netstat to dump RSS/flow information.adrian2014-05-193-5/+18
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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.
* | | | | | | | | - Do not override sin6_scope_id in LLA when it is already set to non-zero.hrs2014-05-151-5/+9
| |_|_|_|_|_|_|/ |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This fixes destination list in output of netstat -r. - Plug a memory leak. - Add RTM_VERSION check. - Minor style fixes.
* | | | | | | | Use src.opts.mk in preference to bsd.own.mk except where we need stuffimp2014-05-061-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | from the latter.
* | | | | | | | - Remove net.inet.tcp.reass.overflows sysctl. It counts exactlyglebius2014-05-061-1/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | same events that tcpstat's tcps_rcvmemdrop counter counts. - Rename tcps_rcvmemdrop to tcps_rcvreassfull and improve its description in netstat(1) output. Sponsored by: Netflix Sponsored by: Nginx, Inc.
* | | | | | | | Fix "netstat -gW" behavior broken in r259638.melifaro2014-04-291-11/+13
| |_|_|_|_|_|/ |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | netstat has two options for printing multicast tables: sysctl (the default one for live systems) and kvm-based one (for cores). It looks like kvm-based one hasn't been working since it's been introduced in r190012 due to absence of mfctablesize kernel symbol. Check for all ipv4-multicast symbols being correctly resolved was introduced in r259638 regardless of 'live' value leading to "No IPv4 MROUTING" error message. Reported by: Olivier Cochard-Labbé MFC after: 1 week
* | | | | | | Now, after r263102 we have ifi_oqdrops in if_data, restore printing ofglebius2014-03-191-3/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | output queue drops in netstat(1). No driver, neither kernel fills this field in if_data, yet. Sponsored by: Netflix Sponsored by: Nginx, Inc.
* | | | | | | Garbage collect long time obsoleted (or never used) stuff from routing API.glebius2014-03-152-18/+0
| | | | | | |
* | | | | | | Remove AppleTalk support.glebius2014-03-147-363/+38
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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.
* | | | | | | Remove IPX support.glebius2014-03-147-583/+44
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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.
* | | | | | | Since 32-bit if_baudrate isn't enough to describe a baud rate of a 10 Gbitglebius2014-03-131-2/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | interface, in the r241616 a crutch was provided. It didn't work well, and finally we decided that it is time to break ABI and simply make if_baudrate a 64-bit value. Meanwhile, the entire struct if_data was reviewed. o Remove the if_baudrate_pf crutch. o Make all fields of struct if_data fixed machine independent size. The notion of data (packet counters, etc) are by no means MD. And it is a bug that on amd64 we've got a 64-bit counters, while on i386 32-bit, which at modern speeds overflow within a second. This also removes quite a lot of COMPAT_FREEBSD32 code. o Give 16 bit for the ifi_datalen field. This field was provided to make future changes to if_data less ABI breaking. Unfortunately the 8 bit size of it had effectively limited sizeof if_data to 256 bytes. o Give 32 bits to ifi_mtu and ifi_metric. o Give 64 bits to the rest of fields, since they are counters. __FreeBSD_version bumped. Discussed with: emax Sponsored by: Netflix Sponsored by: Nginx, Inc.
* | | | | | | Fix compilation for 32-bit machines.glebius2014-03-061-4/+4
| | | | | | |
* | | | | | | Hide struct rtentry from userland.glebius2014-03-051-0/+1
| | | | | | |
OpenPOWER on IntegriCloud