summaryrefslogtreecommitdiffstats
path: root/usr.bin/netstat
Commit message (Collapse)AuthorAgeFilesLines
* New sendfile(2) syscall. A joint effort of NGINX and Netflix from 2013 andglebius2016-01-081-3/+23
| | | | | | | | | | | | | | | | | | | | | | | | | | up to now. The new sendfile is the code that Netflix uses to send their multiple tens of gigabits of data per second. The new implementation features asynchronous I/O, when I/O operations are launched, but not awaited to be complete. An explanation of why such behavior is beneficial compared to old one is going to be too long for a commit message, so we will skip it here. Additional features of new syscall are extra flags, which provide an application more control over data sent. The SF_NOCACHE flag tells kernel that data shouldn't be cached after it was sent. The SF_READAHEAD() macro allows to specify readahead size in pages. The new syscalls is a drop in replacement. No modifications are required to applications. One can take nginx binary for stable/10 and run it successfully on head. Although SF_NODISKIO lost its original sense, as now sendfile doesn't block, and now means something completely different (tm), using the new sendfile the old way is absolutely safe. Celebrates: Netflix global launch! Sponsored by: Nginx, Inc. Sponsored by: Netflix Relnotes: yes
* Switch the IPsec related statistics to using the built in sysctlgnn2015-12-172-14/+24
| | | | | | | | | variable set rather than reading from kernel memory. This also makes the -z (zero) flag work correctly MFC after: 1 week Sponsored by: Rubicon Communications, LLC (Netgate) Differential Revision: https://reviews.freebsd.org/D4591
* Add more text to explain --libxo flag.rodrigc2015-12-011-1/+8
|
* At the time a destination or a gateway of `netstat -r'ume2015-12-011-6/+14
| | | | | protrudes its field, narrow the next field to raise readability bit.
* Update dependencies after r291406 added libelf to libkvm.bdrewery2015-12-011-0/+1
| | | | | | | | Unfortunately filemon/meta mode tracks all indirect dependencies here since ld(1) is reading libelf when linking in libkvm. Churn would be reduced if this was able to be limited to direct dependencies. Sponsored by: EMC / Isilon Storage Division
* Replace DPSRCS that work fine in SRCS.bdrewery2015-11-251-2/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This is so that 'make depend' is not a required build step in these files. DPSRCS is overall unneeded. DPSRCS already contains SRCS, so anything which can safely be in SRCS should be. DPSRCS is mostly just a way to generate files that should not be linked into the final PROG/LIB. For headers and grammars it is safe for them to be in SRCS since they will be excluded during linking and installation. The only remaining uses of DPSRCS are for generating .c or .o files that must be built before 'make depend' can run 'mkdep' on the SRCS c files list. A semi-proper example is in tests/sys/kern/acct/Makefile where a checked-in .c file has an #include on a generated .c file. The generated .c file should not be linked into the final PROG though since it is #include'd. The more proper way here is just to build/link it in though without DPSRCS. Another example is in sys/modules/linux/Makefile where a shell script runs to parse a DPSRCS .o file that should not be linked into the module. Beyond those, the need for DPSRCS is largely unneeded, redundant, and forces 'make depend' to be ran. Generally, these Makefiles should avoid the need for DPSRCS and define proper dependencies for their files as well. An example of an improper usage and why this matters is in usr.bin/netstat. nl_defs.h was only in DPSRCS and so was not generated during 'make all', but only during 'make depend'. The files including it lacked proper depenencies on it, which forced running 'make depend' to workaround that bug. The 'make depend' target should mostly be used for incremental build help, not to produce a working build. This specific example was broken in the meta build until r287905 since it does not run 'make depend'. The gnu/lib/libreadline/readline case is fine since bsd.lib.mk has 'OBJS: SRCS:M*.h' when there is no .depend file. Sponsored by: EMC / Isilon Storage Division MFC after: 1 week
* Fix udp entry of `netstat -TW'.ume2015-11-251-0/+2
|
* Correct alignment of the addresses in the `netstat -aW' output.ume2015-11-241-12/+21
|
* Add missing error check after xo_parse_args() in netstat(8).ume2015-11-241-0/+2
| | | | | Submitted by: Oliver Pinter Differential Revision: https://reviews.freebsd.org/D4233
* Don't truncate an interface name when -W option is specified.ume2015-11-201-1/+5
| | | | | Spotted by: Jim Thompson <jim__at__netgate.com> MFC after: 1 week
* Avoid core dump when output style is html.ume2015-11-201-10/+8
|
* JSON doesn't permit a hexadecimal notation of an integer.ume2015-11-171-1/+1
|
* Do not truncate addresses when printing in encoded format.ume2015-11-061-10/+11
|
* - Fix alignment for padding link address.ume2015-11-061-2/+2
| | | | - Trim whitespace of link address.
* Fix compiling netstat after r290367 by substituting sys/types.h forngie2015-11-061-1/+1
| | | | | | | sys/param.h, as sys/param.h defines the MAX(..) macro Reported by: O. Hartmann <ohartman@zedat.fu-berlin.de> Pointyhat to: ume
* Give enough room for addresses when -W option is specified.ume2015-11-051-11/+25
|
* Fix alignment of `Drop' header.ume2015-11-051-1/+1
|
* Use returned network name from getnetbyaddr() correctly.ume2015-11-051-6/+5
|
* Revert previous workaround. This problem was fixedume2015-11-051-4/+0
| | | | by r290318.
* Since sa->sa_len doesn't match sizeof(struct sockaddr_dl),ume2015-11-041-0/+4
| | | | | getnameinfo() fails against sockaddr_dl. This commit is workaround for this problem.
* Fix alignment of AF_LINK address.ume2015-11-041-2/+1
|
* Simplify r290367 using asterisk for a field widthume2015-11-041-8/+3
| | | | and precision.
* Unify AF_INET case and AF_INET6 case.ume2015-11-041-15/+1
|
* Change to not truncate an interface name when -W optionume2015-11-041-11/+24
| | | | is specified.
* Mask an IPv6 network address.ume2015-11-041-1/+8
|
* Restore an interface name field to left align.ume2015-11-041-2/+2
|
* Update META_MODE dependencies.bdrewery2015-09-171-0/+10
|
* Use a common subroutine to fetch and zero protocol stats instead ofmarkj2015-09-1110-242/+119
| | | | | | duplicating roughly similar code for each protocol. MFC after: 2 weeks
* Remove prototypes for undefined functions from netstat.h.markj2015-09-111-15/+0
|
* Simplify kvm symbol resolution and error handling. The symbol tablehrs2015-09-028-241/+151
| | | | | nl_symbols will eventually be organized into several modules depending on MK_* variables.
* Divide statistics in the number of packets with 1000 instead of 1024hrs2015-09-021-21/+25
| | | | | | in human-readable form. PR: 183598
* - Add -W flag support for network column in intpr() (-i flag) andhrs2015-09-019-284/+226
| | | | | | | | | | | | | | | | | | | | | | | | | routepr() (-r flag). It is too narrow to show an IPv6 prefix in most cases. - Accept "local" as a synonym of "unix" in protocol family name. - Show a prefix length in CIDR notation when name resolution failed in netname(). - Make routename() and netname() AF-independent and remove unnecessary typecasting from struct sockaddr. - Use getnameinfo(3) to format L2 addr in intpr(). - Fix a bug which showed "Address" when -A flag is specfied in pr_rthdr(). - Replace cryptic GETSA() macro with SA_SIZE(). - Fix declarations shadowing local variables with the same names. - Add more static, remove unused header files and variables. MFC after: 1 week
* Failure of dropping privilege should be fatal, so test and bail outdelphij2015-09-011-3/+6
| | | | | | | when setgid() fails. Reported by: clang static analyzer MFC after: 2 weeks
* Use the userland exported states and handle them completely.tuexen2015-08-291-7/+16
|
* add documentation for timers that silby added in r197244, almost 6 yearsjmg2015-08-271-1/+7
| | | | ago...
* Upgrade libxo to 0.4.5.marcel2015-08-241-3/+1
| | | | | | | Local changes incorporated by 0.4.5: r284340 Local changes retained: r276260, r282117 Obtained from: https://github.com/Juniper/libxo
* Fix counter reads on platforms where sizeof(uint64_t) != sizeof(uint64_t *).markj2015-07-211-6/+18
| | | | | | | | | | | | In the kernel, structs such as tcpstat are manipulated as an array of counter_u64_t (uint64_t *), but made visible to userland as an array of uint64_t. kread_counters() was previously copying the counter array into user space and sequentially overwriting each counter with its value. This mostly affects IPsec counters, as other counters are exported via sysctl. PR: 201700 Tested by: Jason Unovitch MFC after: 1 week
* Fix some libxo format string errors in the pfkey stats code.markj2015-07-201-2/+2
| | | | PR: 201700
* New AES modes for IPSec, user space components.gnn2015-07-031-0/+3
| | | | | | | | | | | | Update setkey and libipsec to understand aes-gcm-16 as an encryption method. A partial commit of the work in review D2936. Submitted by: eri Reviewed by: jmg MFC after: 2 weeks Sponsored by: Rubicon Communications (Netgate)
* Add META_MODE support.sjg2015-06-131-0/+24
|\ | | | | | | | | | | | | | | | | | | | | Off by default, build behaves normally. WITH_META_MODE we get auto objdir creation, the ability to start build from anywhere in the tree. Still need to add real targets under targets/ to build packages. Differential Revision: D2796 Reviewed by: brooks imp
| * dirdeps.mk now sets DEP_RELDIRsjg2015-06-081-2/+0
| |
| * Merge sync of headsjg2015-05-2720-1862/+2504
| |\ | |/ |/|
| * Merge from head@274682sjg2014-11-191-8/+8
| |\
| * \ Merge head from 7/28sjg2014-08-195-261/+546
| |\ \
| * | | Updated dependenciessjg2014-05-161-1/+0
| | | |
| * | | Updated dependenciessjg2014-05-101-1/+2
| | | |
| * | | Merge from headsjg2014-05-083-13/+16
| |\ \ \
| * \ \ \ Merge headsjg2014-04-2814-1624/+874
| |\ \ \ \
| * \ \ \ \ Merge from headsjg2013-09-0510-324/+256
| |\ \ \ \ \
| * \ \ \ \ \ sync from headsjg2013-04-128-165/+216
| |\ \ \ \ \ \
OpenPOWER on IntegriCloud