summaryrefslogtreecommitdiffstats
path: root/usr.bin/netstat
Commit message (Collapse)AuthorAgeFilesLines
* NI_WITHSCOPEID cleanup. Neither RFC 2553 nor RFC 3493 definesume2005-05-131-2/+2
| | | | | NI_WITHSCOPEID, and our getaddrinfo(3) does nothing special for it, now.
* Silence a warning on systems without carp(4).ru2005-04-121-1/+2
|
* Add limits on the number of elements in the sack scoreboard bothps2005-03-091-0/+1
| | | | | | | | per-connection and globally. This eliminates potential DoS attacks where SACK scoreboard elements tie up too much memory. Submitted by: Raja Mukerji (raja at moselle dot com). Reviewed by: Mohan Srinivasan (mohans at yahoo-inc dot com).
* Add CARP (Common Address Redundancy Protocol), which allows multipleglebius2005-02-223-0/+50
| | | | | | | | | | | | | 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)
* According to style.Makefile(5):delphij2005-01-231-2/+4
| | | | | | WARNS?= should appear before CFLAGS Reviewed by: ru
* Make sure that we don't define INET6 when NO_INET6 is defined.delphij2005-01-221-0/+2
| | | | | | | | Without this change, when running netstat with a kernel without INET6 built in, you will get a complain at the end of "netstat -s" output. X-MFC: NO_INET6 was called "NOINET6" on RELENG_5
* evise use of queue(9) macros for netipx when used from userspace:rwatson2005-01-021-11/+5
| | | | LIST_FOREACH() is difficult to use correctly, so don't try to.
* Apply a simplifying patch submitted by rik to the IPX support inrwatson2004-12-311-34/+14
| | | | | | | | | | | netstat(1): - Make previously unnecessarily global variables local. - Use LIST_FOREACH() in preference to manual iteration. - Restore a sanity check through slightly incestuous use of queue macro knowledge. Submitted by: rik
* Update netstat(1) for recent conversion of netipx to queue(9) fromrwatson2004-12-312-4/+24
| | | | | | | home-brew linked lists. Read in the ipxpcb_list structure first in order to find the first pcb pointer. Then follow the chain as before, only the termination condition is a NULL next pointer rather than a next pointer equal to the original offset.
* For variables that are only checked with defined(), don't provideru2004-10-241-1/+1
| | | | any fake value.
* -c flag (cache stats) was killed in rev. 1.68. Fix getopt(3) andmaxim2004-10-201-2/+2
| | | | | | usage() accordingly. Submitted by: Pawel Worach
* Print link level address on vlan interfaces using ether_ntoa(), to makeglebius2004-07-281-0/+1
| | | | | | | | | | output on bare ethernet and vlan interfaces the same. PR: bin/69674 Submitted by: Pawel Malachowski <pawmal-posting@freebsd.lublin.pl> Reviewed by: ru Approved by: julian (mentor) MFC after: 1 week
* Use the length modifier 'll' instead of 'q' to print long longs.stefanf2004-07-281-6/+6
|
* Add __FBSDID. Replace local variable sin by sockin to not conflict with sin(3).charnier2004-07-2614-78/+82
| | | | | Use warnx() instead of warn() when error message is not of any interest. Add prototypes.
* Add SACK statistics to netstat.ps2004-06-291-0/+10
|
* Make netstat(1) more closely follow documented behaviour. If a TCPbms2004-06-161-1/+2
| | | | | | | | | | | socket in LISTEN state happens to be bound to an interface, it will show up in netstat(1) output even without the -a switch. As the definition of "sockets used by server processes" is a difficult one to qualify with regards to UDP, do not change the output behaviour for UDP sockets. PR: bin/26359
* Add missing dot and newline in a message.fjoe2004-06-021-1/+1
| | | | | Submitted by: Igor Sysoev <is (at) rambler-co.ru> MFC after: 3 days
* Bring in mbuma to replace mballoc.bmilekic2004-05-314-200/+9
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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)
* Bumped document date.ru2004-05-191-2/+2
| | | | Fixed the grammar nit.
* Output style nit.ru2004-05-121-1/+1
|
* Add the bad reset statistic (corresponds to tcp_input.c rev 1.235)silby2004-04-261-0/+1
|
* Replace ROUNDUP/ADVANCE with SA_SIZEluigi2004-04-131-7/+1
|
* Show link-level multicast packet counters with the -a option.ru2004-04-121-2/+14
|
* Fixed alignment of multicast addresses when printing that gotru2004-04-121-2/+4
| | | | broken in previous revision.
* Sort SRCS in Makefile and document -g option additions.bms2004-03-252-2/+3
| | | | Nudged by: ru
* Output style: Get rid of an unnecessary newline.bms2004-03-251-1/+0
|
* Teach netstat(1) how to print the multicast group memberships presentbms2004-03-254-2/+154
| | | | | | within the running system. Sponsored by: Ralf the Wonder Llama
* More cleanups:ru2004-03-181-20/+20
| | | | | | | | - 0 should have been -1 in previous commit (just to stay consistent), - Spell null pointers as NULL, not 0, - Fixed the comment about pr_usesysctl to not confuse it with boolean. Pointed by: bde
* NULL -> 0.ru2004-03-171-1/+1
|
* Do not print a warning about net.inet.pim.stats if errno isdes2004-03-121-1/+2
| | | | | | | ENOENT, because that means we do not have PIM in the kernel. Submitted by: hmp MFC after: 1 week
* Fixed misspellings of 0 as NULL.bde2004-03-111-3/+3
|
* printed statistics about source address selection rules.ume2004-02-051-0/+25
| | | | Obtained from: KAME
* stops program if kvm_read fails.ume2004-02-051-2/+3
| | | | Obtained from: KAME
* - support hmac-ripemd160.ume2004-02-051-1/+10
| | | | | | - support AES XCBC MAC/AES counter mode. Obtained from: KAME
* print stats on SPD cache lookups.ume2004-02-051-0/+5
| | | | Obtained from: KAME
* - %d is 12 chars, not 10. use NI_MAX* where appropriate.ume2004-02-051-67/+52
| | | | | | | | - goodbye RC5. - use %llu directly. - KNF. Obtained from: KAME
* Use floating point instead of unsigned long longs in percentagebde2003-12-291-13/+13
| | | | | | | | | | | | | | | | | | | | | | | | calculations. Long longs should never be used, since they break compiling with C90 compilers and don't necessarily work any better than longs for avoiding overflow. Print percentages with another digit of precision since they can be small and this is easy to do now that the format is floating point. Restored some more of the old -m output: Print the percentage of allocated memory that is in use. This is the amount of memory in active mbufs and mbuf clusters relative to the total amount of memory soft-allocated for mbufs and mbuf clusters. Print the percentage of allocated memory that is wired (cached). The old mbuf allocator never freed memory so printing this value wasn't useful. A previous version of netstat for the new allocator printed the in-use amount as a percentage of the wired amount. Fixed some nearby style bugs (excessive parenthesization and a redundant return). Reviewed by: alfred
* Fixed missing declaration of pluralies(). This showed up as strangebde2003-12-292-0/+3
| | | | | | | | | 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.
* Fixed style bugs created in rev.1.27 by removing "__P(" and its closing ")"bde2003-12-291-75/+75
| | | | without removing the space before it.
* Teach netstat about the new sendfile statistics.silby2003-12-281-0/+4
|
* Clean up the style of the previous commit, and fix a fewsilby2003-12-271-7/+5
| | | | | | type mismatches as well. Suggested by: bde
* Teach netstat to read and display the new sfbuf statistics.silby2003-12-271-0/+12
|
* Fix percentages by using long long to hold values for 'space',alfred2003-12-261-9/+12
| | | | | | | | | | overflow was breaking a bunch of the stats, specifically the percentage displayed for wired memory. Fix the output for current/peak/max lines, I forgot to output the types. 161/320/51200 (current/peak/max): -to- 639/25696/51200 mbufs in use (current/peak/max):
* I asked Bosko Milekic for help with 'peak' reporting, and he suggestedalfred2003-12-231-2/+2
| | | | | | | | using the old 'cached' value but reporting it as 'cached'. I've decided to report the 'cached' as 'peak', why? Well because it is the peak, the peak of what is actually allocated. 'cached' doesn't make sense to me as a user.
* Restore old netstat -m output.alfred2003-12-234-31/+76
| | | | A new flag '-c' can be used to ask for the cache stats.
* Fix some minor nits in netstat whereby large interface names would bebms2003-11-283-7/+25
| | | | | | | | | truncated. In environments where many tunnel or vlan interfaces are created, interface names have high numbers which overflow the field width. PRs: bin/52349, bin/35838 Submitted by: Mike Tancsa, Scot W. Hetzel Approved by: re (rwatson)
* Replace the if_name and if_unit members of struct ifnet with new membersbrooks2003-10-312-19/+8
| | | | | | | | | | | | | if_xname, if_dname, and if_dunit. if_xname is the name of the interface and if_dname/unit are the driver name and instance. This change paves the way for interface renaming and enhanced pseudo device creation and configuration symantics. Approved By: re (in principle) Reviewed By: njl, imp Tested On: i386, amd64, sparc64 Obtained From: NetBSD (if_xname)
* Print the correct ICMP statistics for "no return routes".ru2003-10-231-1/+1
|
* remove unneeded include of route.hsam2003-10-031-0/+1
| | | | Supported by: FreeBSD Foundation
* 1. Add support for printing PIM-related statistics withhsu2003-08-075-1/+136
| | | | | | | | | 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>
OpenPOWER on IntegriCloud