Whitespace cleanups
netstat(1): Increase column width of interface nameGiven that the interface can be renamed, the interface name may begenerally longer, so increase the column width of interface name by 2character
netstat(1): Increase column width of interface nameGiven that the interface can be renamed, the interface name may begenerally longer, so increase the column width of interface name by 2characters (from 6 to 8).Referred to FreeBSD.
show more ...
netstat(1): Fix alignment of 'Drop' and 'Time' columns
netstat(1): Update route.c to get rid of some file-global variablesNo functional changes.
netstat(1): Whitespace cleanups
netstat(1): Fix build against with <net/radix.h> gaining 'const'
netstat(1): Clean up struct nlist array.
Use <fcntl.h> instead of <sys/file.h> for open()'s prototype and flags.
<sys/kinfo.h>: Fix legacy inclusion issues. Sadly this header was not being included properly for a long time. Make it publicly accessible and put a big NOTE how to do it properly for future code
<sys/kinfo.h>: Fix legacy inclusion issues. Sadly this header was not being included properly for a long time. Make it publicly accessible and put a big NOTE how to do it properly for future codes. This makes the <sys/user.h> the only other header that defines _KERNEL_STRUCTURES to solve long term inclusion order issues. Previous variant was hiding implicit dependencies, adjust netstat(1). Any changes in this header breaks a lot of ports, try not to change any of the structs. Also make sure KERN_SIGTRAMP has public visibility. While there remove two defines that were not used since introduced in 5dfd06ac148512faf075c4e399e8485fd955578f
Use our standard bool type in a few places.
Change '#if notyet' to '#if 0 /* not yet */' which fixes -Wundef.
Fix a few typos across the tree.
Remove IPsec and related code from the system.It was unmaintained ever since we inherited it from FreeBSD 4.8.In fact, we had two implementations from that time: IPSEC and FAST_IPSEC.FAST_IPSEC
Remove IPsec and related code from the system.It was unmaintained ever since we inherited it from FreeBSD 4.8.In fact, we had two implementations from that time: IPSEC and FAST_IPSEC.FAST_IPSEC is the implementation to which FreeBSD has moved since, butit didn't even build in DragonFly.Fixes for dports have been committed to DeltaPorts.Requested-by: dillonDports-testing-and-fixing: zrj
Replace local array size calculations with NELEM().
netstat(1): Add some formats safety.No functional change intended.
route: Routes should only be accessed from the first netisr_ncpus netisrs.Replicate routes to the first netisr_ncpus CPUs, instead of all CPUs.
build - prepare for higher optimization levels* Add NO_STRICT_ALIASING, NO_STRICT_OVERFLOW, and NO_WARRAY_BOUNDS make variables as-needed.
ifnet: Add oqdrops statistics
tcp: Count connections by TCP stateInspired-by: FreeBSD 'netstat -s -p tcp' output
Remove advertising header from usr.bin/Correct BSD License clause numbering from 1-2-4 to 1-2-3.
Remove remaining OSI protocol support.These were just leftovers.
route: Print protocol-cloned routes if -A is specifiedElse the out put of netstat -rnA looks weird if there are protocol-cloned routes.
inet/inet6: Remove the v4-mapped address supportThis greatly simplies the code (even the IPv4 code) and avoids all kindsof possible port theft.INPCB:- Nuke IN6P_IPV6_V6ONLY, which is always on
inet/inet6: Remove the v4-mapped address supportThis greatly simplies the code (even the IPv4 code) and avoids all kindsof possible port theft.INPCB:- Nuke IN6P_IPV6_V6ONLY, which is always on after this commit.- Change inp_vflag into inp_af (AF_INET or AF_INET6), since the socket is either IPv6 or IPv4, but never both. Set inpcb.inp_af in in_pcballoc() instead of in every pru_attach methods. Add INP_ISIPV4() and INP_ISIPV6() macros to check inpcb family (socket family and inpcb.inp_af are same).- Nuke the convoluted code in in_pcbbind() and in6_pcbbind() which is used to allow wildcard binding to accepting IPv4 connections on IPv6 wildcard bound sockets.- Nuke the code in in_pcblookup_pkthash() to match IPv4 faddr with IPv6 wildcard bound socket.- Nuke in6_mapped_{peeraddr,sockaddr,savefaddr}(); use in6_{setpeeraddr, setsockaddr,savefaddr}() directly.- Nuke v4-mapped address convertion functions.- Don't allow binding to v4-mapped address in in6_pcbind().- Don't allow connecting to v4-mapped address in in6_pcbconnect().TCP:- Nuke the code in tcp_output() which takes care of the IP header TTL setting for v4-mapped IPv6 socket.- Don't allow binding to v4-mapped address (through in6_pcbbind()).- Don't allow connecting to v4-mapped address and nuke the related code (PRUC_NAMALLOC etc.).- Nuke the code (PRUC_FALLBACK etc.) to fallback to IPv4 connection if IPv6 connection fails, which is wrong.- Nuke the code for v4-mapped IPv6 socket in tcp6_soport().UDP:- Nuke the code for v4-mapped IPv6 socket in udp_input() and udp_append().- Don't allow binding to v4-mapped address (through in6_pcbbind()).- Don't allow connecting to v4-mapped address.- Don't allow sending datagrams to v4-mapped address and nuke the related code in udp6_output().- Nuke the code for v4-mapped IPv6 socket in udp6_disconnect()RIP:- Don't allow sending packets to v4-mapped address.- Don't allow binding to v4-mapped address.- Don't allow connecting to v4-mapped address.Misc fixup:- Don't force rip pru_attach method to return 0. If in_pcballoc() fails, just return the error code.
-h (human-readable counters) for netstat
Use system's RT_ROUNDUP and RT_ADVANCE macros instead of local copies.Reviewed-by: dillon
123456