Commit Graph

77 Commits

Author SHA1 Message Date
elad a81bf90a94 PR/31347: Geoff C. Wing: netstat err message is ambiguous about cause
Applied patch, thanks!
2006-09-22 23:21:52 +00:00
rpaulo 2fb2ae3251 Import of TCP ECN algorithm for congestion control.
Both available for IPv4 and IPv6.
Basic implementation test results are available at
http://netbsd-soc.sourceforge.net/projects/ecn/testresults.html.

Work sponsored by the Google Summer of Code project 2006.
Special thanks to Kentaro Kurahone, Allen Briggs and Matt Thomas for their
help, comments and support during the project.
2006-09-05 00:29:35 +00:00
rpaulo 4381b9dc9b Revert previous. 2006-08-17 01:42:57 +00:00
rpaulo d7a463a8aa Adapt to ECN. 2006-08-17 01:32:13 +00:00
rpaulo 63b3e9f51c It's not an error if we can't print CARP stats, it just means it's not built
in.
2006-06-20 19:22:17 +00:00
elad 5d7aa1a613 Make netstat use sysctl when dumping routing tables/stats.
Heavily based on similar code from Claudio Jeker (at OpenBSD).

While here, fix inet/inet6 sysctl stuff commited previously to
actually work, and some other nits to make netstat more sysctl
friendly.

One step closer to losing setgid kmem on this one...
2006-05-28 16:51:40 +00:00
liamjfoy 362a260c6d check if malloc(3) failed
ok joerg@
2006-05-21 21:01:55 +00:00
riz 64cde4117b Use PRIu64 to format uint64_t quantities, instead of %llu, in
newly-introduced code.

XXX more %llu cleanup is needed throughout netstat code.
2006-05-18 17:19:22 +00:00
liamjfoy 4876c304b1 Integrate Common Address Redundancy Procotol (CARP) from OpenBSD
'pseudo-device	carp'

Thanks to: joerg@ christos@ riz@ and others who tested
Ok: core@
2006-05-18 09:05:49 +00:00
elad bbf85a429b Use PRIxPTR when printing a pointer. 2005-08-12 14:08:16 +00:00
he 4577ef8d16 Replace usage of caddr_t with intptr_t, to allow this to build cleanly
on both 32- and 64-bit archs.
2005-08-08 12:11:52 +00:00
elad dbc883fab2 Use sysctl to read live kernel PF_INET PCBs. 2005-08-07 17:10:36 +00:00
elad c1494c99c6 Use sysctl to fetch IP, ICMP, TCP, and UDP statistics. 2005-08-06 17:58:13 +00:00
rpaulo 9ce7ce6bf0 Added #include <kvm.h> since netstat.h, which is included too, needs it. 2005-08-04 19:41:28 +00:00
martin ee9d1625eb Make it compile on ports where u_quad_t is not printf-format-compatible
with unsigned long long.
2004-09-06 14:51:32 +00:00
manu 753bcaf581 IPv4 PIM support, from the submission of Pavlin Radoslavov on tech-net@ 2004-09-04 23:35:43 +00:00
itojun cf6b841417 print stat for TCP MD5 signature 2004-05-18 14:44:41 +00:00
enami 52b6a13784 Print ips_rcvmemdrop and ips_nogif. 2003-10-17 22:28:11 +00:00
itojun 0162be23d0 synchronize w/ inpcb/in6pcb change 2003-09-04 09:23:35 +00:00
agc 89aaa1bb64 Move UCB-licensed code from 4-clause to 3-clause licence.
Patches provided by Joel Baker in PR 22365, verified by myself.
2003-08-07 11:13:06 +00:00
he 80ccb5520c As a temporary workaround, apply the fix from PR#20390, thereby
cooperating with the callout code in working around the race
condition caused by the TCP code's use of the callout facility.

