summaryrefslogtreecommitdiff
path: root/usr.bin/netstat
AgeCommit message (Collapse)Author
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@
2013-09-29Prepare netstat for printing 64 bit route expire time.Alexander Bluhm
OK claudio@
2013-08-18Fix calls to printf-like functions which passed a non-fixed stringPhilip Guenther
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@
2013-04-23create a method to print the unp_ino (ino_t) properly once it becomesTheo de Raadt
bigger
2013-04-18improve time_t handling here, tooTheo de Raadt
2013-04-18improve time_t printing; ok claudioTheo de Raadt
2013-04-16handle long long tv_sec; ok millertTheo de Raadt
2013-03-20As non-root, whenever netstat is about to print out a kernel pointer...Theo de Raadt
print 0x0 instead. Hides a lot stuff people don't need to see.
2013-02-05netstat -vP also shows the new struct sockbuf field sb_flagsintr.Alexander Bluhm
OK markus@ claudio@
2013-01-16sys/mbuf.h not neededTheo de Raadt
2012-12-05Remove excessive sys/cdefs.h inclusionTheo de Raadt
ok guenther millert kettenis
2012-12-04remove some unnecessary sys/mbuf.h inclusionsTheo de Raadt
2012-08-26oops, i added a stray character. spotted by jmcTed Unangst
2012-08-22remove unneccessary .Pp;Jason McIntyre
2012-08-22i missed usage and the manpage. prod by jmcTed Unangst
2012-08-22-h flag to print human numbers in conjunction with -w -bTed Unangst
2012-07-13Label node allocation failures as such in netstat -W output.Stefan Sperling
"Input packets dropped" isn't really a good description of what happened when we failed to allocate a new node in the net80211 stack. This allocation doesn't happen for every packet, only for new nodes that appear in reach of the antenna. ok net80211 expert department (we have vacancies, apply within)
2012-03-17remove IP_JUMBO, SO_JUMBO, and RTF_JUMBO.David Gwynne
no objection from mcbride@ krw@ markus@ deraadt@
2011-11-01Do some cleanup and improve the manpage. From Andreas Bartelt; ok henning, jmcMike Belopuhov
2011-11-01Fixup previous: don't forget to actually get the current rtable;Mike Belopuhov
reminded by Andreas Bartelt.