Skip to content

Commit 978615d

Browse files
tuexencperciva
authored andcommitted
sockstat: add support for UDP-Lite endpoints
With this patch UDP-Lite endpoints are also show per default. Approved by: re (cperciva) Reviewed by: Peter Lei, Nick Banks Relnotes: yes Differential Revision: https://reviews.freebsd.org/D53230 (cherry picked from commit f48c639) (cherry picked from commit c10317b)
1 parent 7201675 commit 978615d

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

usr.bin/sockstat/main.c

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -108,7 +108,8 @@ static bool show_path_state = false;
108108
/*
109109
* Default protocols to use if no -P was defined.
110110
*/
111-
static const char *default_protos[] = {"sctp", "tcp", "udp", "divert" };
111+
static const char *default_protos[] = {"sctp", "tcp", "udp", "udplite",
112+
"divert" };
112113
static size_t default_numprotos = nitems(default_protos);
113114

114115
static int *protos; /* protocols to use */
@@ -626,6 +627,10 @@ gather_inet(int proto)
626627
varname = "net.inet.udp.pcblist";
627628
protoname = "udp";
628629
break;
630+
case IPPROTO_UDPLITE:
631+
varname = "net.inet.udplite.pcblist";
632+
protoname = "udplite";
633+
break;
629634
case IPPROTO_DIVERT:
630635
varname = "net.inet.divert.pcblist";
631636
protoname = "div";
@@ -674,6 +679,7 @@ gather_inet(int proto)
674679
protoname = xtp->t_flags & TF_TOE ? "toe" : "tcp";
675680
break;
676681
case IPPROTO_UDP:
682+
case IPPROTO_UDPLITE:
677683
case IPPROTO_DIVERT:
678684
xip = (struct xinpcb *)xig;
679685
if (!check_ksize(xip->xi_len, struct xinpcb))

0 commit comments

Comments
 (0)