Instead of unconditionally releasing memory in tcp_close() and
SYN_CACHE_PUT(), check whether any of the related callout handlers
are about to be invoked (but have not yet done callout_ack()), and
if so, just mark the associated data structure (tcpcb or syn cache
entry) as "dead", and test for this (and release storage) in the
callout handler functions.
2003-07-20 16:35:07 +00:00
itojun 417386ecc9 strlcpy 2003-07-12 13:38:10 +00:00
jdolecek 842b4adcdc it's not necessary to limit the service name artificially to 8 characters
in inet*print() - only first 'width' characters of the 'host.service'
string would be printed anyway, so allow full service name if string would fit
2003-03-22 15:18:36 +00:00
thorpej 9abf2fa449 Update for callout changes, and show TCP timers in relative, rather
than absolute ticks.
2003-02-04 01:22:08 +00:00
thorpej 7d9af30957 Test CALLOUT_PENDING, not CALLOUT_ACTIVE. 2003-02-03 23:37:09 +00:00
itojun 3e7ae517e0 path MTU discovery blackhole detection.
PR 12790 (sorry for not committing it for a long time)
2002-05-26 16:05:43 +00:00
lukem e16c1d5cbc if not -n and the local socket doesn't have INP_ANONPORT set, always try
to determine the symbolic name of the foreign port.

previously the foreign port would be displayed numerically in this case if
the local & foreign ports were different.  this particular behaviour was
added in rev 1.28 when I added INP_ANONPORT support from FreeBSD, and for
the life of me I can't fathom the rationale for it ;-|
2002-02-27 02:33:51 +00:00
thorpej daa2a3c1a7 Fix a printf format/argument cast. 2001-09-15 16:28:15 +00:00
thorpej 9c5f5108f7 tcp_dump(): Also print the address of the in6pcb. 2001-09-10 22:19:03 +00:00
thorpej 2807c29a57 Update for TCP timer changes. 2001-09-10 22:17:28 +00:00
thorpej 2dcc5d04ec Update for field name changes in struct tcpcb. 2001-09-10 15:25:24 +00:00
assar 7aedc79d5e add `-s' that prints port numbers symbolically but addresses numerically 2001-05-28 04:22:55 +00:00
itojun ea6a7c4787 pedant changes for strcpy/sprintf. 2001-04-06 05:10:28 +00:00
itojun dd99f85c8e add few icmp type names.
http://www.isi.edu/in-notes/iana/assignments/icmp-parameters
2001-03-20 17:00:08 +00:00
itojun 7806b5d1f3 increase ipstat.ips_badaddr if the packet fails to pass address checks. 2001-03-02 04:26:10 +00:00
itojun 9e8a83c2a4 count successful path MTU changes. good for debugging.
(there could be some discussion on when to increase the counter...)
2000-10-18 19:20:02 +00:00
jhawk b70721109d Add kernel counters for arp events, displayable with netstat -s -f arp 2000-08-15 20:24:57 +00:00
enami ed2b9a81c5 Backout part of rev 1.29 which doesn't match with the log message. 2000-07-03 05:02:38 +00:00
itojun 9da359bbec revise IPsec, pfkey, IPv6 multicast and IPv6 statistics. (sync with kame) 2000-02-26 09:55:24 +00:00
bouyer f7e8e4aebd Change printf formats for 64bit counters. 1999-11-19 10:44:33 +00:00
itojun 414ee1ddfb make netstat IPv6-ready. 1999-07-01 18:40:35 +00:00
thorpej c11fe1ae79 Print SYN,ACK retransmission statistics. 1999-04-29 03:58:27 +00:00
lukem 2a6a3d1a76 rework so that `-A -n' won't truncate the `ipaddr.port' fields, by displaying
an abbreviated state column in that case (to fit in 80 columns)
1999-02-18 07:42:12 +00:00
ross f670fa10c5 Add { and } to shut up egcs. Reformat the more questionable code. 1998-08-25 20:59:36 +00:00
sommerfe aecb58fd13 Fix bogon in length argument to snprintf when formatting port number 1998-07-20 21:03:37 +00:00
mrg efa1d2c3a5 - KNF
- use err(3)
- sprintf/strcpy -> snprintf/strncpy
- change route.c:domask() to take a size_t of the buffer passed.
1998-07-12 03:20:13 +00:00
mrg 2beab49a06 - use an array MAXHOSTNAMELEN+1 size to hold hostnames
- ensure hostname from gethostname() is nul-terminated in all cases
- minor KNF
- use MAXHOSTNAMELEN over various other values/defines
- be safe will buffers that hold hostnames
1998-07-06 06:45:41 +00:00
thorpej 66012e9fca Add an option to dump the contents of a PCB at the specified address, and
implement this for TCP.
1998-06-03 02:41:10 +00:00
matt c3ef9d7317 Add support for printing fast forwarded packets. 1998-04-29 21:39:38 +00:00
lukem 11cfadcaa1 if INP_ANONPORT is set in the pcb, don't getservbyport the local port,
as the service name is irrelevent. from freebsd
1998-01-07 22:55:07 +00:00