2 * SPDX-License-Identifier: BSD-3-Clause
4 * Copyright (c) 2008-2012, by Randall Stewart. All rights reserved.
5 * Copyright (c) 2008-2012, by Michael Tuexen. All rights reserved.
7 * Redistribution and use in source and binary forms, with or without
8 * modification, are permitted provided that the following conditions are met:
10 * a) Redistributions of source code must retain the above copyright notice,
11 * this list of conditions and the following disclaimer.
13 * b) Redistributions in binary form must reproduce the above copyright
14 * notice, this list of conditions and the following disclaimer in
15 * the documentation and/or other materials provided with the distribution.
17 * c) Neither the name of Cisco Systems, Inc. nor the names of its
18 * contributors may be used to endorse or promote products derived
19 * from this software without specific prior written permission.
21 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
22 * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
23 * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
24 * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE
25 * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
26 * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
27 * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
28 * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
29 * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
30 * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
31 * THE POSSIBILITY OF SUCH DAMAGE.
34 #include <sys/param.h>
35 #include <sys/kernel.h>
38 SDT_PROVIDER_DEFINE(sctp);
40 /********************************************************/
41 /* Cwnd probe - tracks changes in the congestion window on a netp */
42 /********************************************************/
44 SDT_PROBE_DEFINE5(sctp, cwnd, net, init,
45 "uint32_t", /* The Vtag for this end */
46 "uint32_t", /* The port number of the local side << 16 |
47 * port number of remote in network byte
49 "uintptr_t", /* The pointer to the struct sctp_nets *
51 "int", /* The old value of the cwnd */
52 "int"); /* The new value of the cwnd */
55 SDT_PROBE_DEFINE5(sctp, cwnd, net, ack,
56 "uint32_t", /* The Vtag for this end */
57 "uint32_t", /* The port number of the local side << 16 |
58 * port number of remote in network byte
60 "uintptr_t", /* The pointer to the struct sctp_nets *
62 "int", /* The old value of the cwnd */
63 "int"); /* The new value of the cwnd */
66 SDT_PROBE_DEFINE5(sctp, cwnd, net, rttvar,
67 "uint64_t", /* The Vtag << 32 | localport << 16 |
69 "uint64_t", /* obw | nbw */
70 "uint64_t", /* bwrtt | newrtt */
71 "uint64_t", /* flight */
72 "uint64_t"); /* (cwnd << 32) | point << 16 | retval(0/1) */
74 SDT_PROBE_DEFINE5(sctp, cwnd, net, rttstep,
75 "uint64_t", /* The Vtag << 32 | localport << 16 |
77 "uint64_t", /* obw | nbw */
78 "uint64_t", /* bwrtt | newrtt */
79 "uint64_t", /* flight */
80 "uint64_t"); /* (cwnd << 32) | point << 16 | retval(0/1) */
82 /* FastRetransmit-DECREASE */
83 SDT_PROBE_DEFINE5(sctp, cwnd, net, fr,
84 "uint32_t", /* The Vtag for this end */
85 "uint32_t", /* The port number of the local side << 16 |
86 * port number of remote in network byte
88 "uintptr_t", /* The pointer to the struct sctp_nets *
90 "int", /* The old value of the cwnd */
91 "int"); /* The new value of the cwnd */
93 /* TimeOut-DECREASE */
94 SDT_PROBE_DEFINE5(sctp, cwnd, net, to,
95 "uint32_t", /* The Vtag for this end */
96 "uint32_t", /* The port number of the local side << 16 |
97 * port number of remote in network byte
99 "uintptr_t", /* The pointer to the struct sctp_nets *
101 "int", /* The old value of the cwnd */
102 "int"); /* The new value of the cwnd */
104 /* BurstLimit-DECREASE */
105 SDT_PROBE_DEFINE5(sctp, cwnd, net, bl,
106 "uint32_t", /* The Vtag for this end */
107 "uint32_t", /* The port number of the local side << 16 |
108 * port number of remote in network byte
110 "uintptr_t", /* The pointer to the struct sctp_nets *
112 "int", /* The old value of the cwnd */
113 "int"); /* The new value of the cwnd */
116 SDT_PROBE_DEFINE5(sctp, cwnd, net, ecn,
117 "uint32_t", /* The Vtag for this end */
118 "uint32_t", /* The port number of the local side << 16 |
119 * port number of remote in network byte
121 "uintptr_t", /* The pointer to the struct sctp_nets *
123 "int", /* The old value of the cwnd */
124 "int"); /* The new value of the cwnd */
126 /* PacketDrop-DECREASE */
127 SDT_PROBE_DEFINE5(sctp, cwnd, net, pd,
128 "uint32_t", /* The Vtag for this end */
129 "uint32_t", /* The port number of the local side << 16 |
130 * port number of remote in network byte
132 "uintptr_t", /* The pointer to the struct sctp_nets *
134 "int", /* The old value of the cwnd */
135 "int"); /* The new value of the cwnd */
137 /********************************************************/
138 /* Rwnd probe - tracks changes in the receiver window for an assoc */
139 /********************************************************/
140 SDT_PROBE_DEFINE4(sctp, rwnd, assoc, val,
141 "uint32_t", /* The Vtag for this end */
142 "uint32_t", /* The port number of the local side << 16 |
143 * port number of remote in network byte
145 "int", /* The up/down amount */
146 "int"); /* The new value of the cwnd */
148 /********************************************************/
149 /* flight probe - tracks changes in the flight size on a net or assoc */
150 /********************************************************/
151 SDT_PROBE_DEFINE5(sctp, flightsize, net, val,
152 "uint32_t", /* The Vtag for this end */
153 "uint32_t", /* The port number of the local side << 16 |
154 * port number of remote in network byte
156 "uintptr_t", /* The pointer to the struct sctp_nets *
158 "int", /* The up/down amount */
159 "int"); /* The new value of the cwnd */
161 /********************************************************/
162 /* The total flight version */
163 /********************************************************/
164 SDT_PROBE_DEFINE4(sctp, flightsize, assoc, val,
165 "uint32_t", /* The Vtag for this end */
166 "uint32_t", /* The port number of the local side << 16 |
167 * port number of remote in network byte
169 "int", /* The up/down amount */
170 "int"); /* The new value of the cwnd */
173 * Standard Solaris-compatible probes.
176 SDT_PROBE_DEFINE5_XLATE(sctp,,, receive,
177 "void *", "pktinfo_t *",
178 "struct sctp_tcb *", "csinfo_t *",
179 "struct mbuf *", "ipinfo_t *",
180 "struct sctp_tcb *", "sctpsinfo_t *",
181 "struct sctphdr *", "sctpinfo_t *");
183 SDT_PROBE_DEFINE5_XLATE(sctp,,, send,
184 "void *", "pktinfo_t *",
185 "struct sctp_tcb *", "csinfo_t *",
186 "uint8_t *", "ipinfo_t *",
187 "struct sctp_tcb *", "sctpsinfo_t *",
188 "struct sctphdr *", "sctpinfo_t *");
190 SDT_PROBE_DEFINE6_XLATE(sctp,,, state__change,
192 "struct sctp_tcb *", "csinfo_t *",
194 "struct sctp_tcb *", "sctpsinfo_t *",
196 "int", "sctplsinfo_t *");