summaryrefslogtreecommitdiffstats
path: root/usr.bin/netstat
Commit message (Collapse)AuthorAgeFilesLines
* SECURITY: Drop `setgid kmem' bit as early as possible.ru2001-08-311-0/+1
|
* -a is not an options (sic).dd2001-08-281-1/+1
|
* Mention what an asterisk means in the -i display.dd2001-08-281-0/+4
| | | | | PR: 30069 Submitted by: andrew@ugh.net.au
* Don't misuse the return from snprintf.brian2001-08-201-5/+7
| | | | MFC after: 2 weeks
* Removed duplicate VCS ID tags, as per style(9).ru2001-08-131-1/+0
|
* Add a "X KBytes of wired memory reserved" metric that representsbmilekic2001-07-311-11/+14
| | | | | | | | | approximately the amount of memory allocated from the mbuf maps and sitting in the mbuf allocator's cache containers, and display in parantheses the percentage of said memory that is actually in use at the given time `netstat -m' is executed. Suggested by: mjacob
* - Do not handle the per-CPU containers in mbuf code as though the cpuidsbmilekic2001-07-261-11/+7
| | | | | | | | | | | | | | | | | were indices in a dense array. The cpuids are a sparse set and treat them as such, setting up containers only for CPUs activated during mb_init(). - Fix netstat(1) and systat(1) to treat the per-CPU stats area as a sparse map, in accordance with the above. This allows us to properly boot with certain CPUs disactivated. However, if we later decide to re-activate said CPUs, we will barf until we decide to implement CPU spinon/spinoff callback hooks to allow for said CPUs' per-CPU containers to get configured on their activation. Reported by: mjacob Partially (sys/ diffs) Submitted by: mjacob
* Use sysctl to export multicast routing statsfenner2001-07-251-5/+13
|
* Remove whitespace at EOL.dd2001-07-151-13/+13
|
* mdoc(7) police: sort SEE ALSO xrefs (sort -b -f +2 -3 +1 -2).ru2001-07-061-1/+1
|
* Make `rttrash' variable (#routes not in table but not freed) visibleru2001-06-293-5/+17
| | | | through ``netstat -rs''.
* Fixed bogon in revision 1.37. Don't bogusly print a radix node'sru2001-06-291-8/+3
| | | | | | | duped key marker (``=>'') for routes with non-positive rmx_expire metric, such as ethernet interface routes. MFC after: 1 week
* - create an entry of IPV6CTL_STATS sysctl.ume2001-06-282-9/+23
| | | | | | | | | - fix the problem that netstat doesn't show raw6 and icmp6 pcblist. - make netstat use sysctl to retreive stats of ipv6 and icmpv6 instead of kread. Obtained from: KAME MFC after: 1 week
* Add netstat(1) knob to reset net.inet.{ip|icmp|tcp|udp|igmp}.stats.ru2001-06-234-13/+37
| | | | | | For example, ``netstat -s -p ip -z'' will show and reset IP stats. PR: bin/17338
* - Fix space allocation for mbstat structurebmilekic2001-06-231-3/+5
| | | | | - Make sure to try hw.ncpu if kern.smp.cpus doesn't exist (i.e. on UP) to get number of CPUs.
* Honor -s -s (don't show zero stats) with -r, untangle SYNOPSIS further.ru2001-06-232-12/+25
| | | | (usage() still is not synchronized with SYNOPSIS, intentionally.)
* Introduce numerous SMP friendly changes to the mbuf allocator. Namely,bmilekic2001-06-223-67/+182
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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/
* - Avoid hardcoded constant on icmp6 in/out histogram printingsumikawa2001-06-211-4/+8
| | | | | | | - Icmp6 histogram update for inverse neighbor solicit/advert. Obtained from: KAME MFC after: 2 weeks
* remove warningsassar2001-06-1513-93/+67
| | | | | remove superfluous declarations make things more consistent
* remove K&R supportassar2001-06-1515-338/+201
|
* revert removal of warning and K&R supportassar2001-06-1516-138/+294
| | | | Requested by: bde
* nflag -> numeric_port. nflag is no moreassar2001-06-151-1/+1
|
* Print symbolic names for appletalk ports. Also some very minor style 9 issues.imp2001-06-151-2/+15
| | | | | PR: bin/4157 Submitted by: Denny Gentry <denny1@home.com>
* First round of netstat(1) cleanup.ru2001-06-154-65/+52
| | | | | | | | | | | | | | | | | | | | | | | | 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.
* Line up `netstat -rl' display.ru2001-06-151-5/+7
|
* remove most of the warningsassar2001-06-1516-277/+144
|
* add the option -S for printing port numbers symbolically but addressesassar2001-06-1510-45/+55
| | | | numerically. clean up the CFLAGS in Makefile.
* Restore -M -N support for -m.ru2001-06-144-32/+69
| | | | PR: 20808
* Removed -h option.ru2001-06-141-5/+1
|
* Really delete the -h option.ru2001-06-141-2/+2
| | | | | CSRG revision 5.33 deleted -h option from getopt(), but not from usage(). Revision 8.3 restored it in getopt().
* Fixed printing of netatalk statistics WRT the -s flag.ru2001-06-121-2/+2
| | | | | | PR: bin/6994 Submitted by: Zahemszky Gabor <zgabor@zg.CoDe.hu> MFC after: 1 week
* Mention about -rl behavior change. Now, MTU is printed.ume2001-06-111-1/+3
|
* Add missing column for Mtu in header when -rl is specified.ume2001-06-111-4/+13
|
* Sync with recent KAME.ume2001-06-117-43/+126
| | | | | | | | | | | | | | | | | | 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
* Always print at least 2 bytes for IN_CLASSB_NET networks.ru2001-06-081-10/+29
| | | | | | | | | | Always print at least 3 bytes for IN_CLASSC_NET networks. The standard 193.0.0 class C network for example, will now be displayed as "193.0.0" as opposed to the confusing 193. PR: bin/21546 MFC after: 1 week
* Correct some typos.dd2001-06-011-3/+3
| | | | | PR: 27251 Submitted by: Pekka Savola <pekkas@netcore.fi>
* Restore printing of routes cloned from a RTF_CLONING parentru2001-05-072-9/+10
| | | | | | | | (e.g., ARP table entries) with the default routing display. PR: bin/26970 Reviewed by: wollman MFC after: 3 days
* Add missing break when printing IPv6 multicast addresses.fenner2001-04-261-1/+2
| | | | | Use the sockaddr_dl sdl_type, not ifnet.if_type, to decide what type a multicast sockaddr_dl is.
* Fix typo s/thissystem/this system/jesper2001-04-161-1/+1
| | | | Submitted by: Stephen <sdk@shell.yuck.net>
* Don't core dump when given "-i -a". Problem caused by a mistakenphk2001-03-301-1/+2
| | | | | | | dereference of a kernel-pointer in userland. PR: 26168 Submitted by: Peter Pentchev <roam@orbitel.bg>
* Add an example of a novel technique to the IPv6 code. This technique seemsphk2001-03-191-1/+2
| | | | | | | to have been developed after the IPv6 code was written, it's called "checking for error returns". Now netstat at least doesnt't go beserk in jails.
* s/protocol-cloned/cloned/ I have missed in 1.24 -> 1.25.ru2001-03-181-1/+1
|
* Add a -W flag that tells netstat not to truncate addresses even if they aredes2001-03-154-32/+68
| | | | | | | | too long for the column they're printed in. Move variable definitions out of netstat.h and into main.c. Clean up some warnings.
* net/route.c:ru2001-03-152-5/+10
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | A route generated from an RTF_CLONING route had the RTF_WASCLONED flag set but did not have a reference to the parent route, as documented in the rtentry(9) manpage. This prevented such routes from being deleted when their parent route is deleted. Now, for example, if you delete an IP address from a network interface, all ARP entries that were cloned from this interface route are flushed. This also has an impact on netstat(1) output. Previously, dynamically created ARP cache entries (RTF_STATIC flag is unset) were displayed as part of the routing table display (-r). Now, they are only printed if the -a option is given. netinet/in.c, netinet/in_rmx.c: When address is removed from an interface, also delete all routes that point to this interface and address. Previously, for example, if you changed the address on an interface, outgoing IP datagrams might still use the old address. The only solution was to delete and re-add some routes. (The problem is easily observed with the route(8) command.) Note, that if the socket was already bound to the local address before this address is removed, new datagrams generated from this socket will still be sent from the old address. PR: kern/20785, kern/21914 Reviewed by: wollman (the idea)
* MAXHOSTNAMELEN includes space for a NUL.brian2001-03-146-42/+13
| | | | | | Don't roll our own version of trimdomain(), use the one in libutil. Not objected to by: freebsd-audit
* Count and show incoming UDP datagrams with no checksum.ru2001-03-131-0/+1
|
* When displaying interface statistics with -i show a '-' for anyjoe2001-03-041-15/+64
| | | | values that aren't updated for a particular network-layer address.
* Convert if_multiaddrs from LIST to TAILQ so that it can be traversedphk2001-02-061-1/+1
| | | | | | backwards in the three drivers which want to do that. Reviewed by: mikeh
* mdoc(7) police: split punctuation characters + misc fixes.ru2001-02-011-2/+2
|
* Use macro API to <sys/queue.h>phk2000-12-303-18/+17
| | | | | Submitted by: "Jason" <jsmethers@pdq.net> Reviewed by: phk
OpenPOWER on IntegriCloud