itojun
8b2de4271e
use NI_WITHSCOPEID when printing multicast group with -inav.
2000-02-09 13:57:06 +00:00
itojun
9fb53279e8
print IPv6 scopeid on -inv. with -in, scopeid is omitted due to insufficient
...
width.
2000-02-05 17:39:22 +00:00
itojun
4978f056f6
better sync with #ifdef notdef part (in -i for AF_INET).
2000-01-25 16:07:13 +00:00
itojun
5fa65dbb58
don't truncate IPv4 entries on -i (with -v). it is mainly for
...
"Network" column (13 digits, it will be 18 digits in maximum).
2000-01-25 15:56:55 +00:00
itojun
e30f445f00
print IPv6 multicast group on -ia (-iav will avoid truncation)
2000-01-17 18:24:37 +00:00
itojun
08de376ec3
fix default route determination for inet6.
2000-01-17 18:03:51 +00:00
itojun
ccef23e54a
mask addresses properly on netstat -inv.
...
From: Matt Thomas <matt@3am-software.com>
2000-01-17 17:54:56 +00:00
hubertf
e27fbcf4a2
Properly print the "B"(lackhole) flag (as documented :).
...
Patch submitted in PR 9190 by URA Hiroshi <ura@hiru.aoba.yokohama.jp>
2000-01-15 01:39:54 +00:00
sommerfeld
c657ebbc95
Pay attention to the netmask of routes to 0.0.0.0;
...
e.g., a route to 0.0.0.0/1 is *not* a default route.
Inspired by a patch by Rodney Grimes sent to the zebra list.
2000-01-07 04:49:11 +00:00
thorpej
2b9d9a9499
Make this compile on the Alpha again.
1999-12-16 00:58:17 +00:00
itojun
033763d6c9
per-interface statistics.
...
bring in and enable KAME scopeid hack.
lots of cleanups.
(sync with latest KAME)
1999-12-13 15:22:55 +00:00
tron
b11e523694
Define "_KERNEL" not "KERNEL" before including "netinet6/ip6_mroute.h".
1999-12-02 14:31:22 +00:00
soren
819a9c5fd3
Print Internet6 header properly without -f.
1999-11-27 02:19:34 +00:00
itojun
d8470360b1
more clarification to field width of netstat -rn -f inet6.
1999-11-24 08:45:43 +00:00
itojun
22758aaba3
use old WID_{DST,GW} value (field width for netstat -rn) for non-INET6
...
address families (see tech-net discussion).
1999-11-22 14:13:53 +00:00
bouyer
f7e8e4aebd
Change printf formats for 64bit counters.
1999-11-19 10:44:33 +00:00
is
cef52aa203
Add -L option. netstat -r -L behaves like 4.3BSD netstat -r, that is, it
...
does not show route table entries pointing to link level addresses (ARP
entries or IPv6 neighbour discovery entries).
1999-09-15 20:12:18 +00:00
is
4d1abcb145
Netstat knows about "-f inet6".
1999-09-15 19:57:02 +00:00
dbj
e1c216bcdf
RTF_PROTO1 is indicated by the flag '1' and RTF_PROTO2 is indicated by the flag '2',
...
not the other way around
1999-09-12 02:33:43 +00:00
itojun
f84fab5af8
sync with recent KAME.
...
- fix routing socket align issue on 64bit arch.
- avoid s6_addr{8,16,32}, which are nonstandard.
1999-09-03 04:26:31 +00:00
cgd
f33ac29caa
not all kvm_getfiles() errors are "out of memory." for instance,
...
some of them are caused by the kvm_getfiles() implementation being
TOTALLY BROKEN for dead kernels. Print out the KVM descriptor's
error so that error causes are more easily diagnosed.
1999-08-19 06:13:09 +00:00
itojun
5413fa8362
do not include netinet/in6_systm.h, which has been empty for a while.
1999-07-30 10:31:22 +00:00
thorpej
00fb13f649
Revert previous, as it merely worked around a recent bug in make(1) which
...
is now fixed.
1999-07-12 18:17:56 +00:00
itojun
e56c252759
make sure to use files in ${.CURDIR} before ${.CURDIR}/../../sys/netiso.
...
(namely iso.c)
1999-07-12 17:53:42 +00:00
itojun
5d56439d90
merge SRCS into one.
1999-07-12 17:48:45 +00:00
itojun
26c3d764fd
add NetBSD RCS ID.
1999-07-06 13:14:54 +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
hubertf
a8aaa73992
Remove duplicated if() statementA.
...
This fixes PR 7308 by Feico Dillema <feico@pasta.cs.uit.no>
1999-04-02 22:45:45 +00:00
chopps
005cdfb516
don't use malloc for large sockaddr's, just name the union declared above
1999-04-02 20:13:40 +00:00
chopps
87af70d729
user err() not errx()
1999-04-01 23:12:30 +00:00
chopps
3357b52e9b
fix for sockaddr's that are bigger than standard sockaddr's (e.g., iso)
1999-04-01 08:14:11 +00:00
thorpej
ed8849cd5a
Define __POOL_EXPOSE to get at the guts of the pool descriptor.
1999-03-31 23:25:46 +00:00
garbled
9e44e9b578
More and more .Os cleanups. .Os is defined in the tmac.doc-common file,
...
so we shouldn't override it with versions in the manpages. Many more to
come.
1999-03-22 18:16:34 +00:00
mycroft
58e1f7b9b0
Make the damned columns line up.
1999-03-14 22:28:05 +00:00
kristerw
010cbdf92e
There is no -h flag. From OpenBSD.
1999-03-14 18:30:04 +00:00
sommerfe
b36297112e
fix PR7057: division by zero if no mbufs allocated
...
fix PR7059 (partial): mbuf cluster counts were based on counters which
are no longer maintained.
(full fix will involve renaming the now-unused fields in mclstat in mbuf.h)
1999-02-27 17:37:24 +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
explorer
6817ae8cab
fix dumping of pcbs
1999-02-08 11:34:36 +00:00
lukem
266beeb0be
remove sentence consistenting solely of "When"
1999-02-02 13:35:56 +00:00
kml
783ac03fcf
Added a verbose flag for route display that will show
...
the various route metrics.
1999-01-15 19:06:25 +00:00
mrg
a112081f50
#ifndef SMALL changes. saves 30k on the sparc
1999-01-11 12:31:53 +00:00
abs
e516980de2
Apply (slightly modified) patch from 5543 to fix -s behaviour for netatalk.
1999-01-06 05:57:29 +00:00
pk
66bc493d73
Make a network number by shifting out host bits in octet units.
...
This is currently required still to get correct lookups in `/etc/networks'.
1998-12-05 13:14:04 +00:00
msaitoh
8240966355
fix invalid shift. colsed PR#5160.
1998-11-23 10:17:12 +00:00
mrg
3adcd350ed
put all the different struct sockaddr_xxx types into the union pt_u, to force the alignment to be correct for all of them.
1998-10-31 06:42:22 +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
lukem
f09ed79388
use AF_LOCAL instead of AF_UNIX. support -f local as synonym for -f unix
1998-07-18 05:04:10 +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
80efe80bc9
- change setgid kmem programs (that lend themselves to this) so setegid(getgid())
...
and the top, and then set the effective gid back to kmem around the call to
kvm_openfiles(). this reduces the time group kmem is available.
- for those above that also allow this, setgid(getgid()) after the call to
kvm_openfiles() to fully revoke priviledges.
- some KNF
- use err(3) over fprintf(3) in some places
1998-07-06 07:50:18 +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
kml
78c488bad7
Partial fix for PR kern/5435 -- changed netstat to use unsigned counters
...
instead of signed. The rest of the fix will have to wait for 64-bit counters.
1998-05-14 22:48:49 +00:00
kml
3c3dcf9966
Ensure that the 'L' lock flag for MTU is always displayed when present.
1998-05-14 20:55:51 +00:00
matt
c3ef9d7317
Add support for printing fast forwarded packets.
1998-04-29 21:39:38 +00:00
kml
9433195784
Add support for a '-b' option to provide byte counts in and out,
...
instead of just packet counts. On the byte screens, errors and
collisions are not shown, since they are more packet count related.
1998-03-19 02:42:57 +00:00
frueauf
feff15ad4a
s/_offsetof/offsetof and include stddef.h to reflect recent
...
change in sys/netiso/iso.h.
1998-01-29 09:11:21 +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
thorpej
a9f58b2ca8
Print the connections dropped due to excessive persist timeouts.
1997-12-17 06:17:26 +00:00
thorpej
d673bd5c41
Nuke "delayed window updates" statistic.
1997-12-13 21:03:46 +00:00
thorpej
76de9752dd
Print window updates delayed (piggybacked on delayed ACKs).
1997-12-11 07:00:01 +00:00
thorpej
4047416683
Report connections drained due to memory shortage.
1997-12-10 07:26:02 +00:00
kml
9633603853
Added (and documented) a change to the route display, so that mtu values
...
which have been locked are indicated by an 'L' appended to the MTU value.
Locked routes have path mtu discovery turned off.
1997-10-28 22:38:42 +00:00
mrg
9395f04c8b
fix compile warnings on the sparc.
1997-10-20 10:32:06 +00:00
lukem
e55eeec2c5
fix up .Nm usage, getopt returns -1 not EOF
1997-10-19 05:49:56 +00:00
mikel
c106897e5e
add 'atalk' to list of arguments recognized by -f, minor cleanup
1997-08-01 05:03:14 +00:00
thorpej
b3fb623d7f
Pull SYN_cache_branch down onto the main line.
1997-07-23 21:31:27 +00:00
christos
aef7001870
PR/3660: Dave Huang: Fix formatting misalignments in appletalk
...
PR/3659: Dave Huang: Fix PCB reporting in appletalk
1997-05-22 17:21:26 +00:00
gwr
10e180cc49
Back out the .PATH.c changes. The .depend problem (and others)
...
will be fixed using the new .NOPATH make feature instead.
1997-05-08 21:11:01 +00:00
gwr
012e528f2e
Use .PATH.c: ...
1997-05-06 20:44:56 +00:00
christos
38ec358de7
Make the first field 2 characters wider so that XXX.XXX.XXX.XXX/XX fits.
...
From Kimmo
1997-04-10 15:45:58 +00:00
mikel
3bafb68ebf
more column alignment fixes
1997-04-07 06:58:18 +00:00
christos
5fe1aec948
PR/3451: Anders Hjalmarsson: Column alignment fixes after the netatalk addition.
1997-04-07 03:04:24 +00:00
christos
c3a7122e73
- netatalk additions
...
- printf format fixes
- minor prototype cleanups
1997-04-03 04:46:44 +00:00
thorpej
87ca1d62e0
Print Ethernet and FDDI addresses in the same format as ether_ntoa().
...
From Matt Thomas <matt@3am-software.com>
1997-03-26 01:49:44 +00:00
mycroft
19d55000f7
Get the byte-swapping right in netmask().
1997-03-18 03:40:10 +00:00
jonathan
f0f7e53290
Add compiled-in MCLBYTES and MSIZE to conf/param.c, as 'mclbytes" and "msize".
...
Add code to netstat to use libkvm to for kernel variables "mclbytes"
and "msize', and if found, use those for netstat -m rather than
compiled-in defaults.
1997-02-28 00:14:19 +00:00
mikel
5ca01fc0a4
Don't assume that sun_path in sockaddr_un is null-terminated; final fix by
...
Noriyuki Soda <soda@sra.co.jp>. fixes part of PR 3035.
1997-02-27 05:41:19 +00:00
mellon
8040aaffba
ns_print: fix type conflict
1997-01-02 08:06:24 +00:00
mellon
9209b257a5
ns_print: undo bogus type conflict
1997-01-02 08:04:26 +00:00
mellon
d8671bd736
Lite2 Merge
1997-01-02 08:00:55 +00:00
neil
36139c4647
errors not generated 'cuz old message was icmp -> [EWW!]
...
errors not generated because old message was icmp
1996-12-09 12:48:37 +00:00
thorpej
2ea1f6b673
Add the `toolong' count to the IP stats display.
1996-10-25 07:41:35 +00:00
explorer
3f3e868348
use %lu, not %u. This covers more than my original %d -> %u change...
1996-10-08 01:18:10 +00:00
explorer
3d7986bab5
Netstat -s should use %u for u_long parameters... Closes bin/2817 by me
1996-10-07 18:42:25 +00:00
thorpej
5db2537ade
Fix missing `)' in the sideways view of interfaces (i.e. netstat -w 1).
...
Bug pointed out by Chris G. Demetriou.
1996-06-07 21:43:26 +00:00
cgd
207dfda94d
bump MAXIF (the maximum number of interfaces for which information is kept,
...
for 'netstat -w <delay>') to 100, from 10. 10 was definitely not sufficient
for many hosts; 100 should be for most if not all. This code really should
dynamically allocate the information structures, based on the number of
interfaces in the kernel, account for interfaces that are added or removed,
etc., but given its current structure that would require substantial changes.
1996-06-04 20:22:23 +00:00
cgd
525c9d6e37
if doing 'netstat -I <intf> -w <delay>', and netstat can't find an
...
interface of the given name, print an error message and exit.
This whole section of code needs to be re-thought, if interfaces
can be dynamically added or removed.
1996-06-04 20:09:03 +00:00
mycroft
445ad1968f
Make this work again.
1996-05-24 11:57:16 +00:00
mycroft
0b70b24514
Avoid spewing if there is no MFC.
1996-05-11 13:51:27 +00:00
thorpej
527565ac15
Kill a couple of unnecessary calls to strlen().
1996-05-07 05:26:02 +00:00
thorpej
22afdc2c33
Update for the changes to struct ifnet. While I'm here, fix a couple
...
of long-standing bugs:
- Actually deal with the fact that the kernel ifnet list is
a TAILQ; it just happened to work before.
- Use kvm_openfiles() instead of kvm_open(). The code passed
arguments to kvm_open() as if it were kvm_openfiles(), but
apparently went unnoticed since the prototypes are the same.
Amusing bit: there were XXX's in the code which seemed to
apologize for a verbose libkvm, when it happened to be a
bug in netstat!
1996-05-07 02:55:00 +00:00
mycroft
d4b276c3d5
Update to match kernel.
1996-01-31 04:01:48 +00:00
jtc
3384b51b0b
Implement change done in revision 1.12 (for PR #1473 & duplicates) in a
...
slightly different way. This widens the Address field instead of the
Ipkts field because Address is the one that may be too big.
1995-10-17 07:17:04 +00:00
thorpej
67f6822225
New-style RCS ids.
1995-10-03 21:42:34 +00:00
jtc
4d8e53d69f
Change formatting so that columns line up; PR #1473 + several duplicates
1995-09-28 06:22:54 +00:00
jtc
519b2df4b4
iostat is in section 8; PR #1533
1995-09-27 19:43:28 +00:00
jtc
8ba230d554
vmstat is in section 8; PR #1532
1995-09-27 19:20:24 +00:00
mycroft
d7b28f05aa
Garbage collect mbuf types.
1995-08-17 03:24:54 +00:00
mycroft
9094d0cb63
Garbage collect mbuf types.
1995-08-17 03:23:40 +00:00
thorpej
7df5d8b0ec
If set, show a route's mtu in the routing table display.
1995-08-10 06:24:52 +00:00
mycroft
01c15f41a0
Byte-swap correctly. Make some types 64-bit safe. Use INADDR_ANY rather
...
than an explicit 0.
1995-07-03 03:25:19 +00:00
mycroft
9086ad07b9
Remove an extra htonl().
1995-07-03 03:16:57 +00:00
cgd
df0183d43f
update for new network structures
1995-06-19 00:13:05 +00:00
mycroft
ee4364cc64
Format the statistics output more like the other protocols.
1995-06-12 03:49:45 +00:00
mycroft
81c2958581
Update to match kernel changes.
1995-06-12 03:03:07 +00:00
cgd
2ef674b932
print out number of malformed fragments dropped
1995-05-14 08:20:16 +00:00
jtc
ae0b9c2010
KERNEL -> _KERNEL
1995-03-28 17:18:59 +00:00
cgd
43f1b4beca
a couple of these need <sys/queue.h>
1994-12-24 17:21:51 +00:00
deraadt
841f975d13
#include <kvm.h> later
1994-11-02 09:20:33 +00:00
mycroft
4f96184b10
Re-enable some ugly ISO code.
1994-10-06 16:30:55 +00:00
mycroft
196ca74efe
Align link address under `Address' header.
1994-09-17 00:14:20 +00:00
jtc
1d1682d63c
vmunix -> netbsd (PR #375 )
1994-08-06 06:11:03 +00:00
deraadt
e5c0834b50
do not need -I/sys
1994-08-03 20:34:13 +00:00
pk
1eacf67a6e
Use ${DESTDIR}/sys in CFLAGS.
1994-08-02 09:35:50 +00:00
brezak
7cb1ad939d
Report wrong interface stats
1994-06-09 16:08:46 +00:00
mycroft
69ae161fd9
Clean up deleted files.
1994-05-13 08:08:24 +00:00
mycroft
d3877f2073
Clean up import.
1994-05-13 08:08:09 +00:00
mycroft
6ca69ffc0e
Initial revision
1994-05-13 08:06:36 +00:00
cgd
ea7e0c1cca
kill lots of off_t's.
1994-04-01 09:18:06 +00:00
cgd
f0a32f8da2
there will be no more /vmunix! from Mark Weaver.
1994-04-01 08:27:29 +00:00
cgd
1e6c1e0ef2
clean up, for off_t... ugliest 'cleaning' possible, i think...
1994-03-28 10:29:31 +00:00
glass
5bee302b77
moved useful contents of netiso/tp_astring.c down
1994-03-26 04:08:45 +00:00
cgd
5dbdc683e6
feedback on the last, from sklower
1994-03-07 09:19:56 +00:00
cgd
a317cb02e3
print netmask properly
1994-03-06 09:45:24 +00:00
deraadt
2a6abdae04
netname() takes a struct in_addr, not an int. Breaks on sparc.
...
fix from Chuck Cranor <chuck@maria.wustl.edu>
1994-03-03 22:03:33 +00:00
cgd
f087cc1d05
fix to print netstat unit number right; from Greenman
1994-02-22 04:19:37 +00:00
jtc
281c9594a0
vmunix -> netbsd
1994-02-03 17:41:21 +00:00
cgd
da1d84230b
needs -lkvm, not -lutil
1994-01-28 00:48:33 +00:00
mycroft
231463b415
Don't print an extra character after a Unix domain socket name.
1994-01-11 23:27:10 +00:00
brezak
4b860495c5
Incorporate changes for IP mcast and IGMP from cmaeda@cs.washington.edu.
1994-01-11 19:42:48 +00:00
cgd
14fc658d66
fix from James Jegers <jimj@miller.cs.uwm.edu>. Netstat -w didn't work
...
(and would seg fault, too). solution: tell getopt to expect an argument,
and set the appropriate flags when -w is given.
1993-12-22 04:00:31 +00:00
mycroft
1b543e994f
Don't generate two warnings if OSI isn't configured in the kernel.
1993-11-03 06:17:08 +00:00
pk
0915419517
-I/sys --> -I${DESTDIR}/sys, to support cross-compilation.
1993-09-25 13:19:49 +00:00
mycroft
e9d867ef50
Add RCS identifiers.
1993-08-01 17:54:45 +00:00
mycroft
c3e42d1c64
Add RCS indentifiers.
1993-08-01 07:22:47 +00:00
mycroft
07832ac9cf
Add RCS identifiers.
1993-07-31 00:20:24 +00:00
paul
f129a8ba77
Included Havard Eidnes' latest changes.
1993-07-11 13:54:14 +00:00
cgd
784b6e7b9d
Remove a couple of warnings, add includes
...
(from Havard Eidnes <Havard.Eidnes@runit.sintef.no>)
1993-05-21 12:51:14 +00:00
cgd
599306af5d
get rid of select.h inclusion, and clean up headers *more*.
1993-05-20 12:03:49 +00:00
cgd
7d313cbd4c
fix for new select & clean up headers
1993-05-20 10:40:48 +00:00
cgd
12dfec7223
fix for new select & clean up headers
1993-05-20 10:40:41 +00:00
cgd
fb8ddd443e
fix from David Burren <davidb@otto.bf.rmit.oz.au> to print address families
...
more nicely, and to print host names when showing routes w/o -n.
1993-05-18 07:15:59 +00:00
mycroft
b64231f035
Reenable NS and ISO code.
1993-05-01 16:26:52 +00:00
mycroft
f5d9fe2b2c
Fix typo.
1993-05-01 16:25:04 +00:00
glass
6b50fbee8d
print out more of the gathered udp stats (actually all of them)
1993-04-26 16:54:54 +00:00
mycroft
7ca0c915de
Cleanup for GCC 2.
1993-04-19 08:00:58 +00:00
cgd
e541169ce2
after 0.2.2 "stable" patches applied
1993-03-21 18:04:42 +00:00