summaryrefslogtreecommitdiffstats
path: root/usr.bin/netstat
Commit message (Collapse)AuthorAgeFilesLines
* sctp_process_inpcb() wants an offset parameter in size_t,delphij2007-06-131-1/+1
| | | | | so define it as what it is expected. This fixes WARNS=3 without NO_WERROR build.
* Import rewrite of IPv4 socket multicast layer to support source-specificbms2007-06-121-1/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | and protocol-independent host mode multicast. The code is written to accomodate IPv6, IGMPv3 and MLDv2 with only a little additional work. This change only pertains to FreeBSD's use as a multicast end-station and does not concern multicast routing; for an IGMPv3/MLDv2 router implementation, consider the XORP project. The work is based on Wilbert de Graaf's IGMPv3 code drop for FreeBSD 4.6, which is available at: http://www.kloosterhof.com/wilbert/igmpv3.html Summary * IPv4 multicast socket processing is now moved out of ip_output.c into a new module, in_mcast.c. * The in_mcast.c module implements the IPv4 legacy any-source API in terms of the protocol-independent source-specific API. * Source filters are lazy allocated as the common case does not use them. They are part of per inpcb state and are covered by the inpcb lock. * struct ip_mreqn is now supported to allow applications to specify multicast joins by interface index in the legacy IPv4 any-source API. * In UDP, an incoming multicast datagram only requires that the source port matches the 4-tuple if the socket was already bound by source port. An unbound socket SHOULD be able to receive multicasts sent from an ephemeral source port. * The UDP socket multicast filter mode defaults to exclusive, that is, sources present in the per-socket list will be blocked from delivery. * The RFC 3678 userland functions have been added to libc: setsourcefilter, getsourcefilter, setipv4sourcefilter, getipv4sourcefilter. * Definitions for IGMPv3 are merged but not yet used. * struct sockaddr_storage is now referenced from <netinet/in.h>. It is therefore defined there if not already declared in the same way as for the C99 types. * The RFC 1724 hack (specify 0.0.0.0/8 addresses to IP_MULTICAST_IF which are then interpreted as interface indexes) is now deprecated. * A patch for the Rhyolite.com routed in the FreeBSD base system is available in the -net archives. This only affects individuals running RIPv1 or RIPv2 via point-to-point and/or unnumbered interfaces. * Make IPv6 detach path similar to IPv4's in code flow; functionally same. * Bump __FreeBSD_version to 700048; see UPDATING. This work was financially supported by another FreeBSD committer. Obtained from: p4://bms_netdev Submitted by: Wilbert de Graaf (original work) Reviewed by: rwatson (locking), silence from fenner, net@ (but with encouragement)
* Backout mess mistakenly committed with manpage update.ceri2007-06-101-0/+10
|
* Document SCTP support.ceri2007-06-102-12/+2
|
* Adds support for SCTP.rrs2007-06-094-1/+719
|
* 'netstat -A -p tcp' doesn't print the Socket but the Tcpcb pointer in theandre2007-05-131-1/+1
| | | | first column.
* o Fill the list of icmp types; make its size depend on ICMP_MAXTYPE.maxim2007-04-301-20/+50
| | | | | | | | | | o Print "unknown ICMP" instead of "(null)" if we don't have a description for a icmp type. Based on code Submitted by: Christoph Weber-Fahr PR: misc/112126 MFC after: 2 weeks
* Mark netstat -g host-mode output as deprecated.bms2007-04-101-0/+9
| | | | MFC after: 2 weeks
* Fixing NO_INET6 build as addr2ascii() has been nuked in previous commit.avatar2007-03-021-0/+2
|
* stub call to addr2ascii().bms2007-03-011-1/+3
| | | | Noticed by: brooks
* Nuke ascii2addr() and addr2ascii(). They have no consumers anywherebms2007-02-281-0/+2
| | | | | | | | | | | | | | in FreeBSD, and originated from INRIA IPv6. Stub out netstat reference to addr2ascii() I mistakenly introduced. Update misleading man page sections. Merge NetBSD's getnameinfo() AF_LINK extensions for a portable way to print link-layer addresses given a sockaddr_dl(), minus the IEEE 1394 bits which don't map directly to our code. Obtained from: NetBSD (getnameinfo.c) Discussed on: current (March 2006)
* Fixed some style bugs (whitespace lossage for removal of __P(()), andbde2007-02-271-8/+8
| | | | lots of naming and typing errors involving `interval').
* Use a periodic itimer instead of repeated calls to alarm() inbde2007-02-271-7/+9
| | | | | | | | | | | | | | sidewaysintpr(). This increases the accuracy of the per-interval counts when they are interpreted as rates. Repeated calls to alarm(n) give an average interval that is about 2 ticks larger than n and has a large variance. Periodic itimers normally get the average almost right but have similarly large variance (due to scheduling delays). Statistics utilities should use clock_gettime() to determine the actual interval, but it is still useful to maximize the accuracy of the interval, especially for cases like netstat -w where counts are displayed so the program cannot hide the inaccuracy in a rate conversion.
* Reap FIN_WAIT_2 connections marked SOCANTRCVMORE faster. This mitigatemohans2007-02-261-0/+1
| | | | | | | | potential issues where the peer does not close, potentially leaving thousands of connections in FIN_WAIT_2. This is controlled by a new sysctl fast_finwait2_recycle, which is disabled by default. Reviewed by: gnn, silby.
* Add three new ioctl(2) commands for bpf(4).jkim2007-02-261-3/+6
| | | | | | | | | | | | | | | | | | | | | | - BIOCGDIRECTION and BIOCSDIRECTION get or set the setting determining whether incoming, outgoing, or all packets on the interface should be returned by BPF. Set to BPF_D_IN to see only incoming packets on the interface. Set to BPF_D_INOUT to see packets originating locally and remotely on the interface. Set to BPF_D_OUT to see only outgoing packets on the interface. This setting is initialized to BPF_D_INOUT by default. BIOCGSEESENT and BIOCSSEESENT are obsoleted by these but kept for backward compatibility. - BIOCFEEDBACK sets packet feedback mode. This allows injected packets to be fed back as input to the interface when output via the interface is successful. When BPF_D_INOUT direction is set, injected outgoing packet is not returned by BPF to avoid duplication. This flag is initialized to zero by default. Note that libpcap has been modified to support BPF_D_OUT direction for pcap_setdirection(3) and PCAP_D_OUT direction is functional now. Reviewed by: rwatson
* Use sysctl(2), not kvm(3), to read IPv6 multicast information frombms2007-02-242-21/+60
| | | | | | the running system. Use the name 'IPv6 Forwarding Table', not 'IPv6 Routing Table', to be consistent with what the code actually does and is.
* Use the names 'IPv4' and 'Forwarding Table' in program output, notbms2007-02-241-4/+4
| | | | 'Routing Table', to be consistent with what the code actually does and is.
* Add comments about where netstat is using KVM to read things whichbms2007-02-241-1/+3
| | | | should really be available via sysctl for a running system.
* Update host-mode multicast group information output.bms2007-02-211-33/+87
| | | | | | | | | | | | Display IPv4 and IPv6 memberships separately. Obey the MK_INET6_SUPPORT flag. Display link-layer memberships. Use addr2ascii() to correctly print non-IEEE 802 sockaddr_dl instances. Eliminate redundant switch..case blocks. Update copyright. Misc style changes. MFC after: 3 weeks
* Change wording of warnings when there is no ip_mroute.ko modulebms2007-02-212-11/+19
| | | | | | | | loaded into the system. Change wording of comments to reflect the fact we should unconditionally use KVM if the -M option is used to specify a core file. Add comments to document the fact that IPv6 multicast forwarding information display still relies on KVM for gathering information.
* Retire most of the classful network behaviour of netstat -r output, for IPv4.bms2007-02-141-52/+9
| | | | | | | | | | | | | | | | Without -n, we now only print a "network name" without the prefix length under the following conditions: 1) the network address and mask matches a classful network prefix; 2) getnetbyaddr(3) returns a network name for this network address. With -n, we unconditionally print the full unabbreviated CIDR network prefix in the form "a.b.c.d/p". 0.0.0.0/0 is still printed as "default". This change is in preparation for changes such as equal-cost multipath, and to more generally assist operational deployment of FreeBSD as a modern IPv4 router. There are currently no plans to backport this change. Discussed on: freebsd-net
* Don't shadow globals.yar2006-11-273-7/+7
| | | | | Found by: WARNS=6 MFC after: 3 days
* We should return the name in cp, not printf it.yar2006-11-271-1/+3
| | | | | Found by: WARNS=6 MFC after: 3 days
* Don't always print a space character in show_stat(), since a spacebde2006-11-081-12/+23
| | | | | shouldn't be printed after the last column. This restores the formatting to 79 columns.
* Nits.bms2006-09-292-2/+2
| | | | Submitted by: ru
* Push removal of mrouted down to the rest of the tree.bms2006-09-292-2/+2
|
* Markup fixes.ru2006-09-291-6/+7
|
* Export tcps_rcvmemdrop available in 'struct tcpstat' with netstat(1).wkoszek2006-09-201-0/+1
| | | | | Requested by: Tomasz Pilat <tomasz.pilat (at) axelspringer.pl> Approved by: andre
* - Achieve WARNS=3 by using sparse initializers or avoiding initializers at all.yar2006-07-286-49/+52
| | | | | | | | - Fix a nlist initialization: it should be terminated by a NULL entry. - Constify. - Catch an unused parameter. Tested on: i386 amd64 ia64
* Achieve WARNS=2 by using uintmax_t to pass around 64-bit quantities,yar2006-07-2818-307/+321
| | | | | | | including to printf(). Using uintmax_t is also robust to further extensions in both the C language and the bitwidth of kernel counters. Tested on: i386 amd64 ia64
* Both fields of struct timeval are of a non-basic type,yar2006-07-281-6/+10
| | | | so we should cast them to a type printf() knows about.
* Avoid useless work: Do not build inet6.c if INET6 support is off.yar2006-07-281-1/+3
| | | | | This also avoids pretending that netstat includes inet6.c in the output from ident(1).
* Not having ipv6 in your kernel is not an error and should not be reported.julian2006-07-141-1/+4
| | | | MFC after: 1 week
* Since kernel & userland use different timebase and netstat is reading kerneloleg2006-07-061-3/+13
| | | | | | memory directly, we should do timebase conversion for route lifetime. Approved by: glebius (mentor)
* Reimplementation of world/kernel build options. For details, see:ru2006-03-171-2/+4
| | | | | | | | http://lists.freebsd.org/pipermail/freebsd-current/2006-March/061725.html The src.conf(5) manpage is to follow in a few days. Brought to you by: imp, jhb, kris, phk, ru (all bugs are mine)
* Improved description for packet zone statistics.andre2006-02-181-1/+1
| | | | | Sponsored by: TCP/IP Optimization Fundraise 2005 MFC after: 3 days
* Print statistics on mbuf+clusters in packet zone.andre2006-02-181-0/+4
| | | | | Sponsored by: TCP/IP Optimization Fundraise 2005 MFC after: 3 days
* Print statistics on jumbo mbuf clusters.andre2006-02-181-2/+72
| | | | | Sponsored by: TCP/IP Optimization Fundraise 2005 MFC after: 3 days
* Sort sfbuf allocation counters with other sfbuf information.rwatson2006-02-111-13/+9
| | | | MFC after: 3 days
* Un-#if 0 the printing of allocation failure counts for mbufs, clusters,rwatson2006-02-111-2/+0
| | | | | | and packets in netstat -m. MFC after: 3 days
* Add support for printing IPSEC protocol stats if the kernel was compiledkbyanc2005-12-285-97/+489
| | | | | | | | | | | | | with FAST_IPSEC rather than the KAME IPSEC stack. Note that the output of "netstat -s -p ipsec" differs depending on which stack is compiled into the kernel since they each keep different stats. This delta also adds the "esp", "ah", and "ipcomp" protocol stats, which are also available when the kernel is compiled with the FAST_IPSEC stack (e.g. "netstat -s -p esp"). Submitted by: Matt Titus <titus at nttmcl dot com> MFC after: 3 days
* Provide some basic documentation explaining what the bpf(4) flags arecsjp2005-12-181-0/+24
| | | | | supposed to mean. Also, add an external references for bpf now that we reference flags from that man page.
* Remove two lines of debugging output that accidentally snuck into therwatson2005-11-281-2/+0
| | | | commit to fix up kvm support for netstat -m.
* -mdoc sweep.ru2005-11-181-2/+3
|
* Modify netstat -mb to use libmemstat when accessing a core dump or liverwatson2005-11-133-178/+54
| | | | | | | | | | | | | | | | kernel memory and not using sysctl. Previously, libmemstat was used only for the live kernel via sysctl paths. This results in netstat output becoming both more consistent between core dumps and the live kernel, and also more information in the core dump case than previously (i.e., mbuf cache information). Statistics relating to sfbufs still rely on a kvm descriptor as they are not currently exposed via libmemstat. netstat -m operating on a core is still unable to print certain sfbuf stats available on the live kernel. MFC after: 1 week
* Align output.ru2005-11-091-2/+2
|
* Fix obvious copy'n'paste-O in rev.1.36 While here nit style.mlaier2005-10-221-3/+3
| | | | | | PR: bin/87783 Submitted by: Mats Palmgren MFC after: 1 week
* Remove bridge(4) from the tree. if_bridge(4) is a full functionalmlaier2005-09-274-51/+2
| | | | | | | | replacement and has additional features which make it superior. Discussed on: -arch Reviewed by: thompsa X-MFC-after: never (RELENG_6 as transition period)
* - Print space character in show_stat(). Remove a lot of priuntf(" ").glebius2005-09-271-37/+29
| | | | | - Utilize show_stat() in sidewaysintpr() loop. This makes periodic statistics to honor -h flag.
* Use is '-' to imply that the flag is not set, rather than '.'.csjp2005-09-151-1/+1
|
OpenPOWER on IntegriCloud