Commit Graph

451 Commits

Author SHA1 Message Date
christos f8128537a0 adjust to the netname4 prototype. 2015-01-07 22:43:01 +00:00
christos df51b41a7f PR/47704: Takahiro HAYASHI: Fix -L flag 2014-11-12 03:34:59 +00:00
christos e2c137d286 fix A,v,T with route display. 2014-11-07 12:42:27 +00:00
christos 34cb342199 use the common code from route.c 2014-11-06 21:30:09 +00:00
wiz 9ff8e27788 Give flag argument in description. Add two articles. 2014-10-11 09:23:32 +00:00
enami 2858bdfe72 - Explicitly describe that kvm(3) is used when -M/-N option is used since
nowadays sysctl(3) is the default information retrieval method.
- Fix description about default value for -N; it is no longer a single value
  these days, so just say see kvm_openfiles(3) rahter than repeating
  several lines description here.
2014-10-11 06:25:32 +00:00
enami 7bed5ae0f8 As described in kvm_openfiles(3), default core file is not /dev/kmem
but /dev/mem.  Actually, passing /dev/kmem to -M doesn't work.
2014-10-09 23:52:47 +00:00
enami e36fe94f89 Fix a bug introduced in rev. 1.62; it fails to negate (a && b). 2014-10-09 23:45:47 +00:00
dholland 0858ed9253 Fix snprintf usage; from Henning Petersen in PR 47976. 2014-07-27 04:26:23 +00:00
rmind 2286cc983b netstat(1) and ifmcstat(8): ifnet was renamed to ifnet_list, PR/48850. 2014-05-30 01:44:21 +00:00
christos 12014f31d7 use the same for the route metrics part, both in the sysctl and kmem paths.
From Takahiro HAYASHI
2014-04-28 15:41:15 +00:00
christos a2dd64f9b4 The sysctl code does not support verbose route printing that prints the
internal route statistics. Restore the old kmem route printing code that
was not just used for post-mortem displays. Reported by kardel@, test by
netstat -nrvf inet
2014-04-24 14:56:29 +00:00
christos 7cdbcec7f5 un __P 2014-04-24 14:54:51 +00:00
christos 30107bf0d8 Update for new pcb tailq's.
While here fix ipv6 pcb printing by making tcp6_dump with tcp.
XXX: Merge the inet and the inet6 code. It is silly to need to specify
-p tcp6 to print a tcp6 pcb, we already know what it is.
2013-11-23 22:01:12 +00:00
christos 04908d82dd use correct function and symbolic constants 2013-10-19 15:56:05 +00:00
christos 35be7e66a7 use new scopeid functions 2013-10-19 00:28:38 +00:00
bad 87c60cd65e Make the -f option accept multiple address families.
Bump man page date.
2013-10-18 22:18:14 +00:00
christos 15a5bba97c - avoid pointer gymnastics
- remove unused variables
2013-10-18 20:26:45 +00:00
martin a4110c4cbe Not all pointers are 64bit - use uintptr_t instead of uint64_t. 2013-06-20 10:43:18 +00:00
christos 08c3d981c5 Don't use -P as a kmem printer, verify that the address points to a pcb first! 2013-06-19 21:12:03 +00:00
christos 7ed35ab90d PR/47744: Frank Kardel: netstat -s stops output prematurely when ipsec is not
compiled.
If the first sysctl fails return silently.
XXX: pullup-6
2013-04-15 21:20:39 +00:00
joerg e240adbd0b Retire OSI network stack. OK core@ 2013-03-01 18:25:13 +00:00
joerg 438eb8acb3 Use sysctl based code netstat -r. Remove support for post-mortem
analysis.
2013-01-28 13:49:08 +00:00
msaitoh fd52732c92 Fix memory leak. 2012-12-14 08:15:44 +00:00
msaitoh 79efc68e80 Add -t flag. 2012-10-19 20:46:06 +00:00
msaitoh c370a471ff Add note about -l option. Fixes PR#47085 reported by Julian Fagir. 2012-10-19 20:43:31 +00:00
msaitoh fe467d4df9 Line up total numbers again (for -b case and -X case). 2012-10-19 19:50:19 +00:00
pgoyette 000a3dc38f Sort -h option properly (not between -I and -i)
XXX Should the date be updated?
2012-09-25 14:16:27 +00:00
drochner 364a06bb29 remove KAME IPSEC, replaced by FAST_IPSEC 2012-03-22 20:34:37 +00:00
matt d34c2845b8 Use C89 function definitions 2012-03-20 20:34:57 +00:00
christos 0cdb0b2663 PR/44889: Yamamoto Takashi: netstat -d option is broken (from Elad) 2012-02-12 19:11:33 +00:00
drochner 892b9bad57 split the ipsec.c source file into the pfkey part which is shared
with FAST_IPSEC and KAME specific IPSEC statistics
2012-01-06 14:21:16 +00:00
drochner 47a381e15e more IPSEC header cleanup: don't install unneeded headers to userland,
and remove some differences berween KAME and FAST_IPSEC
2012-01-06 14:17:10 +00:00
christos de766f5829 use the names from the include files. 2011-12-24 20:18:35 +00:00
gdt c9bfbf1142 Move RTF_ANNOUNCE flag so that it no longer conflicts with RTF_PROTO2.
RTF_ANNOUNCE was defined as RTF_PROTO2.  The flag is used to indicated
that host should act as a proxy for a link level arp or ndp request.
(If RTF_PROTO2 is used as an experimental flag (as advertised),
various problems can occur.)

