2 * Copyright (c) 2001-2007, by Weongyo Jeong. All rights reserved.
3 * Copyright (c) 2011, by Michael Tuexen. All rights reserved.
5 * Redistribution and use in source and binary forms, with or without
6 * modification, are permitted provided that the following conditions are met:
8 * a) Redistributions of source code must retain the above copyright notice,
9 * this list of conditions and the following disclaimer.
11 * b) Redistributions in binary form must reproduce the above copyright
12 * notice, this list of conditions and the following disclaimer in
13 * the documentation and/or other materials provided with the distribution.
15 * c) Neither the name of Cisco Systems, Inc. nor the names of its
16 * contributors may be used to endorse or promote products derived
17 * from this software without specific prior written permission.
19 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
20 * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
21 * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
22 * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE
23 * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
24 * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
25 * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
26 * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
27 * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
28 * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
29 * THE POSSIBILITY OF SUCH DAMAGE.
34 static char sccsid[] = "@(#)sctp.c 0.1 (Berkeley) 4/18/2007";
38 #include <sys/cdefs.h>
39 __FBSDID("$FreeBSD$");
41 #include <sys/param.h>
42 #include <sys/queue.h>
43 #include <sys/types.h>
44 #include <sys/socket.h>
45 #include <sys/socketvar.h>
46 #include <sys/sysctl.h>
47 #include <sys/protosw.h>
49 #include <netinet/in.h>
50 #include <netinet/sctp.h>
51 #include <netinet/sctp_constants.h>
52 #include <arpa/inet.h>
67 static void sctp_statesprint(uint32_t state);
69 #define NETSTAT_SCTP_STATES_CLOSED 0x0
70 #define NETSTAT_SCTP_STATES_BOUND 0x1
71 #define NETSTAT_SCTP_STATES_LISTEN 0x2
72 #define NETSTAT_SCTP_STATES_COOKIE_WAIT 0x3
73 #define NETSTAT_SCTP_STATES_COOKIE_ECHOED 0x4
74 #define NETSTAT_SCTP_STATES_ESTABLISHED 0x5
75 #define NETSTAT_SCTP_STATES_SHUTDOWN_SENT 0x6
76 #define NETSTAT_SCTP_STATES_SHUTDOWN_RECEIVED 0x7
77 #define NETSTAT_SCTP_STATES_SHUTDOWN_ACK_SENT 0x8
78 #define NETSTAT_SCTP_STATES_SHUTDOWN_PENDING 0x9
80 const char *sctpstates[] = {
93 LIST_HEAD(xladdr_list, xladdr_entry) xladdr_head;
95 struct xsctp_laddr *xladdr;
96 LIST_ENTRY(xladdr_entry) xladdr_entries;
99 LIST_HEAD(xraddr_list, xraddr_entry) xraddr_head;
100 struct xraddr_entry {
101 struct xsctp_raddr *xraddr;
102 LIST_ENTRY(xraddr_entry) xraddr_entries;
106 * Construct an Internet address representation.
107 * If numeric_addr has been supplied, give
108 * numeric value, otherwise try for symbolic name.
112 inetname(struct in_addr *inp)
115 static char line[MAXHOSTNAMELEN];
120 if (!numeric_addr && inp->s_addr != INADDR_ANY) {
121 int net = inet_netof(*inp);
122 int lna = inet_lnaof(*inp);
124 if (lna == INADDR_ANY) {
125 np = getnetbyaddr(net, AF_INET);
130 hp = gethostbyaddr((char *)inp, sizeof (*inp), AF_INET);
133 trimdomain(cp, strlen(cp));
137 if (inp->s_addr == INADDR_ANY)
140 strlcpy(line, cp, sizeof(line));
142 inp->s_addr = ntohl(inp->s_addr);
143 #define C(x) ((u_int)((x) & 0xff))
144 sprintf(line, "%u.%u.%u.%u", C(inp->s_addr >> 24),
145 C(inp->s_addr >> 16), C(inp->s_addr >> 8), C(inp->s_addr));
146 inp->s_addr = htonl(inp->s_addr);
153 static char ntop_buf[INET6_ADDRSTRLEN];
156 inet6name(struct in6_addr *in6p)
159 static char line[50];
161 static char domain[MAXHOSTNAMELEN];
162 static int first = 1;
164 if (first && !numeric_addr) {
166 if (gethostname(domain, MAXHOSTNAMELEN) == 0 &&
167 (cp = strchr(domain, '.')))
168 (void) strcpy(domain, cp + 1);
173 if (!numeric_addr && !IN6_IS_ADDR_UNSPECIFIED(in6p)) {
174 hp = gethostbyaddr((char *)in6p, sizeof(*in6p), AF_INET6);
176 if ((cp = strchr(hp->h_name, '.')) &&
177 !strcmp(cp + 1, domain))
182 if (IN6_IS_ADDR_UNSPECIFIED(in6p))
188 inet_ntop(AF_INET6, (void *)in6p, ntop_buf,
195 sctp_print_address(union sctp_sockstore *address, int port, int num_port)
197 struct servent *sp = 0;
201 switch (address->sa.sa_family) {
204 sprintf(line, "%.*s.", Wflag ? 39 : 16, inetname(&address->sin.sin_addr));
209 sprintf(line, "%.*s.", Wflag ? 39 : 16, inet6name(&address->sin6.sin6_addr));
213 sprintf(line, "%.*s.", Wflag ? 39 : 16, "");
216 cp = strchr(line, '\0');
217 if (!num_port && port)
218 sp = getservbyport((int)port, "sctp");
220 sprintf(cp, "%.15s ", sp ? sp->s_name : "*");
222 sprintf(cp, "%d ", ntohs((u_short)port));
223 width = Wflag ? 45 : 22;
224 printf("%-*.*s ", width, width, line);
228 sctp_skip_xinpcb_ifneed(char *buf, const size_t buflen, size_t *offset)
231 struct xsctp_tcb *xstcb;
232 struct xsctp_raddr *xraddr;
233 struct xsctp_laddr *xladdr;
235 while (*offset < buflen) {
236 xladdr = (struct xsctp_laddr *)(buf + *offset);
237 *offset += sizeof(struct xsctp_laddr);
238 if (xladdr->last == 1)
242 while (*offset < buflen) {
243 xstcb = (struct xsctp_tcb *)(buf + *offset);
244 *offset += sizeof(struct xsctp_tcb);
245 if (xstcb->last == 1)
250 while (*offset < buflen) {
251 xladdr = (struct xsctp_laddr *)(buf + *offset);
252 *offset += sizeof(struct xsctp_laddr);
253 if (xladdr->last == 1)
257 while (*offset < buflen) {
258 xraddr = (struct xsctp_raddr *)(buf + *offset);
259 *offset += sizeof(struct xsctp_raddr);
260 if (xraddr->last == 1)
266 * If Lflag is set, we don't care about the return value.
275 sctp_process_tcb(struct xsctp_tcb *xstcb,
276 char *buf, const size_t buflen, size_t *offset, int *indent)
278 int i, xl_total = 0, xr_total = 0, x_max;
279 struct xsctp_raddr *xraddr;
280 struct xsctp_laddr *xladdr;
281 struct xladdr_entry *prev_xl = NULL, *xl = NULL, *xl_tmp;
282 struct xraddr_entry *prev_xr = NULL, *xr = NULL, *xr_tmp;
284 LIST_INIT(&xladdr_head);
285 LIST_INIT(&xraddr_head);
288 * Make `struct xladdr_list' list and `struct xraddr_list' list
289 * to handle the address flexibly.
291 while (*offset < buflen) {
292 xladdr = (struct xsctp_laddr *)(buf + *offset);
293 *offset += sizeof(struct xsctp_laddr);
294 if (xladdr->last == 1)
298 xl = malloc(sizeof(struct xladdr_entry));
300 warnx("malloc %lu bytes",
301 (u_long)sizeof(struct xladdr_entry));
306 LIST_INSERT_HEAD(&xladdr_head, xl, xladdr_entries);
308 LIST_INSERT_AFTER(prev_xl, xl, xladdr_entries);
312 while (*offset < buflen) {
313 xraddr = (struct xsctp_raddr *)(buf + *offset);
314 *offset += sizeof(struct xsctp_raddr);
315 if (xraddr->last == 1)
319 xr = malloc(sizeof(struct xraddr_entry));
321 warnx("malloc %lu bytes",
322 (u_long)sizeof(struct xraddr_entry));
327 LIST_INSERT_HEAD(&xraddr_head, xr, xraddr_entries);
329 LIST_INSERT_AFTER(prev_xr, xr, xraddr_entries);
334 * Let's print the address infos.
336 xl = LIST_FIRST(&xladdr_head);
337 xr = LIST_FIRST(&xraddr_head);
338 x_max = (xl_total > xr_total) ? xl_total : xr_total;
339 for (i = 0; i < x_max; i++) {
340 if (((*indent == 0) && i > 0) || *indent > 0)
341 printf("%-12s ", " ");
344 sctp_print_address(&(xl->xladdr->address),
345 htons(xstcb->local_port), numeric_port);
348 printf("%-45s ", " ");
350 printf("%-22s ", " ");
354 if (xr != NULL && !Lflag) {
355 sctp_print_address(&(xr->xraddr->address),
356 htons(xstcb->remote_port), numeric_port);
360 xl = LIST_NEXT(xl, xladdr_entries);
362 xr = LIST_NEXT(xr, xraddr_entries);
364 if (i == 0 && !Lflag)
365 sctp_statesprint(xstcb->state);
373 * Free the list which be used to handle the address.
375 xl = LIST_FIRST(&xladdr_head);
377 xl_tmp = LIST_NEXT(xl, xladdr_entries);
382 xr = LIST_FIRST(&xraddr_head);
384 xr_tmp = LIST_NEXT(xr, xraddr_entries);
391 sctp_process_inpcb(struct xsctp_inpcb *xinpcb,
392 char *buf, const size_t buflen, size_t *offset)
394 int indent = 0, xladdr_total = 0, is_listening = 0;
395 static int first = 1;
396 const char *tname, *pname;
397 struct xsctp_tcb *xstcb;
398 struct xsctp_laddr *xladdr;
402 if (xinpcb->maxqlen > 0)
407 printf("Active SCTP associations");
409 printf(" (including servers)");
411 printf("Current listen queue sizes (qlen/maxqlen)");
414 printf("%-6.6s %-5.5s %-8.8s %-22.22s\n",
415 "Proto", "Type", "Listen", "Local Address");
418 printf("%-6.6s %-5.5s %-45.45s %-45.45s %s\n",
420 "Local Address", "Foreign Address",
423 printf("%-6.6s %-5.5s %-22.22s %-22.22s %s\n",
425 "Local Address", "Foreign Address",
429 xladdr = (struct xsctp_laddr *)(buf + *offset);
430 if (Lflag && !is_listening) {
431 sctp_skip_xinpcb_ifneed(buf, buflen, offset);
435 if (xinpcb->flags & SCTP_PCB_FLAGS_BOUND_V6) {
436 /* Can't distinguish between sctp46 and sctp6 */
442 if (xinpcb->flags & SCTP_PCB_FLAGS_TCPTYPE)
444 else if (xinpcb->flags & SCTP_PCB_FLAGS_UDPTYPE)
452 snprintf(buf1, 9, "%hu/%hu", xinpcb->qlen, xinpcb->maxqlen);
453 printf("%-6.6s %-5.5s ", pname, tname);
454 printf("%-8.8s ", buf1);
457 offset_laddr = *offset;
460 while (*offset < buflen) {
461 xladdr = (struct xsctp_laddr *)(buf + *offset);
462 *offset += sizeof(struct xsctp_laddr);
464 if (aflag && !Lflag && (xladdr_total == 0) && process_closed) {
465 printf("%-6.6s %-5.5s ", pname, tname);
467 printf("%-91.91s CLOSED", " ");
469 printf("%-45.45s CLOSED", " ");
472 if (process_closed || is_listening) {
478 if (!Lflag && !is_listening && !process_closed)
481 if (xladdr_total == 0) {
482 printf("%-6.6s %-5.5s ", pname, tname);
486 "%-21.21s " : "%-12.12s ", " ");
488 sctp_print_address(&(xladdr->address),
489 htons(xinpcb->local_port), numeric_port);
490 if (aflag && !Lflag && xladdr_total == 0) {
492 if (process_closed) {
493 printf("%-45.45s CLOSED", " ");
495 printf("%-45.45s LISTEN", " ");
498 if (process_closed) {
499 printf("%-22.22s CLOSED", " ");
501 printf("%-22.22s LISTEN", " ");
508 xstcb = (struct xsctp_tcb *)(buf + *offset);
509 *offset += sizeof(struct xsctp_tcb);
510 if (aflag && (xladdr_total == 0) && xstcb->last && !process_closed) {
512 *offset = offset_laddr;
515 while (xstcb->last == 0 && *offset < buflen) {
516 printf("%-6.6s %-5.5s ", pname, tname);
517 sctp_process_tcb(xstcb, buf, buflen, offset, &indent);
519 xstcb = (struct xsctp_tcb *)(buf + *offset);
520 *offset += sizeof(struct xsctp_tcb);
525 * Print a summary of SCTP connections related to an Internet
529 sctp_protopr(u_long off __unused,
530 const char *name __unused, int af1 __unused, int proto)
533 const char *mibvar = "net.inet.sctp.assoclist";
536 struct xsctp_inpcb *xinpcb;
538 if (proto != IPPROTO_SCTP)
541 if (sysctlbyname(mibvar, 0, &len, 0, 0) < 0) {
543 warn("sysctl: %s", mibvar);
546 if ((buf = malloc(len)) == 0) {
547 warnx("malloc %lu bytes", (u_long)len);
550 if (sysctlbyname(mibvar, buf, &len, 0, 0) < 0) {
551 warn("sysctl: %s", mibvar);
556 xinpcb = (struct xsctp_inpcb *)(buf + offset);
557 offset += sizeof(struct xsctp_inpcb);
558 while (xinpcb->last == 0 && offset < len) {
559 sctp_process_inpcb(xinpcb, buf, (const size_t)len,
562 xinpcb = (struct xsctp_inpcb *)(buf + offset);
563 offset += sizeof(struct xsctp_inpcb);
570 sctp_statesprint(uint32_t state)
575 case SCTP_STATE_COOKIE_WAIT:
576 idx = NETSTAT_SCTP_STATES_COOKIE_WAIT;
578 case SCTP_STATE_COOKIE_ECHOED:
579 idx = NETSTAT_SCTP_STATES_COOKIE_ECHOED;
581 case SCTP_STATE_OPEN:
582 idx = NETSTAT_SCTP_STATES_ESTABLISHED;
584 case SCTP_STATE_SHUTDOWN_SENT:
585 idx = NETSTAT_SCTP_STATES_SHUTDOWN_SENT;
587 case SCTP_STATE_SHUTDOWN_RECEIVED:
588 idx = NETSTAT_SCTP_STATES_SHUTDOWN_RECEIVED;
590 case SCTP_STATE_SHUTDOWN_ACK_SENT:
591 idx = NETSTAT_SCTP_STATES_SHUTDOWN_ACK_SENT;
593 case SCTP_STATE_SHUTDOWN_PENDING:
594 idx = NETSTAT_SCTP_STATES_SHUTDOWN_PENDING;
597 printf("UNKNOWN 0x%08x", state);
601 printf("%s", sctpstates[idx]);
605 * Dump SCTP statistics structure.
608 sctp_stats(u_long off, const char *name, int af1 __unused, int proto __unused)
610 struct sctpstat sctpstat, zerostat;
611 size_t len = sizeof(sctpstat);
615 memset(&zerostat, 0, len);
616 if (sysctlbyname("net.inet.sctp.stats", &sctpstat, &len,
617 zflag ? &zerostat : NULL, zflag ? len : 0) < 0) {
619 warn("sysctl: net.inet.sctp.stats");
623 kread(off, &sctpstat, len);
625 printf ("%s:\n", name);
627 #define p(f, m) if (sctpstat.f || sflag <= 1) \
628 printf(m, (uintmax_t)sctpstat.f, plural(sctpstat.f))
629 #define p1a(f, m) if (sctpstat.f || sflag <= 1) \
630 printf(m, (uintmax_t)sctpstat.f)
635 p(sctps_recvpackets, "\t%ju input packet%s\n");
636 p(sctps_recvdatagrams, "\t\t%ju datagram%s\n");
637 p(sctps_recvpktwithdata, "\t\t%ju packet%s that had data\n");
638 p(sctps_recvsacks, "\t\t%ju input SACK chunk%s\n");
639 p(sctps_recvdata, "\t\t%ju input DATA chunk%s\n");
640 p(sctps_recvdupdata, "\t\t%ju duplicate DATA chunk%s\n");
641 p(sctps_recvheartbeat, "\t\t%ju input HB chunk%s\n");
642 p(sctps_recvheartbeatack, "\t\t%ju HB-ACK chunk%s\n");
643 p(sctps_recvecne, "\t\t%ju input ECNE chunk%s\n");
644 p(sctps_recvauth, "\t\t%ju input AUTH chunk%s\n");
645 p(sctps_recvauthmissing, "\t\t%ju chunk%s missing AUTH\n");
646 p(sctps_recvivalhmacid, "\t\t%ju invalid HMAC id%s received\n");
647 p(sctps_recvivalkeyid, "\t\t%ju invalid secret id%s received\n");
648 p1a(sctps_recvauthfailed, "\t\t%ju auth failed\n");
649 p1a(sctps_recvexpress, "\t\t%ju fast path receives all one chunk\n");
650 p1a(sctps_recvexpressm, "\t\t%ju fast path multi-part data\n");
655 p(sctps_sendpackets, "\t%ju output packet%s\n");
656 p(sctps_sendsacks, "\t\t%ju output SACK%s\n");
657 p(sctps_senddata, "\t\t%ju output DATA chunk%s\n");
658 p(sctps_sendretransdata, "\t\t%ju retransmitted DATA chunk%s\n");
659 p(sctps_sendfastretrans, "\t\t%ju fast retransmitted DATA chunk%s\n");
660 p(sctps_sendmultfastretrans, "\t\t%ju FR'%s that happened more "
661 "than once to same chunk\n");
662 p(sctps_sendheartbeat, "\t\t%ju output HB chunk%s\n");
663 p(sctps_sendecne, "\t\t%ju output ECNE chunk%s\n");
664 p(sctps_sendauth, "\t\t%ju output AUTH chunk%s\n");
665 p1a(sctps_senderrors, "\t\t%ju ip_output error counter\n");
668 * PCKDROPREP statistics
670 printf("\tPacket drop statistics:\n");
671 p1a(sctps_pdrpfmbox, "\t\t%ju from middle box\n");
672 p1a(sctps_pdrpfehos, "\t\t%ju from end host\n");
673 p1a(sctps_pdrpmbda, "\t\t%ju with data\n");
674 p1a(sctps_pdrpmbct, "\t\t%ju non-data, non-endhost\n");
675 p1a(sctps_pdrpbwrpt, "\t\t%ju non-endhost, bandwidth rep only\n");
676 p1a(sctps_pdrpcrupt, "\t\t%ju not enough for chunk header\n");
677 p1a(sctps_pdrpnedat, "\t\t%ju not enough data to confirm\n");
678 p1a(sctps_pdrppdbrk, "\t\t%ju where process_chunk_drop said break\n");
679 p1a(sctps_pdrptsnnf, "\t\t%ju failed to find TSN\n");
680 p1a(sctps_pdrpdnfnd, "\t\t%ju attempt reverse TSN lookup\n");
681 p1a(sctps_pdrpdiwnp, "\t\t%ju e-host confirms zero-rwnd\n");
682 p1a(sctps_pdrpdizrw, "\t\t%ju midbox confirms no space\n");
683 p1a(sctps_pdrpbadd, "\t\t%ju data did not match TSN\n");
684 p(sctps_pdrpmark, "\t\t%ju TSN'%s marked for Fast Retran\n");
689 printf("\tTimeouts:\n");
690 p(sctps_timoiterator, "\t\t%ju iterator timer%s fired\n");
691 p(sctps_timodata, "\t\t%ju T3 data time out%s\n");
692 p(sctps_timowindowprobe, "\t\t%ju window probe (T3) timer%s fired\n");
693 p(sctps_timoinit, "\t\t%ju INIT timer%s fired\n");
694 p(sctps_timosack, "\t\t%ju sack timer%s fired\n");
695 p(sctps_timoshutdown, "\t\t%ju shutdown timer%s fired\n");
696 p(sctps_timoheartbeat, "\t\t%ju heartbeat timer%s fired\n");
697 p1a(sctps_timocookie, "\t\t%ju a cookie timeout fired\n");
698 p1a(sctps_timosecret, "\t\t%ju an endpoint changed its cookie"
700 p(sctps_timopathmtu, "\t\t%ju PMTU timer%s fired\n");
701 p(sctps_timoshutdownack, "\t\t%ju shutdown ack timer%s fired\n");
702 p(sctps_timoshutdownguard, "\t\t%ju shutdown guard timer%s fired\n");
703 p(sctps_timostrmrst, "\t\t%ju stream reset timer%s fired\n");
704 p(sctps_timoearlyfr, "\t\t%ju early FR timer%s fired\n");
705 p1a(sctps_timoasconf, "\t\t%ju an asconf timer fired\n");
706 p1a(sctps_timoautoclose, "\t\t%ju auto close timer fired\n");
707 p(sctps_timoassockill, "\t\t%ju asoc free timer%s expired\n");
708 p(sctps_timoinpkill, "\t\t%ju inp free timer%s expired\n");
712 * Early fast retransmission counters
714 p(sctps_earlyfrstart, "\t%ju TODO:sctps_earlyfrstart\n");
715 p(sctps_earlyfrstop, "\t%ju TODO:sctps_earlyfrstop\n");
716 p(sctps_earlyfrmrkretrans, "\t%ju TODO:sctps_earlyfrmrkretrans\n");
717 p(sctps_earlyfrstpout, "\t%ju TODO:sctps_earlyfrstpout\n");
718 p(sctps_earlyfrstpidsck1, "\t%ju TODO:sctps_earlyfrstpidsck1\n");
719 p(sctps_earlyfrstpidsck2, "\t%ju TODO:sctps_earlyfrstpidsck2\n");
720 p(sctps_earlyfrstpidsck3, "\t%ju TODO:sctps_earlyfrstpidsck3\n");
721 p(sctps_earlyfrstpidsck4, "\t%ju TODO:sctps_earlyfrstpidsck4\n");
722 p(sctps_earlyfrstrid, "\t%ju TODO:sctps_earlyfrstrid\n");
723 p(sctps_earlyfrstrout, "\t%ju TODO:sctps_earlyfrstrout\n");
724 p(sctps_earlyfrstrtmr, "\t%ju TODO:sctps_earlyfrstrtmr\n");
730 p1a(sctps_hdrops, "\t%ju packet shorter than header\n");
731 p1a(sctps_badsum, "\t%ju checksum error\n");
732 p1a(sctps_noport, "\t%ju no endpoint for port\n");
733 p1a(sctps_badvtag, "\t%ju bad v-tag\n");
734 p1a(sctps_badsid, "\t%ju bad SID\n");
735 p1a(sctps_nomem, "\t%ju no memory\n");
736 p1a(sctps_fastretransinrtt, "\t%ju number of multiple FR in a RTT "
739 p(sctps_markedretrans, "\t%ju TODO:sctps_markedretrans\n");
741 p1a(sctps_naglesent, "\t%ju RFC813 allowed sending\n");
742 p1a(sctps_naglequeued, "\t%ju RFC813 does not allow sending\n");
743 p1a(sctps_maxburstqueued, "\t%ju times max burst prohibited sending\n");
744 p1a(sctps_ifnomemqueued, "\t%ju look ahead tells us no memory in "
746 p(sctps_windowprobed, "\t%ju number%s of window probes sent\n");
747 p(sctps_lowlevelerr, "\t%ju time%s an output error to clamp "
748 "down on next user send\n");
749 p(sctps_lowlevelerrusr, "\t%ju time%s sctp_senderrors were "
750 "caused from a user\n");
751 p(sctps_datadropchklmt, "\t%ju number of in data drop%s due to "
752 "chunk limit reached\n");
753 p(sctps_datadroprwnd, "\t%ju number of in data drop%s due to rwnd "
755 p(sctps_ecnereducedcwnd, "\t%ju time%s a ECN reduced "
757 p1a(sctps_vtagexpress, "\t%ju used express lookup via vtag\n");
758 p1a(sctps_vtagbogus, "\t%ju collision in express lookup\n");
759 p(sctps_primary_randry, "\t%ju time%s the sender ran dry "
760 "of user data on primary\n");
761 p1a(sctps_cmt_randry, "\t%ju same for above\n");
762 p(sctps_slowpath_sack, "\t%ju sack%s the slow way\n");
763 p(sctps_wu_sacks_sent, "\t%ju window update only sack%s sent\n");
764 p(sctps_sends_with_flags, "\t%ju send%s with sinfo_flags !=0\n");
765 p(sctps_sends_with_unord, "\t%ju unordered send%s\n");
766 p(sctps_sends_with_eof, "\t%ju send%s with EOF flag set\n");
767 p(sctps_sends_with_abort, "\t%ju send%s with ABORT flag set\n");
768 p(sctps_protocol_drain_calls, "\t%ju time%s protocol drain called\n");
769 p(sctps_protocol_drains_done, "\t%ju time%s we did a protocol "
771 p(sctps_read_peeks, "\t%ju time%s recv was called with peek\n");
772 p(sctps_cached_chk, "\t%ju cached chunk%s used\n");
773 p1a(sctps_cached_strmoq, "\t%ju cached stream oq's used\n");
774 p(sctps_left_abandon, "\t%ju unread message%s abandonded by close\n");
775 p1a(sctps_send_burst_avoid, "\t%ju send burst avoidance, already "
776 "max burst inflight to net\n");
777 p1a(sctps_send_cwnd_avoid, "\t%ju send cwnd full avoidance, already "
778 "max burst inflight to net\n");
779 p(sctps_fwdtsn_map_over, "\t%ju number of map array over-run%s via "