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 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.
111 inetname(struct in_addr *inp)
114 static char line[MAXHOSTNAMELEN];
119 if (!numeric_addr && inp->s_addr != INADDR_ANY) {
120 int net = inet_netof(*inp);
121 int lna = inet_lnaof(*inp);
123 if (lna == INADDR_ANY) {
124 np = getnetbyaddr(net, AF_INET);
129 hp = gethostbyaddr((char *)inp, sizeof (*inp), AF_INET);
132 trimdomain(cp, strlen(cp));
136 if (inp->s_addr == INADDR_ANY)
139 strlcpy(line, cp, sizeof(line));
141 inp->s_addr = ntohl(inp->s_addr);
142 #define C(x) ((u_int)((x) & 0xff))
143 sprintf(line, "%u.%u.%u.%u", C(inp->s_addr >> 24),
144 C(inp->s_addr >> 16), C(inp->s_addr >> 8), C(inp->s_addr));
145 inp->s_addr = htonl(inp->s_addr);
151 static char ntop_buf[INET6_ADDRSTRLEN];
154 inet6name(struct in6_addr *in6p)
157 static char line[50];
159 static char domain[MAXHOSTNAMELEN];
160 static int first = 1;
162 if (first && !numeric_addr) {
164 if (gethostname(domain, MAXHOSTNAMELEN) == 0 &&
165 (cp = index(domain, '.')))
166 (void) strcpy(domain, cp + 1);
171 if (!numeric_addr && !IN6_IS_ADDR_UNSPECIFIED(in6p)) {
172 hp = gethostbyaddr((char *)in6p, sizeof(*in6p), AF_INET6);
174 if ((cp = index(hp->h_name, '.')) &&
175 !strcmp(cp + 1, domain))
180 if (IN6_IS_ADDR_UNSPECIFIED(in6p))
186 inet_ntop(AF_INET6, (void *)in6p, ntop_buf,
193 sctp_print_address(union sctp_sockstore *address, int port, int num_port)
195 struct servent *sp = 0;
199 switch (address->sa.sa_family) {
201 sprintf(line, "%.*s.", Wflag ? 39 : 16, inetname(&address->sin.sin_addr));
205 sprintf(line, "%.*s.", Wflag ? 39 : 16, inet6name(&address->sin6.sin6_addr));
209 sprintf(line, "%.*s.", Wflag ? 39 : 16, "");
212 cp = index(line, '\0');
213 if (!num_port && port)
214 sp = getservbyport((int)port, "sctp");
216 sprintf(cp, "%.15s ", sp ? sp->s_name : "*");
218 sprintf(cp, "%d ", ntohs((u_short)port));
219 width = Wflag ? 45 : 22;
220 printf("%-*.*s ", width, width, line);
224 sctp_skip_xinpcb_ifneed(char *buf, const size_t buflen, size_t *offset)
227 struct xsctp_tcb *xstcb;
228 struct xsctp_raddr *xraddr;
229 struct xsctp_laddr *xladdr;
231 while (*offset < buflen) {
232 xladdr = (struct xsctp_laddr *)(buf + *offset);
233 *offset += sizeof(struct xsctp_laddr);
234 if (xladdr->last == 1)
238 while (*offset < buflen) {
239 xstcb = (struct xsctp_tcb *)(buf + *offset);
240 *offset += sizeof(struct xsctp_tcb);
241 if (xstcb->last == 1)
246 while (*offset < buflen) {
247 xladdr = (struct xsctp_laddr *)(buf + *offset);
248 *offset += sizeof(struct xsctp_laddr);
249 if (xladdr->last == 1)
253 while (*offset < buflen) {
254 xraddr = (struct xsctp_raddr *)(buf + *offset);
255 *offset += sizeof(struct xsctp_raddr);
256 if (xraddr->last == 1)
262 * If Lflag is set, we don't care about the return value.
271 sctp_process_tcb(struct xsctp_tcb *xstcb,
272 char *buf, const size_t buflen, size_t *offset, int *indent)
274 int i, xl_total = 0, xr_total = 0, x_max;
275 struct xsctp_raddr *xraddr;
276 struct xsctp_laddr *xladdr;
277 struct xladdr_entry *prev_xl = NULL, *xl = NULL, *xl_tmp;
278 struct xraddr_entry *prev_xr = NULL, *xr = NULL, *xr_tmp;
280 LIST_INIT(&xladdr_head);
281 LIST_INIT(&xraddr_head);
284 * Make `struct xladdr_list' list and `struct xraddr_list' list
285 * to handle the address flexibly.
287 while (*offset < buflen) {
288 xladdr = (struct xsctp_laddr *)(buf + *offset);
289 *offset += sizeof(struct xsctp_laddr);
290 if (xladdr->last == 1)
294 xl = malloc(sizeof(struct xladdr_entry));
296 warnx("malloc %lu bytes",
297 (u_long)sizeof(struct xladdr_entry));
302 LIST_INSERT_HEAD(&xladdr_head, xl, xladdr_entries);
304 LIST_INSERT_AFTER(prev_xl, xl, xladdr_entries);
308 while (*offset < buflen) {
309 xraddr = (struct xsctp_raddr *)(buf + *offset);
310 *offset += sizeof(struct xsctp_raddr);
311 if (xraddr->last == 1)
315 xr = malloc(sizeof(struct xraddr_entry));
317 warnx("malloc %lu bytes",
318 (u_long)sizeof(struct xraddr_entry));
323 LIST_INSERT_HEAD(&xraddr_head, xr, xraddr_entries);
325 LIST_INSERT_AFTER(prev_xr, xr, xraddr_entries);
330 * Let's print the address infos.
332 xl = LIST_FIRST(&xladdr_head);
333 xr = LIST_FIRST(&xraddr_head);
334 x_max = (xl_total > xr_total) ? xl_total : xr_total;
335 for (i = 0; i < x_max; i++) {
336 if (((*indent == 0) && i > 0) || *indent > 0)
337 printf("%-12s ", " ");
340 sctp_print_address(&(xl->xladdr->address),
341 htons(xstcb->local_port), numeric_port);
344 printf("%-45s ", " ");
346 printf("%-22s ", " ");
350 if (xr != NULL && !Lflag) {
351 sctp_print_address(&(xr->xraddr->address),
352 htons(xstcb->remote_port), numeric_port);
356 xl = LIST_NEXT(xl, xladdr_entries);
358 xr = LIST_NEXT(xr, xraddr_entries);
360 if (i == 0 && !Lflag)
361 sctp_statesprint(xstcb->state);
369 * Free the list which be used to handle the address.
371 xl = LIST_FIRST(&xladdr_head);
373 xl_tmp = LIST_NEXT(xl, xladdr_entries);
378 xr = LIST_FIRST(&xraddr_head);
380 xr_tmp = LIST_NEXT(xr, xraddr_entries);
387 sctp_process_inpcb(struct xsctp_inpcb *xinpcb,
388 char *buf, const size_t buflen, size_t *offset)
390 int indent = 0, xladdr_total = 0, is_listening = 0;
391 static int first = 1;
393 struct xsctp_tcb *xstcb;
394 struct xsctp_laddr *xladdr;
398 if (xinpcb->maxqlen > 0)
403 printf("Active SCTP associations");
405 printf(" (including servers)");
407 printf("Current listen queue sizes (qlen/maxqlen)");
410 printf("%-6.6s %-5.5s %-8.8s %-22.22s\n",
411 "Proto", "Type", "Listen", "Local Address");
414 printf("%-6.6s %-5.5s %-45.45s %-45.45s %s\n",
416 "Local Address", "Foreign Address",
419 printf("%-6.6s %-5.5s %-22.22s %-22.22s %s\n",
421 "Local Address", "Foreign Address",
425 xladdr = (struct xsctp_laddr *)(buf + *offset);
426 if (Lflag && !is_listening) {
427 sctp_skip_xinpcb_ifneed(buf, buflen, offset);
431 if (xinpcb->flags & SCTP_PCB_FLAGS_BOUND_V6) {
432 /* Can't distinguish between sctp46 and sctp6 */
438 if (xinpcb->flags & SCTP_PCB_FLAGS_TCPTYPE)
440 else if (xinpcb->flags & SCTP_PCB_FLAGS_UDPTYPE)
448 snprintf(buf1, 9, "%hu/%hu", xinpcb->qlen, xinpcb->maxqlen);
449 printf("%-6.6s %-5.5s ", pname, tname);
450 printf("%-8.8s ", buf1);
453 offset_laddr = *offset;
456 while (*offset < buflen) {
457 xladdr = (struct xsctp_laddr *)(buf + *offset);
458 *offset += sizeof(struct xsctp_laddr);
460 if (aflag && !Lflag && (xladdr_total == 0) && process_closed) {
461 printf("%-6.6s %-5.5s ", pname, tname);
463 printf("%-91.91s CLOSED", " ");
465 printf("%-45.45s CLOSED", " ");
468 if (process_closed || is_listening) {
474 if (!Lflag && !is_listening && !process_closed)
477 if (xladdr_total == 0) {
478 printf("%-6.6s %-5.5s ", pname, tname);
482 "%-21.21s " : "%-12.12s ", " ");
484 sctp_print_address(&(xladdr->address),
485 htons(xinpcb->local_port), numeric_port);
486 if (aflag && !Lflag && xladdr_total == 0) {
488 if (process_closed) {
489 printf("%-45.45s CLOSED", " ");
491 printf("%-45.45s LISTEN", " ");
494 if (process_closed) {
495 printf("%-22.22s CLOSED", " ");
497 printf("%-22.22s LISTEN", " ");
504 xstcb = (struct xsctp_tcb *)(buf + *offset);
505 *offset += sizeof(struct xsctp_tcb);
506 if (aflag && (xladdr_total == 0) && xstcb->last && !process_closed) {
508 *offset = offset_laddr;
511 while (xstcb->last == 0 && *offset < buflen) {
512 printf("%-6.6s %-5.5s ", pname, tname);
513 sctp_process_tcb(xstcb, buf, buflen, offset, &indent);
515 xstcb = (struct xsctp_tcb *)(buf + *offset);
516 *offset += sizeof(struct xsctp_tcb);
521 * Print a summary of SCTP connections related to an Internet
525 sctp_protopr(u_long off __unused,
526 const char *name, int af1, int proto)
529 const char *mibvar = "net.inet.sctp.assoclist";
532 struct xsctp_inpcb *xinpcb;
534 if (proto != IPPROTO_SCTP)
537 if (sysctlbyname(mibvar, 0, &len, 0, 0) < 0) {
539 warn("sysctl: %s", mibvar);
542 if ((buf = malloc(len)) == 0) {
543 warnx("malloc %lu bytes", (u_long)len);
546 if (sysctlbyname(mibvar, buf, &len, 0, 0) < 0) {
547 warn("sysctl: %s", mibvar);
552 xinpcb = (struct xsctp_inpcb *)(buf + offset);
553 offset += sizeof(struct xsctp_inpcb);
554 while (xinpcb->last == 0 && offset < len) {
555 sctp_process_inpcb(xinpcb, buf, (const size_t)len,
558 xinpcb = (struct xsctp_inpcb *)(buf + offset);
559 offset += sizeof(struct xsctp_inpcb);
566 sctp_statesprint(uint32_t state)
571 case SCTP_STATE_COOKIE_WAIT:
572 idx = NETSTAT_SCTP_STATES_COOKIE_WAIT;
574 case SCTP_STATE_COOKIE_ECHOED:
575 idx = NETSTAT_SCTP_STATES_COOKIE_ECHOED;
577 case SCTP_STATE_OPEN:
578 idx = NETSTAT_SCTP_STATES_ESTABLISHED;
580 case SCTP_STATE_SHUTDOWN_SENT:
581 idx = NETSTAT_SCTP_STATES_SHUTDOWN_SENT;
583 case SCTP_STATE_SHUTDOWN_RECEIVED:
584 idx = NETSTAT_SCTP_STATES_SHUTDOWN_RECEIVED;
586 case SCTP_STATE_SHUTDOWN_ACK_SENT:
587 idx = NETSTAT_SCTP_STATES_SHUTDOWN_ACK_SENT;
589 case SCTP_STATE_SHUTDOWN_PENDING:
590 idx = NETSTAT_SCTP_STATES_SHUTDOWN_PENDING;
593 printf("UNKNOWN 0x%08x", state);
597 printf("%s", sctpstates[idx]);
601 * Dump SCTP statistics structure.
604 sctp_stats(u_long off, const char *name, int af1 __unused, int proto __unused)
606 struct sctpstat sctpstat, zerostat;
607 size_t len = sizeof(sctpstat);
611 memset(&zerostat, 0, len);
612 if (sysctlbyname("net.inet.sctp.stats", &sctpstat, &len,
613 zflag ? &zerostat : NULL, zflag ? len : 0) < 0) {
614 warn("sysctl: net.inet.sctp.stats");
618 kread(off, &sctpstat, len);
620 printf ("%s:\n", name);
622 #define p(f, m) if (sctpstat.f || sflag <= 1) \
623 printf(m, (uintmax_t)sctpstat.f, plural(sctpstat.f))
624 #define p1a(f, m) if (sctpstat.f || sflag <= 1) \
625 printf(m, (uintmax_t)sctpstat.f)
630 p(sctps_recvpackets, "\t%ju input packet%s\n");
631 p(sctps_recvdatagrams, "\t\t%ju datagram%s\n");
632 p(sctps_recvpktwithdata, "\t\t%ju packet%s that had data\n");
633 p(sctps_recvsacks, "\t\t%ju input SACK chunk%s\n");
634 p(sctps_recvdata, "\t\t%ju input DATA chunk%s\n");
635 p(sctps_recvdupdata, "\t\t%ju duplicate DATA chunk%s\n");
636 p(sctps_recvheartbeat, "\t\t%ju input HB chunk%s\n");
637 p(sctps_recvheartbeatack, "\t\t%ju HB-ACK chunk%s\n");
638 p(sctps_recvecne, "\t\t%ju input ECNE chunk%s\n");
639 p(sctps_recvauth, "\t\t%ju input AUTH chunk%s\n");
640 p(sctps_recvauthmissing, "\t\t%ju chunk%s missing AUTH\n");
641 p(sctps_recvivalhmacid, "\t\t%ju invalid HMAC id%s received\n");
642 p(sctps_recvivalkeyid, "\t\t%ju invalid secret id%s received\n");
643 p1a(sctps_recvauthfailed, "\t\t%ju auth failed\n");
644 p1a(sctps_recvexpress, "\t\t%ju fast path receives all one chunk\n");
645 p1a(sctps_recvexpressm, "\t\t%ju fast path multi-part data\n");
650 p(sctps_sendpackets, "\t%ju output packet%s\n");
651 p(sctps_sendsacks, "\t\t%ju output SACK%s\n");
652 p(sctps_senddata, "\t\t%ju output DATA chunk%s\n");
653 p(sctps_sendretransdata, "\t\t%ju retransmitted DATA chunk%s\n");
654 p(sctps_sendfastretrans, "\t\t%ju fast retransmitted DATA chunk%s\n");
655 p(sctps_sendmultfastretrans, "\t\t%ju FR'%s that happened more "
656 "than once to same chunk\n");
657 p(sctps_sendheartbeat, "\t\t%ju output HB chunk%s\n");
658 p(sctps_sendecne, "\t\t%ju output ECNE chunk%s\n");
659 p(sctps_sendauth, "\t\t%ju output AUTH chunk%s\n");
660 p1a(sctps_senderrors, "\t\t%ju ip_output error counter\n");
663 * PCKDROPREP statistics
665 printf("\tPacket drop statistics:\n");
666 p1a(sctps_pdrpfmbox, "\t\t%ju from middle box\n");
667 p1a(sctps_pdrpfehos, "\t\t%ju from end host\n");
668 p1a(sctps_pdrpmbda, "\t\t%ju with data\n");
669 p1a(sctps_pdrpmbct, "\t\t%ju non-data, non-endhost\n");
670 p1a(sctps_pdrpbwrpt, "\t\t%ju non-endhost, bandwidth rep only\n");
671 p1a(sctps_pdrpcrupt, "\t\t%ju not enough for chunk header\n");
672 p1a(sctps_pdrpnedat, "\t\t%ju not enough data to confirm\n");
673 p1a(sctps_pdrppdbrk, "\t\t%ju where process_chunk_drop said break\n");
674 p1a(sctps_pdrptsnnf, "\t\t%ju failed to find TSN\n");
675 p1a(sctps_pdrpdnfnd, "\t\t%ju attempt reverse TSN lookup\n");
676 p1a(sctps_pdrpdiwnp, "\t\t%ju e-host confirms zero-rwnd\n");
677 p1a(sctps_pdrpdizrw, "\t\t%ju midbox confirms no space\n");
678 p1a(sctps_pdrpbadd, "\t\t%ju data did not match TSN\n");
679 p(sctps_pdrpmark, "\t\t%ju TSN'%s marked for Fast Retran\n");
684 printf("\tTimeouts:\n");
685 p(sctps_timoiterator, "\t\t%ju iterator timer%s fired\n");
686 p(sctps_timodata, "\t\t%ju T3 data time out%s\n");
687 p(sctps_timowindowprobe, "\t\t%ju window probe (T3) timer%s fired\n");
688 p(sctps_timoinit, "\t\t%ju INIT timer%s fired\n");
689 p(sctps_timosack, "\t\t%ju sack timer%s fired\n");
690 p(sctps_timoshutdown, "\t\t%ju shutdown timer%s fired\n");
691 p(sctps_timoheartbeat, "\t\t%ju heartbeat timer%s fired\n");
692 p1a(sctps_timocookie, "\t\t%ju a cookie timeout fired\n");
693 p1a(sctps_timosecret, "\t\t%ju an endpoint changed its cookie"
695 p(sctps_timopathmtu, "\t\t%ju PMTU timer%s fired\n");
696 p(sctps_timoshutdownack, "\t\t%ju shutdown ack timer%s fired\n");
697 p(sctps_timoshutdownguard, "\t\t%ju shutdown guard timer%s fired\n");
698 p(sctps_timostrmrst, "\t\t%ju stream reset timer%s fired\n");
699 p(sctps_timoearlyfr, "\t\t%ju early FR timer%s fired\n");
700 p1a(sctps_timoasconf, "\t\t%ju an asconf timer fired\n");
701 p1a(sctps_timoautoclose, "\t\t%ju auto close timer fired\n");
702 p(sctps_timoassockill, "\t\t%ju asoc free timer%s expired\n");
703 p(sctps_timoinpkill, "\t\t%ju inp free timer%s expired\n");
707 * Early fast retransmission counters
709 p(sctps_earlyfrstart, "\t%ju TODO:sctps_earlyfrstart\n");
710 p(sctps_earlyfrstop, "\t%ju TODO:sctps_earlyfrstop\n");
711 p(sctps_earlyfrmrkretrans, "\t%ju TODO:sctps_earlyfrmrkretrans\n");
712 p(sctps_earlyfrstpout, "\t%ju TODO:sctps_earlyfrstpout\n");
713 p(sctps_earlyfrstpidsck1, "\t%ju TODO:sctps_earlyfrstpidsck1\n");
714 p(sctps_earlyfrstpidsck2, "\t%ju TODO:sctps_earlyfrstpidsck2\n");
715 p(sctps_earlyfrstpidsck3, "\t%ju TODO:sctps_earlyfrstpidsck3\n");
716 p(sctps_earlyfrstpidsck4, "\t%ju TODO:sctps_earlyfrstpidsck4\n");
717 p(sctps_earlyfrstrid, "\t%ju TODO:sctps_earlyfrstrid\n");
718 p(sctps_earlyfrstrout, "\t%ju TODO:sctps_earlyfrstrout\n");
719 p(sctps_earlyfrstrtmr, "\t%ju TODO:sctps_earlyfrstrtmr\n");
725 p1a(sctps_hdrops, "\t%ju packet shorter than header\n");
726 p1a(sctps_badsum, "\t%ju checksum error\n");
727 p1a(sctps_noport, "\t%ju no endpoint for port\n");
728 p1a(sctps_badvtag, "\t%ju bad v-tag\n");
729 p1a(sctps_badsid, "\t%ju bad SID\n");
730 p1a(sctps_nomem, "\t%ju no memory\n");
731 p1a(sctps_fastretransinrtt, "\t%ju number of multiple FR in a RTT "
734 p(sctps_markedretrans, "\t%ju TODO:sctps_markedretrans\n");
736 p1a(sctps_naglesent, "\t%ju RFC813 allowed sending\n");
737 p1a(sctps_naglequeued, "\t%ju RFC813 does not allow sending\n");
738 p1a(sctps_maxburstqueued, "\t%ju times max burst prohibited sending\n");
739 p1a(sctps_ifnomemqueued, "\t%ju look ahead tells us no memory in "
741 p(sctps_windowprobed, "\t%ju number%s of window probes sent\n");
742 p(sctps_lowlevelerr, "\t%ju time%s an output error to clamp "
743 "down on next user send\n");
744 p(sctps_lowlevelerrusr, "\t%ju time%s sctp_senderrors were "
745 "caused from a user\n");
746 p(sctps_datadropchklmt, "\t%ju number of in data drop%s due to "
747 "chunk limit reached\n");
748 p(sctps_datadroprwnd, "\t%ju number of in data drop%s due to rwnd "
750 p(sctps_ecnereducedcwnd, "\t%ju time%s a ECN reduced "
752 p1a(sctps_vtagexpress, "\t%ju used express lookup via vtag\n");
753 p1a(sctps_vtagbogus, "\t%ju collision in express lookup\n");
754 p(sctps_primary_randry, "\t%ju time%s the sender ran dry "
755 "of user data on primary\n");
756 p1a(sctps_cmt_randry, "\t%ju same for above\n");
757 p(sctps_slowpath_sack, "\t%ju sack%s the slow way\n");
758 p(sctps_wu_sacks_sent, "\t%ju window update only sack%s sent\n");
759 p(sctps_sends_with_flags, "\t%ju send%s with sinfo_flags !=0\n");
760 p(sctps_sends_with_unord, "\t%ju unordered send%s\n");
761 p(sctps_sends_with_eof, "\t%ju send%s with EOF flag set\n");
762 p(sctps_sends_with_abort, "\t%ju send%s with ABORT flag set\n");
763 p(sctps_protocol_drain_calls, "\t%ju time%s protocol drain called\n");
764 p(sctps_protocol_drains_done, "\t%ju time%s we did a protocol "
766 p(sctps_read_peeks, "\t%ju time%s recv was called with peek\n");
767 p(sctps_cached_chk, "\t%ju cached chunk%s used\n");
768 p1a(sctps_cached_strmoq, "\t%ju cached stream oq's used\n");
769 p(sctps_left_abandon, "\t%ju unread message%s abandonded by close\n");
770 p1a(sctps_send_burst_avoid, "\t%ju send burst avoidance, already "
771 "max burst inflight to net\n");
772 p1a(sctps_send_cwnd_avoid, "\t%ju send cwnd full avoidance, already "
773 "max burst inflight to net\n");
774 p(sctps_fwdtsn_map_over, "\t%ju number of map array over-run%s via "