| Commit message (Collapse) | Author | Age | Files | Lines |
| |
|
|
|
|
|
|
| |
Add support nexthop statistics and update its manual.
While here, fix manual of other nexthop related options.
Reviewed by: kfv
Differential Revision: https://reviews.freebsd.org/D58538
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Modern Netlink arrays encode their elements as repeated attributes of
the same type rather than as children of an additional array container.
Add an SNL callback that parses one nested element for each occurrence
and appends it to a geometrically grown parser array. Retain the
existing parray callback for protocols that use the legacy container
form.
Store the growth capacity in struct snl_parray, appended after its
existing public count and items fields so their offsets remain stable
on LP64 and ILP32. Require parser targets to be real snl_parray
objects, and convert bitset, generic Netlink, and route multipath arrays
accordingly. This avoids relying on layout aliases for private growth
state.
Add regression coverage for a nested bit array that grows beyond its
initial allocation, while preserving replacement semantics when a
legacy array target is reused.
Reviewed by: melifaro, pouria
Sponsored by: BBOX.io
Differential Revision: https://reviews.freebsd.org/D58775
|
| |
|
|
|
|
|
|
|
| |
Show nhop flags like invalid nexthop to debug cases like
the PR below.
PR: 296883
Reviewed by: glebius
Differential Revision: https://reviews.freebsd.org/D58347
|
| |
|
|
|
|
|
|
|
|
|
| |
Add metric support and show its value in wide flag and
libxo output.
Also, add metric to the description of wide flag (`-w`) in
routing display (`-r`) section of manual page.
Reviewed by: markj (manpage)
Discussed with: markj
Differential Revision: https://reviews.freebsd.org/D57011
|
| |
|
|
|
|
|
|
|
|
|
|
| |
This change adds the ability to examine the contents of multicast
routing tables for other FIBs without the need for executing
`netstat` with `setfib(1)`.
MFC after: 3 days
Sponsored by: Klara, Inc.
Sponsored by: Stormshield
Differential Revision: https://reviews.freebsd.org/D56205
Reviewed by: glebius, markj, zlei
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Recurring banners except the first are printed just after the latest
interval's statistics line, giving the false impression that the latter
are omitted. It is also better to print a new banner only if it is
going to be followed by a new line of statistics, in case netstat(1) is
interrupted or we have reached the number of iterations specified by
'-q'.
Fix this by pushing printing these banners inside the loop producing
statistics lines, after having waited for the next interval.
The first banner is printed before the loop, as we want it to be printed
immediately at launch, even if at this point we do not have statistics
to display (we have to wait for an interval to compute these, as they
are based on a difference).
While here, remove the 'goto' spaghetti by putting banner printing into
its own private function and using a proper infinite loop in
sidewaysintpr().
While here, document the why of the 21 statistics line span between two
banners.
While here, check for the number of output lines of statistics once such
a line has effectively been printed. This allows to remove the internal
incrementation performed when reading '-w''s argument, which was a hack
to compensate the misplaced check.
While here, in the manual page, simplify the description of the '-w'
mode and mention that passing 0 to '-q' means "no count limit".
Reviewed by: glebius
Fixes: 84c1edcbad7d ("Rewrite netstat/if.c to use ...")
Fixes: bf10ffe1d3a9 ("Add a new option, -q howmany, ...")
MFC after: 1 week
Sponsored by: The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D56227
|
| |
|
|
|
|
| |
Reviewed by: glebius
MFC after: 3 weeks
Differential Revision: https://reviews.freebsd.org/D55440
|
| |
|
|
|
|
|
|
|
|
| |
Also fix some bogus libxo format strings in mroute6.c, and close a
couple of lists instead of opening them twice.
Fixes: ade9ccfe211a ("Convert netstat to use libxo.")
MFC after: 2 weeks
Sponsored by: Stormshield
Sponsored by: Klara, Inc.
|
| |
|
|
| |
MFC after: 3 days
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
| |
Trim white space padding that gets added libxo fields cc and stack when
using -C and -c.
The padding is only visible if you're using multiple stacks or
congestion algorithms.
PR: 292262
MFC after: 5 days
Reviewed by: asomers, tuexen
Approved by: asomers (mentor)
Differential Revision: https://reviews.freebsd.org/D54709
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
| |
Fix a segfault when printing the "protocol" field. The field-format and
encoding-format were expecting different numbers of arguments.
Also, fix the width of the tcp-state field in encoded output.
PR: 292228
Fixes: c2b08c13c20 netstat: add support for UDP-Lite endpoints
MFC after: 1 week
Sponsored by: ConnectWise
Reviewed by: tuexen, js, des
Differential Revision: https://reviews.freebsd.org/D54567
|
| |
|
|
|
|
|
|
| |
With this patch UDP-Lite endpoints are also shown per default.
Reviewed by: Nick Banks
MFC after: 3 days
Differential Revision: https://reviews.freebsd.org/D53252
|
| |
|
|
|
|
|
|
|
|
| |
sdl_data isn't always NULL terminated
Signed-off-by: nreilly@qnx.com
PR: 288958
Reviewed by: markj
MFC after: 1 week
|
| |
|
|
|
|
|
|
|
|
|
|
| |
A new version of pfsync packet is introduced: 1500. This version solves
the issues with data alignment introduced in version 1400 and adds syncing
of information needed to sync states created by rules with af-to (original
interface, af and proto separate for wire and stack keys), of rt_af
needed for prefer-ipv6-nexthop, and of tag names.
Reviewed by: kp
Sponsored by: InnoGames GmbH
Differential Revision: https://reviews.freebsd.org/D52176
|
| |
|
|
|
|
|
|
|
|
| |
Put SYN-cookie related counters in its own container and use consistent
indentation for them.
Reviewed by: glebius
MFC after: 1 week
Sponsored by: Netflix, Inc.
Differential Revision: https://reviews.freebsd.org/D52227
|
| |
|
|
|
|
|
| |
Provide counters for receive and transmit checksum offloading for
SCTP.
MFC after: 1 week
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
| |
When reporting undelivered broadcast/multicast datagrams, don't just
report the undelivered broadcast ones. Actually report the sum of both.
Alternatively, one could also report broadcast and multicast datagrams
separately, but that would change the output format of netstat.
While there, use the correct type for casting a variable printed
with %ju.
Reviewed by: cc
MFC after: 1 week
Sponsored by: Netflix, Inc.
Differential Revision: https://reviews.freebsd.org/D51881
|
| |
|
|
|
|
|
|
| |
delivered is already an uint64_t, so no need to cast it to that
type.
MFC after: 1 week
Sponsored by: Netflix, Inc.
|
| |
|
|
|
|
|
|
|
|
|
| |
The counter udps_noport includes udps_noportbcast, so don't subtract
udps_noportbcast twice.
PR: 288680
Reviewed by: rrs
MFC after: 1 week
Sponsored by: Netflix, Inc.
Differential Revision: https://reviews.freebsd.org/D51870
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Most libxo-enabled utilities link to xo_parse_args.3. But that man page
doesn't actually describe how to format command-line arguments. Rather,
xo_options.7 does. I suspect that these utilities link to the former
because the latter man page did not exist until libxo-0.7.2
(8a6eceff3ce). And newer utilities have probably been copy/pasting the
same text from older ones. But the superior man page does exist now,
so we should link to it instead.
MFC after: 2 weeks
Sponsored by: ConnectWise
Reviewed by: emaste
Differential Revision: https://reviews.freebsd.org/D51354
|
| |
|
|
|
|
|
| |
While here, wrap to 80 characters.
Approved by: ziaee
Differential Revision: https://reviews.freebsd.org/D51280
|
| |
|
|
|
| |
Reviewed by: tuexen
Differential Revision: https://reviews.freebsd.org/D50899
|
| |
|
|
|
|
|
| |
Reviewed by: glebius
MFC after: 1 week
Sponsored by: Netflix, Inc.
Differential Revision: https://reviews.freebsd.org/D50889
|
| |
|
|
|
|
|
|
| |
Reviewed by: kevans, ziaee, ivy
Approved by: kevans (mentor)
Fixes: fedeb08b6a58 ("Introduce scalable route multipath.")
Fixes: a666325282ea ("Introduce nexthop objects and new routing KPI.")
Pull Request: https://github.com/freebsd/freebsd-src/pull/1643
|
| |
|
|
|
|
|
|
|
|
| |
Add a missing space before R-HIWA to align the table header with
the table contents.
Reviewed by: rrs, cc
MFC after: 3 days
Sponsored by: Netflix, Inc.
Differential Revision: https://reviews.freebsd.org/D49941
|
| |
|
|
|
|
|
|
|
|
| |
Everything in the live path seems to use sysctls these days, with kvm
only being used for pulling information from core dumps. Strip the
binary of /dev/{k,}mem access to reduce the surface area with access
to kmem.
Reviewed by: glebius, markj
Differential Revision: https://reviews.freebsd.org/D47210
|
| |
|
|
|
|
|
|
|
|
| |
Following c2aa91745e87 ("netstat: restore printing the "default"
keyword, provide -nn option"), consistently use bool where appropriate
for commandline flags.
Reviewed by: glebius
Sponsored by: The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D48832
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Avoid POLA breakage and preserve output standard that really predates
the FreeBSD project itself. There are scripts in the wild that rely
on the behavior.
Provide option to specify -nn twice to have a completely numeric
output of the routing tables.
Fixes: 9206c79961986c2114a9a2cfccf009ac010ad259
This reverts commit e090646d6f5a4a6848ecd4bcb1f2db498ea3b3e2.
Reviewed by: zlei, gallatin, melifaro, allanjude, markj, emaste
Differential Revision: https://reviews.freebsd.org/D48729
|
| |
|
|
|
|
|
|
|
|
| |
The uncommented #ifdef _KERNEL originates from 1997 by wollman@ (see
57bf258e3dc9e) with no clear original reason. Since these old times two
abusers of the header leak were created - libprocstat(3) and netstat(1).
These two already have a lot of _WANT_FOO hacks, so satisfy them with
_WANT_PROTOSW.
While here, cleanup and sort forward declaraions.
|
| |
|
|
|
|
| |
The file obtains some kernel structures in a dirty way and needs
forward declaration of struct sockopt for that. Make it explicit
instead of getting it via headers that were not designed for that.
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
In numeric mode, the default route is printed as "default" rather
than 0.0.0.0/0 or ::/0
From the man page:
"-n: Show network addresses and ports as numbers.
Normally netstat attempts to resolve addresses and ports, and display
them symbolically. If the -n option is specified, the address is
printed numerically, according to the address family.
For more information regarding the Internet IPv4 ``dot format'', refer
to inet(3). Unspecified, or `wildcard'', addresses and ports appear
as `*''."
Reported By: rgrimes
Reviewed by: emaste, ngie, eadler, seanc
Relnotes: yes
Sponsored by: Klara, Inc.
Differential Revision: https://reviews.freebsd.org/D10320
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Now that we export the relevant stats via the net.route.stats sysctl,
switch to using that to avoid having to dig around in mem(4) for live
kernel statistics. Based on callers of kresolve_list(), this is the
last live path using mem(4) that could be functional today.
Tested both with `netstat -rs` and `netstat -rs -M`.
Note that this will not be able to extract stats from a running kernel
that predates 3360a15898 / 1500026, but this can be worked around by
specifying `-M /dev/mem` explicitly in the interim to fallback to
libkvm against /dev/mem.
Reviewed by: glebius, markj, zlei
Differential Revision: https://reviews.freebsd.org/D47231
|
| |
|
|
|
|
| |
Reviewed by: des
MFC after: 3 days
Differential Revision: https://reviews.freebsd.org/D41427
|
| |
|
|
|
|
|
|
|
|
|
| |
This reverts commit 94567c8641e235763b5b2926416d89d36654cde1.
This breaks normal netstat output. It's kinda tricky to do a quick fix
on, so revert this until that can be fixed. If via github, please
open a new pull request...
Sponsored by: Netflix
Pull Request: https://github.com/freebsd/freebsd-src/pull/1331
|
| |
|
|
|
|
|
|
|
| |
The key "shutdown-timer" was present twice in the libxo output. The second
occurence of "shutdown-time" has been renamed to "shutdown-ack-timer".
PR: 254672
Reviewed by: imp, zlei
Pull Request: https://github.com/freebsd/freebsd-src/pull/1331
|
| |
|
|
|
|
|
|
|
|
|
| |
The current libxo output uses the "dropped-packets" key for both incoming and
outgoing packets. This commit distinguishes between the two by adding an "in"
and "out" suffix. The original "dropped-packets" key is kept for backwards
compatibility for now.
PR: 244589
Reviewed by: imp, zlei
Pull Request: https://github.com/freebsd/freebsd-src/pull/1331
|
| |
|
|
|
|
|
|
| |
Add version information to libxo output so that
libxo content consumers can track changes.
Reviewed by: imp, markj
Pull Request: https://github.com/freebsd/freebsd-src/pull/1350
|
| |
|
|
|
|
|
|
|
|
|
| |
The man page states that the -d flag can be used to show the dropped
packets. But, the number of dropped input packets are always shown,
independent of the -d flag. This commit clarifies that the -d flag will
add the number of dropped output packets to the output.
MFC after: 3 days
Reviewed by: imp, Alexander Ziaee
Pull Request: https://github.com/freebsd/freebsd-src/pull/1332
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Implement the improved SEG.ACK validation described in RFC 5961.
In addition to that, also detect ghost ACKs, which are ACKs for data
that has never been sent.
The additional checks are enabled by default, but can be disabled
by setting the sysctl-variable net.inet.tcp.insecure_ack to a
non-zero value.
PR: 250357
Reviewed by: Peter Lei, rscheff (older version)
MFC after: 1 week
Sponsored by: Netflix, Inc.
Differential Revision: https://reviews.freebsd.org/D45894
|
| |
|
|
|
|
|
| |
This is a residual of the $FreeBSD$ removal.
MFC After: 3 days (though I'll just run the command on the branches)
Sponsored by: Netflix
|
| |
|
|
|
|
|
|
| |
If -W is specified, use IFNAMSIZ as the width of the Netif column,
instead of the default 12.
Reviewed by: imp,zlei,Mina Galić
Pull Request: https://github.com/freebsd/freebsd-src/pull/1223
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
The previous width of Netif (10 or 8) was too short for modern interface
names; make it 12, which is long enough to display "epair0a.1000".
This came up in practice with genet(4) interfaces, since the base
interface name is long enough that with the previous limit, VLAN
identifiers would be truncated at 1 character in the IPv6 output:
"genet0.100" becomes "genet0.1".
The width is now fixed, and doesn't depend on the address family,
because there's no reason that length of the interface name would vary
based on the AF.
Reviewed by: imp,zlei,Mina Galić
Pull Request: https://github.com/freebsd/freebsd-src/pull/1223
|
| |
|
|
|
|
|
|
|
|
|
| |
Add a counter to track how frequently SACK has transmitted
more than one MSS using TSO. Instances when this will be
beneficial is the use of PRR, or when ACK thinning due to
GRO/LRO or ACK discards by the network are present.
Reviewed By: tuexen, #transport
Sponsored by: NetApp, Inc.
Differential Revision: https://reviews.freebsd.org/D45070
|
| |
|
|
|
|
|
| |
Expose pflow counters via netstat.
Sponsored by: Rubicon Communications, LLC ("Netgate")
Differential Revision: https://reviews.freebsd.org/D43107
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Apply the following automated changes to try to eliminate
no-longer-needed sys/cdefs.h includes as well as now-empty
blank lines in a row.
Remove /^#if.*\n#endif.*\n#include\s+<sys/cdefs.h>.*\n/
Remove /\n+#include\s+<sys/cdefs.h>.*\n+#if.*\n#endif.*\n+/
Remove /\n+#if.*\n#endif.*\n+/
Remove /^#if.*\n#endif.*\n/
Remove /\n+#include\s+<sys/cdefs.h>\n#include\s+<sys/types.h>/
Remove /\n+#include\s+<sys/cdefs.h>\n#include\s+<sys/param.h>/
Remove /\n+#include\s+<sys/cdefs.h>\n#include\s+<sys/capsicum.h>/
Sponsored by: Netflix
|
| |
|
|
|
|
|
|
|
|
|
| |
We've ifdef'd out the copyright strings for some time now. Go ahead and
remove the ifdefs. Plus whatever other detritis was left over from other
recent removals. These copyright strings are present in the comments and
are largely from CSRG's attempt at adding their copyright to every
binary file (which modern interpretations of the license doesn't
require).
Sponsored by: Netflix
|
| |
|
|
|
|
|
|
| |
Remove ancient SCCS tags from the tree, automated scripting, with two
minor fixup to keep things compiling. All the common forms in the tree
were removed with a perl script.
Sponsored by: Netflix
|
| |
|
|
|
|
|
| |
PR: 275044
Submitted by: sigsys@gmail.com
Reviewed by: kp
MFC after: 1 week
|
| |
|
|
| |
Remove /^\.\\"\s*\$FreeBSD\$$\n/
|
| |
|
|
| |
Remove /^\s*#[#!]?\s*\$FreeBSD\$.*$\n/
|