summaryrefslogtreecommitdiff
path: root/usr.bin/netstat
AgeCommit message (Collapse)Author
2015-04-27sync with rev 1.99 of sbin/route/show.cSebastian Benoit
requested by claudio@ and mpi@
2015-04-22Expand SLIST macro of unix pcb members before printing the pointer.Alexander Bluhm
Fixes a gcc warning. No binary change. Found by and OK deraadt@
2015-04-16remove unfinished/unused support for socket-attached ipsec-policiesMarkus Friedl
ok mikeb
2015-04-14IPsec auth and credentials are not stored in the kernel anymore;Mike Belopuhov
noticed by deraadt@
2015-02-13implicit declaration of function 'free'; add missing stdlib.hDavid Coppa
OK sthen@
2015-02-12Free the buffers used for the sysctl. OK sthen@Claudio Jeker
2015-02-12be more explicit about how -A and -P work, and fix a booboo in previous;Jason McIntyre
help/ok claudio
2015-02-12Initialize buffer pointers passed to get_sysctl to NULL; otherwise they pointStuart Henderson
to random memory so when the sysctl-estimate is too small, the realloc() fails. Problem reported by Ze Loff, ok claudio
2015-02-12Switch the printing of open sockets from ugly KVM internals to useClaudio Jeker
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.
2015-02-09Get rid of another KVM reader and convert the multicast output to useClaudio Jeker
the new sysctls. Looks good deraadt@
2015-02-08Count dropped SYN packets on the tcpstat. They are dropped due to theYASUOKA Masahiko
listen queue (backlog) limit or the memory shortage in syn-cache. ok henning reyk claudio
2015-02-08-a for -I or -i is gone for good. So adjust manpage.Claudio Jeker
2015-02-08The multicast address printing code has been disabled for 7 years.Claudio Jeker
Nobody complained about it missing. It is time to kill it for real. OK phessler, henning, deraadt
2015-02-08Do extend CFLAGS instead of assigning it so that DEBUG=-g worksClaudio Jeker
OK deraadt@
2015-02-06Remove route/netstat -f encap in favor of ipsecctl -s flow.Reyk Floeter
OK deraadt@
2015-01-20Adjust <sys/param.h> comments regarding use of use of MSIZE, orTheo de Raadt
delete <sys/param.h> if now possible ok guenther
2015-01-19First step of hiding many kernel-only parts of <netinet/ip_ipsp.h>Theo de Raadt
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
2015-01-17_KERNEL 1? no, just _KERNELTheo de Raadt
2015-01-16Replace <sys/param.h> with <limits.h> and other less dirty headers whereTheo de Raadt
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)
2014-12-26not necessary to define INET anymoreTed Unangst
2014-11-21remove pointless if_var.h and socketvar.h includes; ok deraadtMike Belopuhov
2014-11-06i renamed the mbuf pool.David Gwynne
2014-11-03Put the socket splicing fields into a seperate struct sosplice thatAlexander Bluhm
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@
2014-10-26remove unused variablesCharles Longeau
ok schwarze@
2014-10-23Remove networks(5) support.Ingo Schwarze
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.
2014-08-14No need for <netinet/in_systm.h> nor <netinet/tcpip.h>.Martin Pieuchot
2014-08-14Kill bandwidth monitoring meters.Martin Pieuchot
2014-07-10#define _KERNEL hack requires ucred.h now as wellTheo de Raadt
2014-07-02info about pools is currently given to userland by copying eachDavid Gwynne
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.
2014-06-23The second level of the CTL_NET sysctl is a PF_*, not an AF_*Philip Guenther
inconsistent usage in route(8) noted by Gregor Best (gbe (at) ring0.de)
2014-05-10catch up with the inet(3) rename; this commit missed in previousJason McIntyre
ok guenther
2014-05-08Introduce two new route flags: RTF_LOCAL and RTF_BROADCAST.Martin Pieuchot
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@
2014-04-17Sync show.c with the route version. Make the two files more similar butClaudio Jeker
still not identical. OK sthen@ mpi@ jca@
2014-02-13use strtonum. ok krwTed Unangst
2014-01-25Fix printing of icps_toofreq unlike IPv6 the IPv4 value is just a u_long.Claudio Jeker
Found by csszep (at) gmail.
2014-01-23hardware cecksummed counters -> software checksummed countersHenning Brauer
2014-01-19Report the number of dropped ICMP error because the rate limit got exceeded.Claudio Jeker
OK benno@ deraadt@
2014-01-10ddpcb and unixsw symbols are no longer used with kvm_readPhilip Guenther
ok deraadt@
2013-12-25final circleq to tailq fix. restore the previous pointer check by readingTed Unangst
the previous value again and checking prev.next is still next. maybe ok guenther
2013-12-24more fixing after circleq conversion. a better fix to check the prevTed Unangst
pointer is forthcoming.
2013-12-23fix circleq tailq conversionTed Unangst
2013-12-20Switch inpt_queue from CIRCLEQ to TAILQ. Thus ending use of CIRCLEQKenneth R Westerback
in the base. Ports fixes to follow shortly for the two ports (gkrellm and net-snmp) affected. ok zhuk@ millert@
2013-11-25netstat -Ar leaked some kernel pointers to unprivileged users. UseAlexander Bluhm
hideroot to show them only to root. OK deraadt@
2013-11-21split kernel parts of the if.h into a separate header file if_var.hMike Belopuhov
which allows us to modify ifnet structure in a relatively safe way; discussed with deraadt, ok mpi
2013-11-20unsigned char cast for isdigit, dealing with argvTheo de Raadt
ok benno
2013-11-13handle lack of protoTheo de Raadt
2013-11-09kinfo_file returns the socket buffer counts in uint64_ts, so we need toPhilip Guenther
update the printf format for them. While here, delete a now unused variable. problem pointed out by Scott McEachern (scott (at) blackstaff.ca)
2013-10-28use %d instea of %iTheo de Raadt
2013-10-24These two programs got fooled by the KAME/NRL split and need type repair.Theo de Raadt
They do not indicate a problem with the reduction of namespace export, but got suckered into the 1999 plan. ok benno
2013-10-22- add UNIX-domain socket info to struct kinfo_file2Philip Guenther
- 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@