summaryrefslogtreecommitdiffstats
path: root/usr.bin/netstat/route.c (follow)
Commit message (Collapse)AuthorAgeFilesLines
* Delete superfluous #includes of <ifaddrs.h>, <net/if_dl.h>, and <net/if_enc.h>guenther2019-05-101-2/+1
| | | | ok krw@, jsg@
* Fix reading route entries via kvm(3).mpi2019-04-281-159/+169
| | | | From Naoki Fukaumi, ok yasuoka@, sthen@
* dont #define _KERNEL around some #includesdlg2016-09-151-3/+1
| | | | | | | | | the data structures are now readable without _KERNEL needing to be defined. ok deraadt@ there's probably a lot more of these that can be cleaned up if anyone is interested in looking into it.
* Pull in <sys/select.h> for howmany() and NBBY, used by various net*/*.hguenther2016-08-271-1/+2
| | | | ok deraadt@
* Print the interface index, we no longer have a pointer to the interface.mpi2015-12-031-9/+3
| | | | Found the hardway by deraadt@
* Switch the printing of open sockets from ugly KVM internals to useclaudio2015-02-121-14/+9
| | | | | | | | kvm_getfiles. This allows to run netstat without any extra privileges and removes another setgid program from base.. There is still kvm reader code in there which is used for debugging purposes (crashdump). netstat should still behave mostly the same. deraadt@ and sthen@ agree that it is time to get this puppy in.
* Remove route/netstat -f encap in favor of ipsecctl -s flow.reyk2015-02-061-135/+2
| | | | OK deraadt@
* First step of hiding many kernel-only parts of <netinet/ip_ipsp.h>deraadt2015-01-191-2/+2
| | | | | | under _KERNEL, and adjust the one consumer (netstat) so that it requests the exposure. Will take a few more rounds to get this right. ok mikeb
* Replace <sys/param.h> with <limits.h> and other less dirty headers wherederaadt2015-01-161-2/+2
| | | | | | | | | possible. Annotate <sys/param.h> lines with their current reasons. Switch to PATH_MAX, NGROUPS_MAX, HOST_NAME_MAX+1, LOGIN_NAME_MAX, etc. Change MIN() and MAX() to local definitions of MINIMUM() and MAXIMUM() where sensible to avoid pulling in the pollution. These are the files confirmed through binary verification. ok guenther, millert, doug (helped with the verification protocol)
* not necessary to define INET anymoretedu2014-12-261-5/+1
|
* netstat -Ar leaked some kernel pointers to unprivileged users. Usebluhm2013-11-251-5/+6
| | | | | hideroot to show them only to root. OK deraadt@
* split kernel parts of the if.h into a separate header file if_var.hmikeb2013-11-211-1/+2
| | | | | which allows us to modify ifnet structure in a relatively safe way; discussed with deraadt, ok mpi
* Prepare netstat for printing 64 bit route expire time.bluhm2013-09-291-3/+3
| | | | OK claudio@
* As non-root, whenever netstat is about to print out a kernel pointer...deraadt2013-03-201-6/+9
| | | | print 0x0 instead. Hides a lot stuff people don't need to see.
* sys/mbuf.h not neededderaadt2013-01-161-2/+1
|
* Avoid using NULL in non-pointer contexts: use 0 for integer values and '\0'miod2011-04-061-3/+3
| | | | for chars.
* fix some warnings. there are others, but nobody wants to look at them.tedu2009-08-041-2/+2
| | | | ok deraadt
* There is no need to mask priority with RTP_MASK because it is already doneclaudio2009-05-311-2/+2
| | | | by the kernel.
* Make the kvm routing table code grok multiple routing tables and do notclaudio2009-05-071-3/+8
| | | | | default to table 0 by default. Makes debugging alternate tables possible. OK jsg@
* Make the -A a bit more readable by adding a newline between the route andclaudio2009-01-281-2/+2
| | | | mk list.
* the extra kget() macro just befuddles the things we need to replace with a sysctl mechanism laterderaadt2008-11-091-20/+18
|
* Similar to route(8) change mask rtm->rtm_priority with RTP_MASK to showclaudio2008-09-151-2/+2
| | | | correct values. OK henning@
* Include some additional pointers, etc that I really need for debuggingclaudio2008-06-131-4/+9
| | | | | nasty routing table issues. Mainly the pointer to the previous node. OK henning@
* remove a rather silly comment.claudio2008-06-131-2/+2
|
* Let the kvm output of netstat grok rt priorities like the "normal" show code.claudio2008-06-131-4/+5
|
* Remove the kvm code in rt_stats() and use the sysctl code all the time.claudio2007-12-191-20/+14
| | | | | | While there remove the ugly rflag checks and make it more consistent with the rest of the code. Another step in making netstat setgid free. OK deraadt@
* delete rcsid crudderaadt2007-12-191-9/+1
|
* remove 21 nlist variables, and instead use sysctl to query the kernelderaadt2007-12-141-8/+3
| | | | | turn on INET6 the default (remove the #ifdef's) ok claudio reyk
* Correct the format strings after the recent rt_metrics changes.claudio2007-09-051-4/+4
| | | | rmx_pksent is not u_int64_t all others are just u_int.
* change semantics of ff01::/16 to interface local multicastitojun2006-11-171-6/+10
| | | | | | (to sync up with more recent IPv6 spec) ok from: deraadt mcbride
* Fix KVM snooping code of netstat that got broken by the multiple tableclaudio2006-08-291-12/+39
| | | | "support". This makes netstat -A work again. OK markus@ henning@
* Moving netstat from kvm snooping to retrieving the routing tables viaclaudio2006-05-271-647/+50
| | | | | sysctl. Most code is stolen from route -- which was stolen from netstat. kvm snooping code is still in and useable. Put it in deraadt@ henning@
* use "/bypass" instead of "/permit" when showing bypass flowshshoexer2006-04-121-3/+3
| | | | ok henning claudio
* bye bye, Xerox NS protocolshenning2005-06-081-80/+2
|
* remove tiny AF_CCITT tracehenning2005-06-071-5/+2
|
* kill -S; ok henningjaredy2005-03-301-30/+4
|
* kill unneeded (char *) casts. ok millert, ottojaredy2005-03-251-5/+5
|
* remove NI_WITHSCOPEID (which is not standard)itojun2004-11-171-10/+3
|
* the default route is exactly 0.0.0.0/0, and nothing else. stop ignoringhenning2004-10-151-6/+4
| | | | | the netmask, do not print a 0.0.0.0/32 route as "default"; it is not. neither is 0.0.0.0/24.
* Add new '-S' flag to display the source selector part of the routing tablecedric2004-06-061-5/+31
| | | | entry. "netstat -nrSf inet". ok deraadt@ mcbride@
* The tcp specific routing metrics are almost never used so reduce the routingclaudio2004-05-041-19/+5
| | | | | | | table from these metrics. struct rt_msghdr used by the routing socket is not affected and so most userland apps don't need to be changed. some man page polishing by jmc@ OK henning@ markus@ theo@
* some NULL vs 0 and knf; parts from nimadeus@pandora.bederaadt2004-03-131-6/+6
|
* Fix printf formats and add missing include.otto2004-01-131-2/+3
| | | | ok mcbride@ deraadt@
* missing free(). Andrey Matveev via deraadt@. ok deraadt@tedu2003-10-071-2/+3
|
* oopsderaadt2003-10-041-3/+3
|
* tweaks from andrushock@korovino.netderaadt2003-10-041-7/+4
|
* deal with KAME embedded scope-id for PF_KEY (Encap) route dump. deraadt okitojun2003-10-031-2/+38
|
* RNF_IGNORE can corrupt the radix tree when an interface is down, ithenric2003-08-271-5/+3
| | | | | | | makes routing lookups slightly more expensive, and serves no useful purpose. ok itojun@ tedu@
* mark cloned route with RTF_CLONED. remove RTF_CLONED route when clone parentitojun2003-08-261-3/+4
| | | | disappers. deraadt ok
* more proto fixesderaadt2003-06-261-4/+4
|