summaryrefslogtreecommitdiffstats
path: root/usr.bin/netstat (follow)
Commit message (Collapse)AuthorAgeFilesLines
* Adjust <sys/param.h> comments regarding use of use of MSIZE, orderaadt2015-01-202-6/+4
| | | | | delete <sys/param.h> if now possible ok guenther
* 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
* _KERNEL 1? no, just _KERNELderaadt2015-01-171-2/+2
|
* Replace <sys/param.h> with <limits.h> and other less dirty headers wherederaadt2015-01-1611-26/+26
| | | | | | | | | 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
|
* remove pointless if_var.h and socketvar.h includes; ok deraadtmikeb2014-11-213-6/+3
|
* i renamed the mbuf pool.dlg2014-11-061-2/+2
|
* Put the socket splicing fields into a seperate struct sosplice thatbluhm2014-11-031-8/+30
| | | | | | | gets only allocated when needed. This way struct socket shrinks from 472 to 392 bytes on amd64. When splicing gets active, another 88 bytes are allocated for struct sosplice. OK dlg@
* remove unused variableschl2014-10-261-4/+1
| | | | ok schwarze@
* Remove networks(5) support.schwarze2014-10-234-43/+17
| | | | | | In particular, do not call getnetbyaddr(3), use gethostbyaddr(3) only. Do not call setnetent(3) and the dummy sethostent(3). OK henning@; and deraadt@ agrees with the general direction.
* No need for <netinet/in_systm.h> nor <netinet/tcpip.h>.mpi2014-08-143-8/+3
|
* Kill bandwidth monitoring meters.mpi2014-08-141-100/+1
|
* #define _KERNEL hack requires ucred.h now as wellderaadt2014-07-101-1/+2
|
* info about pools is currently given to userland by copying eachdlg2014-07-021-6/+6
| | | | | | | | | | | | | | | | | | | | | | | pools struct out. however, struct pool in the kernel contains lots of things that userland probably isnt interested in, like actual mutexes, and probably shouldnt get easy access to, like pointers to kernel memory via all the lists/trees. this implements a kinfo_pool structure that has only the data that userland needs to know about. it cuts the sysctl code over to building it from struct pool as required and copying that out instead, and cuts userland over to only handling kinfo_pool. the only problem with this is vmstat, which can read kernel images via kvm, which needs some understanding of struct pool. to cope, the struct pool definition is guarded by if defined(_KERNEL) || defined(_LIBKVM) as inspired by sysctl which needs to do the same thing sometimes. struct pool itself is generally not visible to userland though, which is good. matthew@ suggested struct kinfo_pool instead of struct pool_info. the kinfo prefix has precedent. lots of people liked this.
* The second level of the CTL_NET sysctl is a PF_*, not an AF_*guenther2014-06-236-34/+34
| | | | inconsistent usage in route(8) noted by Gregor Best (gbe (at) ring0.de)
* catch up with the inet(3) rename; this commit missed in previousjmc2014-05-101-4/+4
| | | | ok guenther
* Introduce two new route flags: RTF_LOCAL and RTF_BROADCAST.mpi2014-05-082-3/+7
| | | | | | | | | | | | | | | Nothing use them for the moment, but here is the plan: Since a route lookup is always necessary to output a packet it makes sense to store all the information regarding how the packet should be sent in the routing entry. This will save us some expensive lookups on address lists. But once we have all the information about our addresses in the routing table, we can even use it in the input path with the hope that the number of lookups in the forwarding case can be reduce to one. ok henning@, chris@
* Sync show.c with the route version. Make the two files more similar butclaudio2014-04-171-9/+6
| | | | still not identical. OK sthen@ mpi@ jca@
* use strtonum. ok krwtedu2014-02-131-5/+9
|
* Fix printing of icps_toofreq unlike IPv6 the IPv4 value is just a u_long.claudio2014-01-251-2/+2
| | | | Found by csszep (at) gmail.
* hardware cecksummed counters -> software checksummed countershenning2014-01-231-7/+7
|
* Report the number of dropped ICMP error because the rate limit got exceeded.claudio2014-01-191-1/+4
| | | | OK benno@ deraadt@
* ddpcb and unixsw symbols are no longer used with kvm_readguenther2014-01-101-18/+14
| | | | ok deraadt@
* final circleq to tailq fix. restore the previous pointer check by readingtedu2013-12-251-2/+9
| | | | | the previous value again and checking prev.next is still next. maybe ok guenther
* more fixing after circleq conversion. a better fix to check the prevtedu2013-12-241-6/+3
| | | | pointer is forthcoming.
* fix circleq tailq conversiontedu2013-12-231-6/+4
|
* Switch inpt_queue from CIRCLEQ to TAILQ. Thus ending use of CIRCLEQkrw2013-12-201-5/+5
| | | | | | | in the base. Ports fixes to follow shortly for the two ports (gkrellm and net-snmp) affected. ok zhuk@ millert@
* 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-215-5/+10
| | | | | which allows us to modify ifnet structure in a relatively safe way; discussed with deraadt, ok mpi
* unsigned char cast for isdigit, dealing with argvderaadt2013-11-201-2/+2
| | | | ok benno
* handle lack of protoderaadt2013-11-131-2/+2
|
* kinfo_file returns the socket buffer counts in uint64_ts, so we need toguenther2013-11-091-3/+2
| | | | | | update the printf format for them. While here, delete a now unused variable. problem pointed out by Scott McEachern (scott (at) blackstaff.ca)
* use %d instea of %ideraadt2013-10-281-2/+2
|
* These two programs got fooled by the KAME/NRL split and need type repair.deraadt2013-10-241-2/+2
| | | | | | They do not indicate a problem with the reduction of namespace export, but got suckered into the 1999 plan. ok benno
* - add UNIX-domain socket info to struct kinfo_file2guenther2013-10-223-59/+42
| | | | | | | | | | - convert netstat from kvm_getfiles() to kvm_getfile2() using that - delete kvm_getfiles() and KERN_FILE as no longer used (bump libkvm's major) - rename kvm_getfile2() to kvm_getfiles(), kinfo_file2 to kinfo_file and KERN_FILE2 to KERN_FILE. ok deraadt@, millert@ ports scan sthen@
* Prepare netstat for printing 64 bit route expire time.bluhm2013-09-291-3/+3
| | | | OK claudio@
* Fix calls to printf-like functions which passed a non-fixed stringguenther2013-08-183-33/+33
| | | | | | | | as the format and no variable args. Replace "%#0.*X" with "%#.*X": the zero-fill flag is ignored/implied on numeric conversions when a precision is specified. ok jung@ millert@ krw@
* create a method to print the unp_ino (ino_t) properly once it becomesderaadt2013-04-231-2/+3
| | | | bigger
* improve time_t handling here, tooderaadt2013-04-181-9/+9
|
* improve time_t printing; ok claudioderaadt2013-04-182-13/+15
|
* handle long long tv_sec; ok millertderaadt2013-04-161-11/+11
|
* As non-root, whenever netstat is about to print out a kernel pointer...deraadt2013-03-206-60/+90
| | | | print 0x0 instead. Hides a lot stuff people don't need to see.
* netstat -vP also shows the new struct sockbuf field sb_flagsintr.bluhm2013-02-051-1/+2
| | | | OK markus@ claudio@
* sys/mbuf.h not neededderaadt2013-01-162-4/+2
|
* Remove excessive sys/cdefs.h inclusionderaadt2012-12-052-5/+2
| | | | ok guenther millert kettenis
* remove some unnecessary sys/mbuf.h inclusionsderaadt2012-12-042-4/+2
|
* oops, i added a stray character. spotted by jmctedu2012-08-261-2/+2
|
* remove unneccessary .Pp;jmc2012-08-221-2/+1
|
* i missed usage and the manpage. prod by jmctedu2012-08-222-5/+11
|
* -h flag to print human numbers in conjunction with -w -btedu2012-08-224-22/+48
|