This commit provides a first-class definition with its own bit for
RTF_ANNOUNCE, removes the old aliasing definitions, and adds support
for the new RTF_ANNOUNCE flag to netstat(8) and route(8).,

Also, remove unused RTF_ flags that collide with RTF_PROTO1:
  netinet/icmp6.h defined RTF_PROBEMTU as RTF_PROTO1
  netinet/if_inarp.h defined RTF_USETRAILERS as RTF_PROTO1
  (Neither of these flags are used anywhere.  Both have been removed
  to reduce chances of collision with RTF_PROTO1.)

Figuring this out and the diff are the work of Beverly Schwartz of
BBN.

(Passed release build, boot in VM, with no apparently related atf
failures.)

Approved for Public Release, Distribution Unlimited
This material is based upon work supported by the Defense Advanced
Research Projects Agency and Space and Naval Warfare Systems Center,
Pacific, under Contract No. N66001-09-C-2073.
2011-11-11 15:09:32 +00:00
shattered 8836963d2f PR/43968 -- add 'segqlen' of TCPCB to 'netstat -P'.
OK by wiz@
2011-10-04 21:12:40 +00:00
joerg 6818646ac8 Use __dead 2011-09-16 15:39:25 +00:00
christos aab2693089 document non-literal format strings 2011-08-16 12:03:31 +00:00
njoly 58b2cc408f Use errx() to display kvm_openfiles error message, the provided buffer
already has it.
2011-07-17 10:22:07 +00:00
wiz 322aa1720c New sentence, new line. 2011-06-21 20:51:27 +00:00
kefren f881c97d31 add a sentence regarding multiple tags 2011-06-21 19:46:36 +00:00
kefren 214feb60c7 print multiple tags if exists, comma separated 2011-06-21 19:42:45 +00:00
manu 1b0d8e317f Display SOCK_SEQPACKET local sockets in sockstat and netstat 2011-05-29 04:45:08 +00:00
drochner 0a8dabda40 pull in AES-GCM/GMAC support from OpenBSD
This is still somewhat experimental. Tested between 2 similar boxes
so far. There is much potential for performance improvement. For now,
I've changed the gmac code to accept any data alignment, as the "char *"
pointer suggests. As the code is practically used, 32-bit alignment
can be assumed, at the cost of data copies. I don't know whether
bytewise access or copies are worse performance-wise. For efficient
implementations using SSE2 instructions on x86, even stricter
alignment requirements might arise.
2011-05-26 21:50:02 +00:00
joerg a216da57a6 Default to -Wno-sign-compare -Wno-pointer-sign for clang.
Push -Wno-array-bounds down to the cases that depend on it.
Selectively disable warnings for 3rd party software or non-trivial
issues to be reviewed later to get clang -Werror to build most of the
tree.
2011-05-26 12:56:24 +00:00
drochner ebc232a582 copy AES-XCBC-MAC support from KAME IPSEC to FAST_IPSEC
For this to fit, an API change in cryptosoft was adopted from OpenBSD
(addition of a "Setkey" method to hashes) which was done for GCM/GMAC
support there, so it might be useful in the future anyway.
tested against KAME IPSEC
AFAICT, FAST_IPSEC now supports as much as KAME.
2011-05-24 19:10:08 +00:00
spz 5f1fd2312c RA flood mitigation via a limit on accepted routes:
- introduce a limit for the routes accepted via IPv6 Router Advertisement:
  a common 2 interface client will have 6, the default limit is 100 and
  can be adjusted via sysctl
- report the current number of routes installed via RA via sysctl
- count discarded route additions. Note that one RA message is two routes.
  This is at present only across all interfaces even though per-interface
  would be more useful, since the per-interface structure complies to RFC2466
- bump kernel version due to the previous change
- adjust netstat to use the new value (with netstat -p icmp6)
2011-05-24 18:07:11 +00:00
drochner cfdc35650d report aes-ctr statistic counter by name 2011-05-23 14:29:55 +00:00
dyoung 0d0dd0e146 Suppress whitespace at EOL to fix lib/librumphijack/t_tcpip. 2011-05-11 22:21:59 +00:00
drochner 4f6bdd19b5 use getmicrouptime(9) rather than microtime(9) for TIME_WAIT duration
calculation, because this doesn't get confused by system time changes,
and uses less CPU cycles
reviewed by dyoung
2011-05-11 15:08:59 +00:00