]> CyberLeo.Net >> Repos - FreeBSD/stable/8.git/blob - sys/netinet/sctp_dtrace_define.h
MFC r215817:
[FreeBSD/stable/8.git] / sys / netinet / sctp_dtrace_define.h
1 /*-
2  * Copyright (c) 2010, by Randall Stewart & Michael Tuexen,
3  * All rights reserved.
4  *
5  * Redistribution and use in source and binary forms, with or without
6  * modification, are permitted provided that the following conditions are met:
7  *
8  * a) Redistributions of source code must retain the above copyright notice,
9  *   this list of conditions and the following disclaimer.
10  *
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.
14  *
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.
18  *
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.
30  */
31 #include <sys/cdefs.h>
32 __FBSDID("$FreeBSD$");
33 #ifndef __sctp_dtrace_define_h__
34 #include "opt_kdtrace.h"
35 #include <sys/kernel.h>
36 #include <sys/sdt.h>
37
38 SDT_PROVIDER_DEFINE(sctp);
39
40 /********************************************************/
41 /* Cwnd probe - tracks changes in the congestion window on a netp */
42 /********************************************************/
43 /* Initial */
44 SDT_PROBE_DEFINE(sctp, cwnd, net, init, init);
45 /* The Vtag for this end */
46 SDT_PROBE_ARGTYPE(sctp, cwnd, net, init, 0, "uint32_t");
47 /* The port number of the local side << 16 | port number of remote
48  * in network byte order.
49  */
50 SDT_PROBE_ARGTYPE(sctp, cwnd, net, init, 1, "uint32_t");
51 /* The pointer to the struct sctp_nets * changing */
52 SDT_PROBE_ARGTYPE(sctp, cwnd, net, init, 2, "uintptr_t");
53 /* The old value of the cwnd  */
54 SDT_PROBE_ARGTYPE(sctp, cwnd, net, init, 3, "int");
55 /* The new value of the cwnd */
56 SDT_PROBE_ARGTYPE(sctp, cwnd, net, init, 4, "int");
57
58
59 /* ACK-INCREASE */
60 SDT_PROBE_DEFINE(sctp, cwnd, net, ack, ack);
61 /* The Vtag for this end */
62 SDT_PROBE_ARGTYPE(sctp, cwnd, net, ack, 0, "uint32_t");
63 /* The port number of the local side << 16 | port number of remote
64  * in network byte order.
65  */
66 SDT_PROBE_ARGTYPE(sctp, cwnd, net, ack, 1, "uint32_t");
67 /* The pointer to the struct sctp_nets * changing */
68 SDT_PROBE_ARGTYPE(sctp, cwnd, net, ack, 2, "uintptr_t");
69 /* The old value of the cwnd  */
70 SDT_PROBE_ARGTYPE(sctp, cwnd, net, ack, 3, "int");
71 /* The new value of the cwnd */
72 SDT_PROBE_ARGTYPE(sctp, cwnd, net, ack, 4, "int");
73
74 /* FastRetransmit-DECREASE */
75 SDT_PROBE_DEFINE(sctp, cwnd, net, fr, fr);
76 /* The Vtag for this end */
77 SDT_PROBE_ARGTYPE(sctp, cwnd, net, fr, 0, "uint32_t");
78 /* The port number of the local side << 16 | port number of remote
79  * in network byte order.
80  */
81 SDT_PROBE_ARGTYPE(sctp, cwnd, net, fr, 1, "uint32_t");
82 /* The pointer to the struct sctp_nets * changing */
83 SDT_PROBE_ARGTYPE(sctp, cwnd, net, fr, 2, "uintptr_t");
84 /* The old value of the cwnd  */
85 SDT_PROBE_ARGTYPE(sctp, cwnd, net, fr, 3, "int");
86 /* The new value of the cwnd */
87 SDT_PROBE_ARGTYPE(sctp, cwnd, net, fr, 4, "int");
88
89
90 /* TimeOut-DECREASE */
91 SDT_PROBE_DEFINE(sctp, cwnd, net, to, to);
92 /* The Vtag for this end */
93 SDT_PROBE_ARGTYPE(sctp, cwnd, net, to, 0, "uint32_t");
94 /* The port number of the local side << 16 | port number of remote
95  * in network byte order.
96  */
97 SDT_PROBE_ARGTYPE(sctp, cwnd, net, to, 1, "uint32_t");
98 /* The pointer to the struct sctp_nets * changing */
99 SDT_PROBE_ARGTYPE(sctp, cwnd, net, to, 2, "uintptr_t");
100 /* The old value of the cwnd  */
101 SDT_PROBE_ARGTYPE(sctp, cwnd, net, to, 3, "int");
102 /* The new value of the cwnd */
103 SDT_PROBE_ARGTYPE(sctp, cwnd, net, to, 4, "int");
104
105
106 /* BurstLimit-DECREASE */
107 SDT_PROBE_DEFINE(sctp, cwnd, net, bl, bl);
108 /* The Vtag for this end */
109 SDT_PROBE_ARGTYPE(sctp, cwnd, net, bl, 0, "uint32_t");
110 /* The port number of the local side << 16 | port number of remote
111  * in network byte order.
112  */
113 SDT_PROBE_ARGTYPE(sctp, cwnd, net, bl, 1, "uint32_t");
114 /* The pointer to the struct sctp_nets * changing */
115 SDT_PROBE_ARGTYPE(sctp, cwnd, net, bl, 2, "uintptr_t");
116 /* The old value of the cwnd  */
117 SDT_PROBE_ARGTYPE(sctp, cwnd, net, bl, 3, "int");
118 /* The new value of the cwnd */
119 SDT_PROBE_ARGTYPE(sctp, cwnd, net, bl, 4, "int");
120
121
122 /* ECN-DECREASE */
123 SDT_PROBE_DEFINE(sctp, cwnd, net, ecn, ecn);
124 /* The Vtag for this end */
125 SDT_PROBE_ARGTYPE(sctp, cwnd, net, ecn, 0, "uint32_t");
126 /* The port number of the local side << 16 | port number of remote
127  * in network byte order.
128  */
129 SDT_PROBE_ARGTYPE(sctp, cwnd, net, ecn, 1, "uint32_t");
130 /* The pointer to the struct sctp_nets * changing */
131 SDT_PROBE_ARGTYPE(sctp, cwnd, net, ecn, 2, "uintptr_t");
132 /* The old value of the cwnd  */
133 SDT_PROBE_ARGTYPE(sctp, cwnd, net, ecn, 3, "int");
134 /* The new value of the cwnd */
135 SDT_PROBE_ARGTYPE(sctp, cwnd, net, ecn, 4, "int");
136
137
138 /* PacketDrop-DECREASE */
139 SDT_PROBE_DEFINE(sctp, cwnd, net, pd, pd);
140 /* The Vtag for this end */
141 SDT_PROBE_ARGTYPE(sctp, cwnd, net, pd, 0, "uint32_t");
142 /* The port number of the local side << 16 | port number of remote
143  * in network byte order.
144  */
145 SDT_PROBE_ARGTYPE(sctp, cwnd, net, pd, 1, "uint32_t");
146 /* The pointer to the struct sctp_nets * changing */
147 SDT_PROBE_ARGTYPE(sctp, cwnd, net, pd, 2, "uintptr_t");
148 /* The old value of the cwnd  */
149 SDT_PROBE_ARGTYPE(sctp, cwnd, net, pd, 3, "int");
150 /* The new value of the cwnd */
151 SDT_PROBE_ARGTYPE(sctp, cwnd, net, pd, 4, "int");
152
153
154
155 /********************************************************/
156 /* Rwnd probe - tracks changes in the receiver window for an assoc */
157 /********************************************************/
158 SDT_PROBE_DEFINE(sctp, rwnd, assoc, val, val);
159 /* The Vtag for this end */
160 SDT_PROBE_ARGTYPE(sctp, rwnd, assoc, val, 0, "uint32_t");
161 /* The port number of the local side << 16 | port number of remote
162  * in network byte order.
163  */
164 SDT_PROBE_ARGTYPE(sctp, rwnd, assoc, val, 1, "uint32_t");
165 /* The up/down amount */
166 SDT_PROBE_ARGTYPE(sctp, rwnd, assoc, val, 2, "int");
167 /* The new value of the cwnd */
168 SDT_PROBE_ARGTYPE(sctp, rwnd, assoc, val, 3, "int");
169
170 /********************************************************/
171 /* flight probe - tracks changes in the flight size on a net or assoc */
172 /********************************************************/
173 SDT_PROBE_DEFINE(sctp, flightsize, net, val, val);
174 /* The Vtag for this end */
175 SDT_PROBE_ARGTYPE(sctp, flightsize, net, val, 0, "uint32_t");
176 /* The port number of the local side << 16 | port number of remote
177  * in network byte order.
178  */
179 SDT_PROBE_ARGTYPE(sctp, flightsize, net, val, 1, "uint32_t");
180 /* The pointer to the struct sctp_nets * changing */
181 SDT_PROBE_ARGTYPE(sctp, flightsize, net, val, 2, "uintptr_t");
182 /* The up/down amount */
183 SDT_PROBE_ARGTYPE(sctp, flightsize, net, val, 3, "int");
184 /* The new value of the cwnd */
185 SDT_PROBE_ARGTYPE(sctp, flightsize, net, val, 4, "int");
186 /********************************************************/
187 /* The total flight version */
188 /********************************************************/
189 SDT_PROBE_DEFINE(sctp, flightsize, assoc, val, val);
190 /* The Vtag for this end */
191 SDT_PROBE_ARGTYPE(sctp, flightsize, assoc, val, 0, "uint32_t");
192 /* The port number of the local side << 16 | port number of remote
193  * in network byte order.
194  */
195 SDT_PROBE_ARGTYPE(sctp, flightsize, assoc, val, 1, "uint32_t");
196 /* The up/down amount */
197 SDT_PROBE_ARGTYPE(sctp, flightsize, assoc, val, 2, "int");
198 /* The new value of the cwnd */
199 SDT_PROBE_ARGTYPE(sctp, flightsize, assoc, val, 3, "int");
200
201 #endif