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/cdefs.h>
35 #include <sys/param.h>
36 #include <sys/kernel.h>
39 SDT_PROVIDER_DEFINE(sctp);
41 /********************************************************/
42 /* Cwnd probe - tracks changes in the congestion window on a netp */
43 /********************************************************/
45 SDT_PROBE_DEFINE5(sctp, cwnd, net, init,
46 "uint32_t", /* The Vtag for this end */
47 "uint32_t", /* The port number of the local side << 16 |
48 * port number of remote in network byte
50 "uintptr_t", /* The pointer to the struct sctp_nets *
52 "int", /* The old value of the cwnd */
53 "int"); /* The new value of the cwnd */
56 SDT_PROBE_DEFINE5(sctp, cwnd, net, ack,
57 "uint32_t", /* The Vtag for this end */
58 "uint32_t", /* The port number of the local side << 16 |
59 * port number of remote in network byte
61 "uintptr_t", /* The pointer to the struct sctp_nets *
63 "int", /* The old value of the cwnd */
64 "int"); /* The new value of the cwnd */
67 SDT_PROBE_DEFINE5(sctp, cwnd, net, rttvar,
68 "uint64_t", /* The Vtag << 32 | localport << 16 |
70 "uint64_t", /* obw | nbw */
71 "uint64_t", /* bwrtt | newrtt */
72 "uint64_t", /* flight */
73 "uint64_t"); /* (cwnd << 32) | point << 16 | retval(0/1) */
75 SDT_PROBE_DEFINE5(sctp, cwnd, net, rttstep,
76 "uint64_t", /* The Vtag << 32 | localport << 16 |
78 "uint64_t", /* obw | nbw */
79 "uint64_t", /* bwrtt | newrtt */
80 "uint64_t", /* flight */
81 "uint64_t"); /* (cwnd << 32) | point << 16 | retval(0/1) */
83 /* FastRetransmit-DECREASE */
84 SDT_PROBE_DEFINE5(sctp, cwnd, net, fr,
85 "uint32_t", /* The Vtag for this end */
86 "uint32_t", /* The port number of the local side << 16 |
87 * port number of remote in network byte
89 "uintptr_t", /* The pointer to the struct sctp_nets *
91 "int", /* The old value of the cwnd */
92 "int"); /* The new value of the cwnd */
94 /* TimeOut-DECREASE */
95 SDT_PROBE_DEFINE5(sctp, cwnd, net, to,
96 "uint32_t", /* The Vtag for this end */
97 "uint32_t", /* The port number of the local side << 16 |
98 * port number of remote in network byte
100 "uintptr_t", /* The pointer to the struct sctp_nets *
102 "int", /* The old value of the cwnd */
103 "int"); /* The new value of the cwnd */
105 /* BurstLimit-DECREASE */
106 SDT_PROBE_DEFINE5(sctp, cwnd, net, bl,
107 "uint32_t", /* The Vtag for this end */
108 "uint32_t", /* The port number of the local side << 16 |
109 * port number of remote in network byte
111 "uintptr_t", /* The pointer to the struct sctp_nets *
113 "int", /* The old value of the cwnd */
114 "int"); /* The new value of the cwnd */
117 SDT_PROBE_DEFINE5(sctp, cwnd, net, ecn,
118 "uint32_t", /* The Vtag for this end */
119 "uint32_t", /* The port number of the local side << 16 |
120 * port number of remote in network byte
122 "uintptr_t", /* The pointer to the struct sctp_nets *
124 "int", /* The old value of the cwnd */
125 "int"); /* The new value of the cwnd */
127 /* PacketDrop-DECREASE */
128 SDT_PROBE_DEFINE5(sctp, cwnd, net, pd,
129 "uint32_t", /* The Vtag for this end */
130 "uint32_t", /* The port number of the local side << 16 |
131 * port number of remote in network byte
133 "uintptr_t", /* The pointer to the struct sctp_nets *
135 "int", /* The old value of the cwnd */
136 "int"); /* The new value of the cwnd */
138 /********************************************************/
139 /* Rwnd probe - tracks changes in the receiver window for an assoc */
140 /********************************************************/
141 SDT_PROBE_DEFINE4(sctp, rwnd, assoc, val,
142 "uint32_t", /* The Vtag for this end */
143 "uint32_t", /* The port number of the local side << 16 |
144 * port number of remote in network byte
146 "int", /* The up/down amount */
147 "int"); /* The new value of the cwnd */
149 /********************************************************/
150 /* flight probe - tracks changes in the flight size on a net or assoc */
151 /********************************************************/
152 SDT_PROBE_DEFINE5(sctp, flightsize, net, val,
153 "uint32_t", /* The Vtag for this end */
154 "uint32_t", /* The port number of the local side << 16 |
155 * port number of remote in network byte
157 "uintptr_t", /* The pointer to the struct sctp_nets *
159 "int", /* The up/down amount */
160 "int"); /* The new value of the cwnd */
162 /********************************************************/
163 /* The total flight version */
164 /********************************************************/
165 SDT_PROBE_DEFINE4(sctp, flightsize, assoc, val,
166 "uint32_t", /* The Vtag for this end */
167 "uint32_t", /* The port number of the local side << 16 |
168 * port number of remote in network byte
170 "int", /* The up/down amount */
171 "int"); /* The new value of the cwnd */
174 * Standard Solaris-compatible probes.
177 SDT_PROBE_DEFINE5_XLATE(sctp,,, receive,
178 "void *", "pktinfo_t *",
179 "struct sctp_tcb *", "csinfo_t *",
180 "struct mbuf *", "ipinfo_t *",
181 "struct sctp_tcb *", "sctpsinfo_t *",
182 "struct sctphdr *", "sctpinfo_t *");
184 SDT_PROBE_DEFINE5_XLATE(sctp,,, send,
185 "void *", "pktinfo_t *",
186 "struct sctp_tcb *", "csinfo_t *",
187 "uint8_t *", "ipinfo_t *",
188 "struct sctp_tcb *", "sctpsinfo_t *",
189 "struct sctphdr *", "sctpinfo_t *");
191 SDT_PROBE_DEFINE6_XLATE(sctp,,, state__change,
193 "struct sctp_tcb *", "csinfo_t *",
195 "struct sctp_tcb *", "sctpsinfo_t *",
197 "int", "sctplsinfo_t *");