xref: /freebsd/sys/netinet/in_kdtrace.h (revision f9bc005b8ef3b507a5ecbc2d7fe4411ef70eff38)
1 /*-
2  * SPDX-License-Identifier: BSD-2-Clause
3  *
4  * Copyright (c) 2013 Mark Johnston <markj@FreeBSD.org>
5  *
6  * Redistribution and use in source and binary forms, with or without
7  * modification, are permitted provided that the following conditions are met:
8  * 1. Redistributions of source code must retain the above copyright
9  *    notice, this list of conditions and the following disclaimer.
10  * 2. Redistributions in binary form must reproduce the above copyright
11  *    notice, this list of conditions and the following disclaimer in the
12  *    documentation and/or other materials provided with the
13  *    distribution.
14  *
15  * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
16  * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
17  * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
18  * ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
19  * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
20  * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
21  * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
22  * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
23  * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
24  * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
25  * SUCH DAMAGE.
26  */
27 
28 #ifndef _SYS_IN_KDTRACE_H_
29 #define	_SYS_IN_KDTRACE_H_
30 
31 #include <sys/sdt.h>
32 
33 #define	IP_PROBE(probe, arg0, arg1, arg2, arg3, arg4, arg5)		\
34 	SDT_PROBE6(ip, , , probe, arg0, arg1, arg2, arg3, arg4, arg5)
35 #define	UDP_PROBE(probe, arg0, arg1, arg2, arg3, arg4)			\
36 	SDT_PROBE5(udp, , , probe, arg0, arg1, arg2, arg3, arg4)
37 #define	UDPLITE_PROBE(probe, arg0, arg1, arg2, arg3, arg4)		\
38 	SDT_PROBE5(udplite, , , probe, arg0, arg1, arg2, arg3, arg4)
39 #define	TCP_PROBE1(probe, arg0)						\
40 	SDT_PROBE1(tcp, , , probe, arg0)
41 #define	TCP_PROBE2(probe, arg0, arg1)					\
42 	SDT_PROBE2(tcp, , , probe, arg0, arg1)
43 #define	TCP_PROBE3(probe, arg0, arg1, arg2)				\
44 	SDT_PROBE3(tcp, , , probe, arg0, arg1, arg2)
45 #define	TCP_PROBE4(probe, arg0, arg1, arg2, arg3)			\
46 	SDT_PROBE4(tcp, , , probe, arg0, arg1, arg2, arg3)
47 #define	TCP_PROBE5(probe, arg0, arg1, arg2, arg3, arg4)			\
48 	SDT_PROBE5(tcp, , , probe, arg0, arg1, arg2, arg3, arg4)
49 #define	TCP_PROBE6(probe, arg0, arg1, arg2, arg3, arg4, arg5)		\
50 	SDT_PROBE6(tcp, , , probe, arg0, arg1, arg2, arg3, arg4, arg5)
51 
52 SDT_PROVIDER_DECLARE(ip);
53 SDT_PROVIDER_DECLARE(tcp);
54 SDT_PROVIDER_DECLARE(udp);
55 SDT_PROVIDER_DECLARE(udplite);
56 
57 #ifdef KDTRACE_MIB_SDT
58 SDT_PROVIDER_DECLARE(mib);
59 
60 SDT_PROBE_DECLARE(mib, ip, count, ips_total);
61 SDT_PROBE_DECLARE(mib, ip, count, ips_badsum);
62 SDT_PROBE_DECLARE(mib, ip, count, ips_tooshort);
63 SDT_PROBE_DECLARE(mib, ip, count, ips_toosmall);
64 SDT_PROBE_DECLARE(mib, ip, count, ips_badhlen);
65 SDT_PROBE_DECLARE(mib, ip, count, ips_badlen);
66 SDT_PROBE_DECLARE(mib, ip, count, ips_fragments);
67 SDT_PROBE_DECLARE(mib, ip, count, ips_fragdropped);
68 SDT_PROBE_DECLARE(mib, ip, count, ips_fragtimeout);
69 SDT_PROBE_DECLARE(mib, ip, count, ips_forward);
70 SDT_PROBE_DECLARE(mib, ip, count, ips_fastforward);
71 SDT_PROBE_DECLARE(mib, ip, count, ips_cantforward);
72 SDT_PROBE_DECLARE(mib, ip, count, ips_redirectsent);
73 SDT_PROBE_DECLARE(mib, ip, count, ips_noproto);
74 SDT_PROBE_DECLARE(mib, ip, count, ips_delivered);
75 SDT_PROBE_DECLARE(mib, ip, count, ips_localout);
76 SDT_PROBE_DECLARE(mib, ip, count, ips_odropped);
77 SDT_PROBE_DECLARE(mib, ip, count, ips_reassembled);
78 SDT_PROBE_DECLARE(mib, ip, count, ips_fragmented);
79 SDT_PROBE_DECLARE(mib, ip, count, ips_ofragments);
80 SDT_PROBE_DECLARE(mib, ip, count, ips_cantfrag);
81 SDT_PROBE_DECLARE(mib, ip, count, ips_badoptions);
82 SDT_PROBE_DECLARE(mib, ip, count, ips_noroute);
83 SDT_PROBE_DECLARE(mib, ip, count, ips_badvers);
84 SDT_PROBE_DECLARE(mib, ip, count, ips_rawout);
85 SDT_PROBE_DECLARE(mib, ip, count, ips_toolong);
86 SDT_PROBE_DECLARE(mib, ip, count, ips_notmember);
87 SDT_PROBE_DECLARE(mib, ip, count, ips_nogif);
88 SDT_PROBE_DECLARE(mib, ip, count, ips_badaddr);
89 
90 SDT_PROBE_DECLARE(mib, ip6, count, ip6s_total);
91 SDT_PROBE_DECLARE(mib, ip6, count, ip6s_tooshort);
92 SDT_PROBE_DECLARE(mib, ip6, count, ip6s_toosmall);
93 SDT_PROBE_DECLARE(mib, ip6, count, ip6s_fragments);
94 SDT_PROBE_DECLARE(mib, ip6, count, ip6s_fragdropped);
95 SDT_PROBE_DECLARE(mib, ip6, count, ip6s_fragtimeout);
96 SDT_PROBE_DECLARE(mib, ip6, count, ip6s_fragoverflow);
97 SDT_PROBE_DECLARE(mib, ip6, count, ip6s_forward);
98 SDT_PROBE_DECLARE(mib, ip6, count, ip6s_cantforward);
99 SDT_PROBE_DECLARE(mib, ip6, count, ip6s_redirectsent);
100 SDT_PROBE_DECLARE(mib, ip6, count, ip6s_delivered);
101 SDT_PROBE_DECLARE(mib, ip6, count, ip6s_localout);
102 SDT_PROBE_DECLARE(mib, ip6, count, ip6s_odropped);
103 SDT_PROBE_DECLARE(mib, ip6, count, ip6s_reassembled);
104 SDT_PROBE_DECLARE(mib, ip6, count, ip6s_atomicfrags);
105 SDT_PROBE_DECLARE(mib, ip6, count, ip6s_fragmented);
106 SDT_PROBE_DECLARE(mib, ip6, count, ip6s_ofragments);
107 SDT_PROBE_DECLARE(mib, ip6, count, ip6s_cantfrag);
108 SDT_PROBE_DECLARE(mib, ip6, count, ip6s_badoptions);
109 SDT_PROBE_DECLARE(mib, ip6, count, ip6s_noroute);
110 SDT_PROBE_DECLARE(mib, ip6, count, ip6s_badvers);
111 SDT_PROBE_DECLARE(mib, ip6, count, ip6s_rawout);
112 SDT_PROBE_DECLARE(mib, ip6, count, ip6s_badscope);
113 SDT_PROBE_DECLARE(mib, ip6, count, ip6s_notmember);
114 SDT_PROBE_DECLARE(mib, ip6, count, ip6s_nxthist);
115 SDT_PROBE_DECLARE(mib, ip6, count, ip6s_m1);
116 SDT_PROBE_DECLARE(mib, ip6, count, ip6s_m2m);
117 SDT_PROBE_DECLARE(mib, ip6, count, ip6s_mext1);
118 SDT_PROBE_DECLARE(mib, ip6, count, ip6s_mext2m);
119 SDT_PROBE_DECLARE(mib, ip6, count, ip6s_exthdrtoolong);
120 SDT_PROBE_DECLARE(mib, ip6, count, ip6s_nogif);
121 SDT_PROBE_DECLARE(mib, ip6, count, ip6s_toomanyhdr);
122 SDT_PROBE_DECLARE(mib, ip6, count, ip6s_sources_none);
123 SDT_PROBE_DECLARE(mib, ip6, count, ip6s_sources_sameif);
124 SDT_PROBE_DECLARE(mib, ip6, count, ip6s_sources_otherif);
125 SDT_PROBE_DECLARE(mib, ip6, count, ip6s_sources_samescope);
126 SDT_PROBE_DECLARE(mib, ip6, count, ip6s_sources_otherscope);
127 SDT_PROBE_DECLARE(mib, ip6, count, ip6s_sources_deprecated);
128 SDT_PROBE_DECLARE(mib, ip6, count, ip6s_sources_rule);
129 
130 SDT_PROBE_DECLARE(mib, icmp, count, icps_error);
131 SDT_PROBE_DECLARE(mib, icmp, count, icps_oldshort);
132 SDT_PROBE_DECLARE(mib, icmp, count, icps_oldicmp);
133 SDT_PROBE_DECLARE(mib, icmp, count, icps_outhist);
134 SDT_PROBE_DECLARE(mib, icmp, count, icps_badcode);
135 SDT_PROBE_DECLARE(mib, icmp, count, icps_tooshort);
136 SDT_PROBE_DECLARE(mib, icmp, count, icps_checksum);
137 SDT_PROBE_DECLARE(mib, icmp, count, icps_badlen);
138 SDT_PROBE_DECLARE(mib, icmp, count, icps_reflect);
139 SDT_PROBE_DECLARE(mib, icmp, count, icps_inhist);
140 SDT_PROBE_DECLARE(mib, icmp, count, icps_bmcastecho);
141 SDT_PROBE_DECLARE(mib, icmp, count, icps_bmcasttstamp);
142 SDT_PROBE_DECLARE(mib, icmp, count, icps_badaddr);
143 SDT_PROBE_DECLARE(mib, icmp, count, icps_noroute);
144 
145 SDT_PROBE_DECLARE(mib, icmp6, count, icp6s_error);
146 SDT_PROBE_DECLARE(mib, icmp6, count, icp6s_canterror);
147 SDT_PROBE_DECLARE(mib, icmp6, count, icp6s_toofreq);
148 SDT_PROBE_DECLARE(mib, icmp6, count, icp6s_outhist);
149 SDT_PROBE_DECLARE(mib, icmp6, count, icp6s_badcode);
150 SDT_PROBE_DECLARE(mib, icmp6, count, icp6s_tooshort);
151 SDT_PROBE_DECLARE(mib, icmp6, count, icp6s_checksum);
152 SDT_PROBE_DECLARE(mib, icmp6, count, icp6s_badlen);
153 SDT_PROBE_DECLARE(mib, icmp6, count, icp6s_dropped);
154 SDT_PROBE_DECLARE(mib, icmp6, count, icp6s_reflect);
155 SDT_PROBE_DECLARE(mib, icmp6, count, icp6s_inhist);
156 SDT_PROBE_DECLARE(mib, icmp6, count, icp6s_nd_toomanyopt);
157 SDT_PROBE_DECLARE(mib, icmp6, count, icp6s_odst_unreach_noroute);
158 SDT_PROBE_DECLARE(mib, icmp6, count, icp6s_odst_unreach_admin);
159 SDT_PROBE_DECLARE(mib, icmp6, count, icp6s_odst_unreach_beyondscope);
160 SDT_PROBE_DECLARE(mib, icmp6, count, icp6s_odst_unreach_addr);
161 SDT_PROBE_DECLARE(mib, icmp6, count, icp6s_odst_unreach_noport);
162 SDT_PROBE_DECLARE(mib, icmp6, count, icp6s_opacket_too_big);
163 SDT_PROBE_DECLARE(mib, icmp6, count, icp6s_otime_exceed_transit);
164 SDT_PROBE_DECLARE(mib, icmp6, count, icp6s_otime_exceed_reassembly);
165 SDT_PROBE_DECLARE(mib, icmp6, count, icp6s_oparamprob_header);
166 SDT_PROBE_DECLARE(mib, icmp6, count, icp6s_oparamprob_nextheader);
167 SDT_PROBE_DECLARE(mib, icmp6, count, icp6s_oparamprob_option);
168 SDT_PROBE_DECLARE(mib, icmp6, count, icp6s_oredirect);
169 SDT_PROBE_DECLARE(mib, icmp6, count, icp6s_ounknown);
170 SDT_PROBE_DECLARE(mib, icmp6, count, icp6s_pmtuchg);
171 SDT_PROBE_DECLARE(mib, icmp6, count, icp6s_nd_badopt);
172 SDT_PROBE_DECLARE(mib, icmp6, count, icp6s_badns);
173 SDT_PROBE_DECLARE(mib, icmp6, count, icp6s_badna);
174 SDT_PROBE_DECLARE(mib, icmp6, count, icp6s_badrs);
175 SDT_PROBE_DECLARE(mib, icmp6, count, icp6s_badra);
176 SDT_PROBE_DECLARE(mib, icmp6, count, icp6s_badredirect);
177 SDT_PROBE_DECLARE(mib, icmp6, count, icp6s_overflowdefrtr);
178 SDT_PROBE_DECLARE(mib, icmp6, count, icp6s_overflowprfx);
179 SDT_PROBE_DECLARE(mib, icmp6, count, icp6s_overflownndp);
180 SDT_PROBE_DECLARE(mib, icmp6, count, icp6s_overflowredirect);
181 SDT_PROBE_DECLARE(mib, icmp6, count, icp6s_invlhlim);
182 
183 SDT_PROBE_DECLARE(mib, udp, count, udps_ipackets);
184 SDT_PROBE_DECLARE(mib, udp, count, udps_hdrops);
185 SDT_PROBE_DECLARE(mib, udp, count, udps_badsum);
186 SDT_PROBE_DECLARE(mib, udp, count, udps_nosum);
187 SDT_PROBE_DECLARE(mib, udp, count, udps_badlen);
188 SDT_PROBE_DECLARE(mib, udp, count, udps_noport);
189 SDT_PROBE_DECLARE(mib, udp, count, udps_noportbcast);
190 SDT_PROBE_DECLARE(mib, udp, count, udps_fullsock);
191 SDT_PROBE_DECLARE(mib, udp, count, udps_pcbcachemiss);
192 SDT_PROBE_DECLARE(mib, udp, count, udps_pcbhashmiss);
193 SDT_PROBE_DECLARE(mib, udp, count, udps_opackets);
194 SDT_PROBE_DECLARE(mib, udp, count, udps_fastout);
195 SDT_PROBE_DECLARE(mib, udp, count, udps_noportmcast);
196 SDT_PROBE_DECLARE(mib, udp, count, udps_filtermcast);
197 
198 SDT_PROBE_DECLARE(mib, tcp, count, tcps_connattempt);
199 SDT_PROBE_DECLARE(mib, tcp, count, tcps_accepts);
200 SDT_PROBE_DECLARE(mib, tcp, count, tcps_connects);
201 SDT_PROBE_DECLARE(mib, tcp, count, tcps_drops);
202 SDT_PROBE_DECLARE(mib, tcp, count, tcps_conndrops);
203 SDT_PROBE_DECLARE(mib, tcp, count, tcps_minmssdrops);
204 SDT_PROBE_DECLARE(mib, tcp, count, tcps_closed);
205 SDT_PROBE_DECLARE(mib, tcp, count, tcps_segstimed);
206 SDT_PROBE_DECLARE(mib, tcp, count, tcps_rttupdated);
207 SDT_PROBE_DECLARE(mib, tcp, count, tcps_delack);
208 SDT_PROBE_DECLARE(mib, tcp, count, tcps_timeoutdrop);
209 SDT_PROBE_DECLARE(mib, tcp, count, tcps_rexmttimeo);
210 SDT_PROBE_DECLARE(mib, tcp, count, tcps_persisttimeo);
211 SDT_PROBE_DECLARE(mib, tcp, count, tcps_keeptimeo);
212 SDT_PROBE_DECLARE(mib, tcp, count, tcps_keepprobe);
213 SDT_PROBE_DECLARE(mib, tcp, count, tcps_keepdrops);
214 SDT_PROBE_DECLARE(mib, tcp, count, tcps_progdrops);
215 
216 SDT_PROBE_DECLARE(mib, tcp, count, tcps_sndtotal);
217 SDT_PROBE_DECLARE(mib, tcp, count, tcps_sndpack);
218 SDT_PROBE_DECLARE(mib, tcp, count, tcps_sndbyte);
219 SDT_PROBE_DECLARE(mib, tcp, count, tcps_sndrexmitpack);
220 SDT_PROBE_DECLARE(mib, tcp, count, tcps_sndrexmitbyte);
221 SDT_PROBE_DECLARE(mib, tcp, count, tcps_sndrexmitbad);
222 SDT_PROBE_DECLARE(mib, tcp, count, tcps_sndacks);
223 SDT_PROBE_DECLARE(mib, tcp, count, tcps_sndprobe);
224 SDT_PROBE_DECLARE(mib, tcp, count, tcps_sndurg);
225 SDT_PROBE_DECLARE(mib, tcp, count, tcps_sndwinup);
226 SDT_PROBE_DECLARE(mib, tcp, count, tcps_sndctrl);
227 
228 SDT_PROBE_DECLARE(mib, tcp, count, tcps_rcvtotal);
229 SDT_PROBE_DECLARE(mib, tcp, count, tcps_rcvpack);
230 SDT_PROBE_DECLARE(mib, tcp, count, tcps_rcvbyte);
231 SDT_PROBE_DECLARE(mib, tcp, count, tcps_rcvbadsum);
232 SDT_PROBE_DECLARE(mib, tcp, count, tcps_rcvbadoff);
233 SDT_PROBE_DECLARE(mib, tcp, count, tcps_rcvreassfull);
234 SDT_PROBE_DECLARE(mib, tcp, count, tcps_rcvshort);
235 SDT_PROBE_DECLARE(mib, tcp, count, tcps_rcvduppack);
236 SDT_PROBE_DECLARE(mib, tcp, count, tcps_rcvdupbyte);
237 SDT_PROBE_DECLARE(mib, tcp, count, tcps_rcvpartduppack);
238 SDT_PROBE_DECLARE(mib, tcp, count, tcps_rcvpartdupbyte);
239 SDT_PROBE_DECLARE(mib, tcp, count, tcps_rcvoopack);
240 SDT_PROBE_DECLARE(mib, tcp, count, tcps_rcvoobyte);
241 SDT_PROBE_DECLARE(mib, tcp, count, tcps_rcvpackafterwin);
242 SDT_PROBE_DECLARE(mib, tcp, count, tcps_rcvbyteafterwin);
243 SDT_PROBE_DECLARE(mib, tcp, count, tcps_rcvafterclose);
244 SDT_PROBE_DECLARE(mib, tcp, count, tcps_rcvwinprobe);
245 SDT_PROBE_DECLARE(mib, tcp, count, tcps_rcvdupack);
246 SDT_PROBE_DECLARE(mib, tcp, count, tcps_rcvacktoomuch);
247 SDT_PROBE_DECLARE(mib, tcp, count, tcps_rcvackpack);
248 SDT_PROBE_DECLARE(mib, tcp, count, tcps_rcvackbyte);
249 SDT_PROBE_DECLARE(mib, tcp, count, tcps_rcvwinupd);
250 SDT_PROBE_DECLARE(mib, tcp, count, tcps_pawsdrop);
251 SDT_PROBE_DECLARE(mib, tcp, count, tcps_predack);
252 SDT_PROBE_DECLARE(mib, tcp, count, tcps_preddat);
253 SDT_PROBE_DECLARE(mib, tcp, count, tcps_pcbcachemiss);
254 SDT_PROBE_DECLARE(mib, tcp, count, tcps_usedrtt);
255 SDT_PROBE_DECLARE(mib, tcp, count, tcps_usedrttvar);
256 SDT_PROBE_DECLARE(mib, tcp, count, tcps_usedssthresh);
257 SDT_PROBE_DECLARE(mib, tcp, count, tcps_persistdrop);
258 SDT_PROBE_DECLARE(mib, tcp, count, tcps_badsyn);
259 SDT_PROBE_DECLARE(mib, tcp, count, tcps_mturesent);
260 SDT_PROBE_DECLARE(mib, tcp, count, tcps_listendrop);
261 SDT_PROBE_DECLARE(mib, tcp, count, tcps_badrst);
262 
263 SDT_PROBE_DECLARE(mib, tcp, count, tcps_sc_added);
264 SDT_PROBE_DECLARE(mib, tcp, count, tcps_sc_retransmitted);
265 SDT_PROBE_DECLARE(mib, tcp, count, tcps_sc_dupsyn);
266 SDT_PROBE_DECLARE(mib, tcp, count, tcps_sc_dropped);
267 SDT_PROBE_DECLARE(mib, tcp, count, tcps_sc_completed);
268 SDT_PROBE_DECLARE(mib, tcp, count, tcps_sc_bucketoverflow);
269 SDT_PROBE_DECLARE(mib, tcp, count, tcps_sc_cacheoverflow);
270 SDT_PROBE_DECLARE(mib, tcp, count, tcps_sc_reset);
271 SDT_PROBE_DECLARE(mib, tcp, count, tcps_sc_stale);
272 SDT_PROBE_DECLARE(mib, tcp, count, tcps_sc_aborted);
273 SDT_PROBE_DECLARE(mib, tcp, count, tcps_sc_badack);
274 SDT_PROBE_DECLARE(mib, tcp, count, tcps_sc_unreach);
275 SDT_PROBE_DECLARE(mib, tcp, count, tcps_sc_zonefail);
276 SDT_PROBE_DECLARE(mib, tcp, count, tcps_sc_sendcookie);
277 SDT_PROBE_DECLARE(mib, tcp, count, tcps_sc_recvcookie);
278 SDT_PROBE_DECLARE(mib, tcp, count, tcps_sc_spurcookie);
279 SDT_PROBE_DECLARE(mib, tcp, count, tcps_sc_failcookie);
280 
281 SDT_PROBE_DECLARE(mib, tcp, count, tcps_hc_hits);
282 SDT_PROBE_DECLARE(mib, tcp, count, tcps_hc_misses);
283 SDT_PROBE_DECLARE(mib, tcp, count, tcps_hc_added);
284 SDT_PROBE_DECLARE(mib, tcp, count, tcps_hc_bucketoverflow);
285 SDT_PROBE_DECLARE(mib, tcp, count, tcps_hc_allocfail);
286 SDT_PROBE_DECLARE(mib, tcp, count, tcps_cachedrtt);
287 SDT_PROBE_DECLARE(mib, tcp, count, tcps_cachedrttvar);
288 SDT_PROBE_DECLARE(mib, tcp, count, tcps_cachedssthresh);
289 SDT_PROBE_DECLARE(mib, tcp, count, tcps_cachedcwnd);
290 SDT_PROBE_DECLARE(mib, tcp, count, tcps_cachedsendpipe);
291 SDT_PROBE_DECLARE(mib, tcp, count, tcps_cachedrecvpipe);
292 
293 SDT_PROBE_DECLARE(mib, tcp, count, tcps_finwait2_drops);
294 
295 SDT_PROBE_DECLARE(mib, tcp, count, tcps_sack_recovery_episode);
296 SDT_PROBE_DECLARE(mib, tcp, count, tcps_sack_rexmits);
297 SDT_PROBE_DECLARE(mib, tcp, count, tcps_sack_rexmits_tso);
298 SDT_PROBE_DECLARE(mib, tcp, count, tcps_sack_rexmit_bytes);
299 SDT_PROBE_DECLARE(mib, tcp, count, tcps_sack_rcv_blocks);
300 SDT_PROBE_DECLARE(mib, tcp, count, tcps_sack_send_blocks);
301 SDT_PROBE_DECLARE(mib, tcp, count, tcps_sack_lostrexmt);
302 SDT_PROBE_DECLARE(mib, tcp, count, tcps_sack_sboverflow);
303 
304 SDT_PROBE_DECLARE(mib, tcp, count, tcps_ecn_rcvce);
305 SDT_PROBE_DECLARE(mib, tcp, count, tcps_ecn_rcvect0);
306 SDT_PROBE_DECLARE(mib, tcp, count, tcps_ecn_rcvect1);
307 SDT_PROBE_DECLARE(mib, tcp, count, tcps_ecn_shs);
308 SDT_PROBE_DECLARE(mib, tcp, count, tcps_ecn_rcwnd);
309 
310 SDT_PROBE_DECLARE(mib, tcp, count, tcps_sig_rcvgoodsig);
311 SDT_PROBE_DECLARE(mib, tcp, count, tcps_sig_rcvbadsig);
312 SDT_PROBE_DECLARE(mib, tcp, count, tcps_sig_err_buildsig);
313 SDT_PROBE_DECLARE(mib, tcp, count, tcps_sig_err_sigopt);
314 SDT_PROBE_DECLARE(mib, tcp, count, tcps_sig_err_nosigopt);
315 
316 SDT_PROBE_DECLARE(mib, tcp, count, tcps_pmtud_blackhole_activated);
317 SDT_PROBE_DECLARE(mib, tcp, count, tcps_pmtud_blackhole_activated_min_mss);
318 SDT_PROBE_DECLARE(mib, tcp, count, tcps_pmtud_blackhole_failed);
319 
320 SDT_PROBE_DECLARE(mib, tcp, count, tcps_tunneled_pkts);
321 SDT_PROBE_DECLARE(mib, tcp, count, tcps_tunneled_errs);
322 
323 SDT_PROBE_DECLARE(mib, tcp, count, tcps_dsack_count);
324 SDT_PROBE_DECLARE(mib, tcp, count, tcps_dsack_bytes);
325 SDT_PROBE_DECLARE(mib, tcp, count, tcps_dsack_tlp_bytes);
326 
327 SDT_PROBE_DECLARE(mib, tcp, count, tcps_tw_recycles);
328 SDT_PROBE_DECLARE(mib, tcp, count, tcps_tw_resets);
329 SDT_PROBE_DECLARE(mib, tcp, count, tcps_tw_responds);
330 
331 SDT_PROBE_DECLARE(mib, tcp, count, tcps_ace_nect);
332 SDT_PROBE_DECLARE(mib, tcp, count, tcps_ace_ect1);
333 SDT_PROBE_DECLARE(mib, tcp, count, tcps_ace_ect0);
334 SDT_PROBE_DECLARE(mib, tcp, count, tcps_ace_ce);
335 
336 SDT_PROBE_DECLARE(mib, tcp, count, tcps_ecn_sndect0);
337 SDT_PROBE_DECLARE(mib, tcp, count, tcps_ecn_sndect1);
338 
339 SDT_PROBE_DECLARE(mib, tcp, count, tcps_tlpresends);
340 SDT_PROBE_DECLARE(mib, tcp, count, tcps_tlpresend_bytes);
341 
342 SDT_PROBE_DECLARE(mib, tcp, count, tcps_rcvghostack);
343 SDT_PROBE_DECLARE(mib, tcp, count, tcps_rcvacktooold);
344 
345 SDT_PROBE_DECLARE(mib, ipsec, count, ips_in_polvio);
346 SDT_PROBE_DECLARE(mib, ipsec, count, ips_in_nomem);
347 SDT_PROBE_DECLARE(mib, ipsec, count, ips_in_inval);
348 SDT_PROBE_DECLARE(mib, ipsec, count, ips_out_polvio);
349 SDT_PROBE_DECLARE(mib, ipsec, count, ips_out_nosa);
350 SDT_PROBE_DECLARE(mib, ipsec, count, ips_out_nomem);
351 SDT_PROBE_DECLARE(mib, ipsec, count, ips_out_noroute);
352 SDT_PROBE_DECLARE(mib, ipsec, count, ips_out_inval);
353 SDT_PROBE_DECLARE(mib, ipsec, count, ips_out_bundlesa);
354 
355 SDT_PROBE_DECLARE(mib, ipsec, count, ips_spdcache_hits);
356 SDT_PROBE_DECLARE(mib, ipsec, count, ips_spdcache_misses);
357 
358 SDT_PROBE_DECLARE(mib, ipsec, count, ips_clcopied);
359 SDT_PROBE_DECLARE(mib, ipsec, count, ips_mbinserted);
360 SDT_PROBE_DECLARE(mib, ipsec, count, ips_input_front);
361 SDT_PROBE_DECLARE(mib, ipsec, count, ips_input_middle);
362 SDT_PROBE_DECLARE(mib, ipsec, count, ips_input_end);
363 
364 SDT_PROBE_DECLARE(mib, esp, count, esps_hdrops);
365 SDT_PROBE_DECLARE(mib, esp, count, esps_nopf);
366 SDT_PROBE_DECLARE(mib, esp, count, esps_notdb);
367 SDT_PROBE_DECLARE(mib, esp, count, esps_badkcr);
368 SDT_PROBE_DECLARE(mib, esp, count, esps_qfull);
369 SDT_PROBE_DECLARE(mib, esp, count, esps_noxform);
370 SDT_PROBE_DECLARE(mib, esp, count, esps_badilen);
371 SDT_PROBE_DECLARE(mib, esp, count, esps_wrap);
372 SDT_PROBE_DECLARE(mib, esp, count, esps_badenc);
373 SDT_PROBE_DECLARE(mib, esp, count, esps_badauth);
374 SDT_PROBE_DECLARE(mib, esp, count, esps_replay);
375 SDT_PROBE_DECLARE(mib, esp, count, esps_input);
376 SDT_PROBE_DECLARE(mib, esp, count, esps_output);
377 SDT_PROBE_DECLARE(mib, esp, count, esps_invalid);
378 SDT_PROBE_DECLARE(mib, esp, count, esps_ibytes);
379 SDT_PROBE_DECLARE(mib, esp, count, esps_obytes);
380 SDT_PROBE_DECLARE(mib, esp, count, esps_toobig);
381 SDT_PROBE_DECLARE(mib, esp, count, esps_pdrops);
382 SDT_PROBE_DECLARE(mib, esp, count, esps_crypto);
383 SDT_PROBE_DECLARE(mib, esp, count, esps_tunnel);
384 SDT_PROBE_DECLARE(mib, esp, count, esps_hist);
385 
386 SDT_PROBE_DECLARE(mib, ah, count, ahs_hdrops);
387 SDT_PROBE_DECLARE(mib, ah, count, ahs_nopf);
388 SDT_PROBE_DECLARE(mib, ah, count, ahs_notdb);
389 SDT_PROBE_DECLARE(mib, ah, count, ahs_badkcr);
390 SDT_PROBE_DECLARE(mib, ah, count, ahs_badauth);
391 SDT_PROBE_DECLARE(mib, ah, count, ahs_noxform);
392 SDT_PROBE_DECLARE(mib, ah, count, ahs_qfull);
393 SDT_PROBE_DECLARE(mib, ah, count, ahs_wrap);
394 SDT_PROBE_DECLARE(mib, ah, count, ahs_replay);
395 SDT_PROBE_DECLARE(mib, ah, count, ahs_badauthl);
396 SDT_PROBE_DECLARE(mib, ah, count, ahs_input);
397 SDT_PROBE_DECLARE(mib, ah, count, ahs_output);
398 SDT_PROBE_DECLARE(mib, ah, count, ahs_invalid);
399 SDT_PROBE_DECLARE(mib, ah, count, ahs_ibytes);
400 SDT_PROBE_DECLARE(mib, ah, count, ahs_obytes);
401 SDT_PROBE_DECLARE(mib, ah, count, ahs_toobig);
402 SDT_PROBE_DECLARE(mib, ah, count, ahs_pdrops);
403 SDT_PROBE_DECLARE(mib, ah, count, ahs_crypto);
404 SDT_PROBE_DECLARE(mib, ah, count, ahs_tunnel);
405 SDT_PROBE_DECLARE(mib, ah, count, ahs_hist);
406 
407 SDT_PROBE_DECLARE(mib, ipcomp, count, ipcomps_hdrops);
408 SDT_PROBE_DECLARE(mib, ipcomp, count, ipcomps_nopf);
409 SDT_PROBE_DECLARE(mib, ipcomp, count, ipcomps_notdb);
410 SDT_PROBE_DECLARE(mib, ipcomp, count, ipcomps_badkcr);
411 SDT_PROBE_DECLARE(mib, ipcomp, count, ipcomps_qfull);
412 SDT_PROBE_DECLARE(mib, ipcomp, count, ipcomps_noxform);
413 SDT_PROBE_DECLARE(mib, ipcomp, count, ipcomps_wrap);
414 SDT_PROBE_DECLARE(mib, ipcomp, count, ipcomps_input);
415 SDT_PROBE_DECLARE(mib, ipcomp, count, ipcomps_output);
416 SDT_PROBE_DECLARE(mib, ipcomp, count, ipcomps_invalid);
417 SDT_PROBE_DECLARE(mib, ipcomp, count, ipcomps_ibytes);
418 SDT_PROBE_DECLARE(mib, ipcomp, count, ipcomps_obytes);
419 SDT_PROBE_DECLARE(mib, ipcomp, count, ipcomps_toobig);
420 SDT_PROBE_DECLARE(mib, ipcomp, count, ipcomps_pdrops);
421 SDT_PROBE_DECLARE(mib, ipcomp, count, ipcomps_crypto);
422 SDT_PROBE_DECLARE(mib, ipcomp, count, ipcomps_hist);
423 SDT_PROBE_DECLARE(mib, ipcomp, count, ipcomps_threshold);
424 SDT_PROBE_DECLARE(mib, ipcomp, count, ipcomps_uncompr);
425 
426 #endif
427 
428 SDT_PROBE_DECLARE(ip, , , receive);
429 SDT_PROBE_DECLARE(ip, , , send);
430 
431 SDT_PROBE_DECLARE(tcp, , , accept__established);
432 SDT_PROBE_DECLARE(tcp, , , accept__refused);
433 SDT_PROBE_DECLARE(tcp, , , connect__established);
434 SDT_PROBE_DECLARE(tcp, , , connect__refused);
435 SDT_PROBE_DECLARE(tcp, , , connect__request);
436 SDT_PROBE_DECLARE(tcp, , , receive);
437 SDT_PROBE_DECLARE(tcp, , , send);
438 SDT_PROBE_DECLARE(tcp, , , siftr);
439 SDT_PROBE_DECLARE(tcp, , , state__change);
440 SDT_PROBE_DECLARE(tcp, , , debug__input);
441 SDT_PROBE_DECLARE(tcp, , , debug__output);
442 SDT_PROBE_DECLARE(tcp, , , debug__user);
443 SDT_PROBE_DECLARE(tcp, , , debug__drop);
444 SDT_PROBE_DECLARE(tcp, , , receive__autoresize);
445 
446 SDT_PROBE_DECLARE(udp, , , receive);
447 SDT_PROBE_DECLARE(udp, , , send);
448 
449 SDT_PROBE_DECLARE(udplite, , , receive);
450 SDT_PROBE_DECLARE(udplite, , , send);
451 
452 /*
453  * These constants originate from the 4.4BSD sys/protosw.h.  They lost
454  * their initial purpose in 2c37256e5a59, when single pr_usrreq method
455  * was split into multiple methods.  However, they were used by TCPDEBUG,
456  * a feature barely used, but it kept them in the tree for many years.
457  * In 5d06879adb95 DTrace probes started to use them.  Note that they
458  * are not documented in dtrace_tcp(4), so they are likely to be
459  * eventually renamed to something better and extended/trimmed.
460  */
461 #define	PRU_ATTACH		0	/* attach protocol to up */
462 #define	PRU_DETACH		1	/* detach protocol from up */
463 #define	PRU_BIND		2	/* bind socket to address */
464 #define	PRU_LISTEN		3	/* listen for connection */
465 #define	PRU_CONNECT		4	/* establish connection to peer */
466 #define	PRU_ACCEPT		5	/* accept connection from peer */
467 #define	PRU_DISCONNECT		6	/* disconnect from peer */
468 #define	PRU_SHUTDOWN		7	/* won't send any more data */
469 #define	PRU_RCVD		8	/* have taken data; more room now */
470 #define	PRU_SEND		9	/* send this data */
471 #define	PRU_ABORT		10	/* abort (fast DISCONNECT, DETATCH) */
472 #define	PRU_CONTROL		11	/* control operations on protocol */
473 #define	PRU_SENSE		12	/* return status into m */
474 #define	PRU_RCVOOB		13	/* retrieve out of band data */
475 #define	PRU_SENDOOB		14	/* send out of band data */
476 #define	PRU_SOCKADDR		15	/* fetch socket's address */
477 #define	PRU_PEERADDR		16	/* fetch peer's address */
478 #define	PRU_CONNECT2		17	/* connect two sockets */
479 /* begin for protocols internal use */
480 #define	PRU_FASTTIMO		18	/* 200ms timeout */
481 #define	PRU_SLOWTIMO		19	/* 500ms timeout */
482 #define	PRU_PROTORCV		20	/* receive from below */
483 #define	PRU_PROTOSEND		21	/* send to below */
484 /* end for protocol's internal use */
485 #define PRU_SEND_EOF		22	/* send and close */
486 #define	PRU_SOSETLABEL		23	/* MAC label change */
487 #define	PRU_CLOSE		24	/* socket close */
488 #define	PRU_FLUSH		25	/* flush the socket */
489 #define	PRU_NREQ		25
490 
491 #ifdef PRUREQUESTS
492 const char *prurequests[] = {
493 	"ATTACH",	"DETACH",	"BIND",		"LISTEN",
494 	"CONNECT",	"ACCEPT",	"DISCONNECT",	"SHUTDOWN",
495 	"RCVD",		"SEND",		"ABORT",	"CONTROL",
496 	"SENSE",	"RCVOOB",	"SENDOOB",	"SOCKADDR",
497 	"PEERADDR",	"CONNECT2",	"FASTTIMO",	"SLOWTIMO",
498 	"PROTORCV",	"PROTOSEND",	"SEND_EOF",	"SOSETLABEL",
499 	"CLOSE",	"FLUSH",
500 };
501 #endif
502 
503 #endif
504