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 #ifndef KDTRACE_NO_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_cachedrtt); 255 SDT_PROBE_DECLARE(mib, tcp, count, tcps_cachedrttvar); 256 SDT_PROBE_DECLARE(mib, tcp, count, tcps_cachedssthresh); 257 SDT_PROBE_DECLARE(mib, tcp, count, tcps_usedrtt); 258 SDT_PROBE_DECLARE(mib, tcp, count, tcps_usedrttvar); 259 SDT_PROBE_DECLARE(mib, tcp, count, tcps_usedssthresh); 260 SDT_PROBE_DECLARE(mib, tcp, count, tcps_persistdrop); 261 SDT_PROBE_DECLARE(mib, tcp, count, tcps_badsyn); 262 SDT_PROBE_DECLARE(mib, tcp, count, tcps_mturesent); 263 SDT_PROBE_DECLARE(mib, tcp, count, tcps_listendrop); 264 SDT_PROBE_DECLARE(mib, tcp, count, tcps_badrst); 265 266 SDT_PROBE_DECLARE(mib, tcp, count, tcps_sc_added); 267 SDT_PROBE_DECLARE(mib, tcp, count, tcps_sc_retransmitted); 268 SDT_PROBE_DECLARE(mib, tcp, count, tcps_sc_dupsyn); 269 SDT_PROBE_DECLARE(mib, tcp, count, tcps_sc_dropped); 270 SDT_PROBE_DECLARE(mib, tcp, count, tcps_sc_completed); 271 SDT_PROBE_DECLARE(mib, tcp, count, tcps_sc_bucketoverflow); 272 SDT_PROBE_DECLARE(mib, tcp, count, tcps_sc_cacheoverflow); 273 SDT_PROBE_DECLARE(mib, tcp, count, tcps_sc_reset); 274 SDT_PROBE_DECLARE(mib, tcp, count, tcps_sc_stale); 275 SDT_PROBE_DECLARE(mib, tcp, count, tcps_sc_aborted); 276 SDT_PROBE_DECLARE(mib, tcp, count, tcps_sc_badack); 277 SDT_PROBE_DECLARE(mib, tcp, count, tcps_sc_unreach); 278 SDT_PROBE_DECLARE(mib, tcp, count, tcps_sc_zonefail); 279 SDT_PROBE_DECLARE(mib, tcp, count, tcps_sc_sendcookie); 280 SDT_PROBE_DECLARE(mib, tcp, count, tcps_sc_recvcookie); 281 282 SDT_PROBE_DECLARE(mib, tcp, count, tcps_hc_added); 283 SDT_PROBE_DECLARE(mib, tcp, count, tcps_hc_bucketoverflow); 284 285 SDT_PROBE_DECLARE(mib, tcp, count, tcps_finwait2_drops); 286 287 SDT_PROBE_DECLARE(mib, tcp, count, tcps_sack_recovery_episode); 288 SDT_PROBE_DECLARE(mib, tcp, count, tcps_sack_rexmits); 289 SDT_PROBE_DECLARE(mib, tcp, count, tcps_sack_rexmits_tso); 290 SDT_PROBE_DECLARE(mib, tcp, count, tcps_sack_rexmit_bytes); 291 SDT_PROBE_DECLARE(mib, tcp, count, tcps_sack_rcv_blocks); 292 SDT_PROBE_DECLARE(mib, tcp, count, tcps_sack_send_blocks); 293 SDT_PROBE_DECLARE(mib, tcp, count, tcps_sack_lostrexmt); 294 SDT_PROBE_DECLARE(mib, tcp, count, tcps_sack_sboverflow); 295 296 SDT_PROBE_DECLARE(mib, tcp, count, tcps_ecn_rcvce); 297 SDT_PROBE_DECLARE(mib, tcp, count, tcps_ecn_rcvect0); 298 SDT_PROBE_DECLARE(mib, tcp, count, tcps_ecn_rcvect1); 299 SDT_PROBE_DECLARE(mib, tcp, count, tcps_ecn_shs); 300 SDT_PROBE_DECLARE(mib, tcp, count, tcps_ecn_rcwnd); 301 302 SDT_PROBE_DECLARE(mib, tcp, count, tcps_sig_rcvgoodsig); 303 SDT_PROBE_DECLARE(mib, tcp, count, tcps_sig_rcvbadsig); 304 SDT_PROBE_DECLARE(mib, tcp, count, tcps_sig_err_buildsig); 305 SDT_PROBE_DECLARE(mib, tcp, count, tcps_sig_err_sigopt); 306 SDT_PROBE_DECLARE(mib, tcp, count, tcps_sig_err_nosigopt); 307 308 SDT_PROBE_DECLARE(mib, tcp, count, tcps_pmtud_blackhole_activated); 309 SDT_PROBE_DECLARE(mib, tcp, count, tcps_pmtud_blackhole_activated_min_mss); 310 SDT_PROBE_DECLARE(mib, tcp, count, tcps_pmtud_blackhole_failed); 311 312 SDT_PROBE_DECLARE(mib, tcp, count, tcps_tunneled_pkts); 313 SDT_PROBE_DECLARE(mib, tcp, count, tcps_tunneled_errs); 314 315 SDT_PROBE_DECLARE(mib, tcp, count, tcps_dsack_count); 316 SDT_PROBE_DECLARE(mib, tcp, count, tcps_dsack_bytes); 317 SDT_PROBE_DECLARE(mib, tcp, count, tcps_dsack_tlp_bytes); 318 319 SDT_PROBE_DECLARE(mib, tcp, count, tcps_tw_recycles); 320 SDT_PROBE_DECLARE(mib, tcp, count, tcps_tw_resets); 321 SDT_PROBE_DECLARE(mib, tcp, count, tcps_tw_responds); 322 323 SDT_PROBE_DECLARE(mib, tcp, count, tcps_ace_nect); 324 SDT_PROBE_DECLARE(mib, tcp, count, tcps_ace_ect1); 325 SDT_PROBE_DECLARE(mib, tcp, count, tcps_ace_ect0); 326 SDT_PROBE_DECLARE(mib, tcp, count, tcps_ace_ce); 327 328 SDT_PROBE_DECLARE(mib, tcp, count, tcps_ecn_sndect0); 329 SDT_PROBE_DECLARE(mib, tcp, count, tcps_ecn_sndect1); 330 331 SDT_PROBE_DECLARE(mib, tcp, count, tcps_tlpresends); 332 SDT_PROBE_DECLARE(mib, tcp, count, tcps_tlpresend_bytes); 333 334 SDT_PROBE_DECLARE(mib, tcp, count, tcps_rcvghostack); 335 SDT_PROBE_DECLARE(mib, tcp, count, tcps_rcvacktooold); 336 337 SDT_PROBE_DECLARE(mib, ipsec, count, ips_in_polvio); 338 SDT_PROBE_DECLARE(mib, ipsec, count, ips_in_nomem); 339 SDT_PROBE_DECLARE(mib, ipsec, count, ips_in_inval); 340 SDT_PROBE_DECLARE(mib, ipsec, count, ips_out_polvio); 341 SDT_PROBE_DECLARE(mib, ipsec, count, ips_out_nosa); 342 SDT_PROBE_DECLARE(mib, ipsec, count, ips_out_nomem); 343 SDT_PROBE_DECLARE(mib, ipsec, count, ips_out_noroute); 344 SDT_PROBE_DECLARE(mib, ipsec, count, ips_out_inval); 345 SDT_PROBE_DECLARE(mib, ipsec, count, ips_out_bundlesa); 346 347 SDT_PROBE_DECLARE(mib, ipsec, count, ips_spdcache_hits); 348 SDT_PROBE_DECLARE(mib, ipsec, count, ips_spdcache_misses); 349 350 SDT_PROBE_DECLARE(mib, ipsec, count, ips_clcopied); 351 SDT_PROBE_DECLARE(mib, ipsec, count, ips_mbinserted); 352 SDT_PROBE_DECLARE(mib, ipsec, count, ips_input_front); 353 SDT_PROBE_DECLARE(mib, ipsec, count, ips_input_middle); 354 SDT_PROBE_DECLARE(mib, ipsec, count, ips_input_end); 355 356 SDT_PROBE_DECLARE(mib, esp, count, esps_hdrops); 357 SDT_PROBE_DECLARE(mib, esp, count, esps_nopf); 358 SDT_PROBE_DECLARE(mib, esp, count, esps_notdb); 359 SDT_PROBE_DECLARE(mib, esp, count, esps_badkcr); 360 SDT_PROBE_DECLARE(mib, esp, count, esps_qfull); 361 SDT_PROBE_DECLARE(mib, esp, count, esps_noxform); 362 SDT_PROBE_DECLARE(mib, esp, count, esps_badilen); 363 SDT_PROBE_DECLARE(mib, esp, count, esps_wrap); 364 SDT_PROBE_DECLARE(mib, esp, count, esps_badenc); 365 SDT_PROBE_DECLARE(mib, esp, count, esps_badauth); 366 SDT_PROBE_DECLARE(mib, esp, count, esps_replay); 367 SDT_PROBE_DECLARE(mib, esp, count, esps_input); 368 SDT_PROBE_DECLARE(mib, esp, count, esps_output); 369 SDT_PROBE_DECLARE(mib, esp, count, esps_invalid); 370 SDT_PROBE_DECLARE(mib, esp, count, esps_ibytes); 371 SDT_PROBE_DECLARE(mib, esp, count, esps_obytes); 372 SDT_PROBE_DECLARE(mib, esp, count, esps_toobig); 373 SDT_PROBE_DECLARE(mib, esp, count, esps_pdrops); 374 SDT_PROBE_DECLARE(mib, esp, count, esps_crypto); 375 SDT_PROBE_DECLARE(mib, esp, count, esps_tunnel); 376 SDT_PROBE_DECLARE(mib, esp, count, esps_hist); 377 378 SDT_PROBE_DECLARE(mib, ah, count, ahs_hdrops); 379 SDT_PROBE_DECLARE(mib, ah, count, ahs_nopf); 380 SDT_PROBE_DECLARE(mib, ah, count, ahs_notdb); 381 SDT_PROBE_DECLARE(mib, ah, count, ahs_badkcr); 382 SDT_PROBE_DECLARE(mib, ah, count, ahs_badauth); 383 SDT_PROBE_DECLARE(mib, ah, count, ahs_noxform); 384 SDT_PROBE_DECLARE(mib, ah, count, ahs_qfull); 385 SDT_PROBE_DECLARE(mib, ah, count, ahs_wrap); 386 SDT_PROBE_DECLARE(mib, ah, count, ahs_replay); 387 SDT_PROBE_DECLARE(mib, ah, count, ahs_badauthl); 388 SDT_PROBE_DECLARE(mib, ah, count, ahs_input); 389 SDT_PROBE_DECLARE(mib, ah, count, ahs_output); 390 SDT_PROBE_DECLARE(mib, ah, count, ahs_invalid); 391 SDT_PROBE_DECLARE(mib, ah, count, ahs_ibytes); 392 SDT_PROBE_DECLARE(mib, ah, count, ahs_obytes); 393 SDT_PROBE_DECLARE(mib, ah, count, ahs_toobig); 394 SDT_PROBE_DECLARE(mib, ah, count, ahs_pdrops); 395 SDT_PROBE_DECLARE(mib, ah, count, ahs_crypto); 396 SDT_PROBE_DECLARE(mib, ah, count, ahs_tunnel); 397 SDT_PROBE_DECLARE(mib, ah, count, ahs_hist); 398 399 SDT_PROBE_DECLARE(mib, ipcomp, count, ipcomps_hdrops); 400 SDT_PROBE_DECLARE(mib, ipcomp, count, ipcomps_nopf); 401 SDT_PROBE_DECLARE(mib, ipcomp, count, ipcomps_notdb); 402 SDT_PROBE_DECLARE(mib, ipcomp, count, ipcomps_badkcr); 403 SDT_PROBE_DECLARE(mib, ipcomp, count, ipcomps_qfull); 404 SDT_PROBE_DECLARE(mib, ipcomp, count, ipcomps_noxform); 405 SDT_PROBE_DECLARE(mib, ipcomp, count, ipcomps_wrap); 406 SDT_PROBE_DECLARE(mib, ipcomp, count, ipcomps_input); 407 SDT_PROBE_DECLARE(mib, ipcomp, count, ipcomps_output); 408 SDT_PROBE_DECLARE(mib, ipcomp, count, ipcomps_invalid); 409 SDT_PROBE_DECLARE(mib, ipcomp, count, ipcomps_ibytes); 410 SDT_PROBE_DECLARE(mib, ipcomp, count, ipcomps_obytes); 411 SDT_PROBE_DECLARE(mib, ipcomp, count, ipcomps_toobig); 412 SDT_PROBE_DECLARE(mib, ipcomp, count, ipcomps_pdrops); 413 SDT_PROBE_DECLARE(mib, ipcomp, count, ipcomps_crypto); 414 SDT_PROBE_DECLARE(mib, ipcomp, count, ipcomps_hist); 415 SDT_PROBE_DECLARE(mib, ipcomp, count, ipcomps_threshold); 416 SDT_PROBE_DECLARE(mib, ipcomp, count, ipcomps_uncompr); 417 418 #endif 419 420 SDT_PROBE_DECLARE(ip, , , receive); 421 SDT_PROBE_DECLARE(ip, , , send); 422 423 SDT_PROBE_DECLARE(tcp, , , accept__established); 424 SDT_PROBE_DECLARE(tcp, , , accept__refused); 425 SDT_PROBE_DECLARE(tcp, , , connect__established); 426 SDT_PROBE_DECLARE(tcp, , , connect__refused); 427 SDT_PROBE_DECLARE(tcp, , , connect__request); 428 SDT_PROBE_DECLARE(tcp, , , receive); 429 SDT_PROBE_DECLARE(tcp, , , send); 430 SDT_PROBE_DECLARE(tcp, , , siftr); 431 SDT_PROBE_DECLARE(tcp, , , state__change); 432 SDT_PROBE_DECLARE(tcp, , , debug__input); 433 SDT_PROBE_DECLARE(tcp, , , debug__output); 434 SDT_PROBE_DECLARE(tcp, , , debug__user); 435 SDT_PROBE_DECLARE(tcp, , , debug__drop); 436 SDT_PROBE_DECLARE(tcp, , , receive__autoresize); 437 438 SDT_PROBE_DECLARE(udp, , , receive); 439 SDT_PROBE_DECLARE(udp, , , send); 440 441 SDT_PROBE_DECLARE(udplite, , , receive); 442 SDT_PROBE_DECLARE(udplite, , , send); 443 444 /* 445 * These constants originate from the 4.4BSD sys/protosw.h. They lost 446 * their initial purpose in 2c37256e5a59, when single pr_usrreq method 447 * was split into multiple methods. However, they were used by TCPDEBUG, 448 * a feature barely used, but it kept them in the tree for many years. 449 * In 5d06879adb95 DTrace probes started to use them. Note that they 450 * are not documented in dtrace_tcp(4), so they are likely to be 451 * eventually renamed to something better and extended/trimmed. 452 */ 453 #define PRU_ATTACH 0 /* attach protocol to up */ 454 #define PRU_DETACH 1 /* detach protocol from up */ 455 #define PRU_BIND 2 /* bind socket to address */ 456 #define PRU_LISTEN 3 /* listen for connection */ 457 #define PRU_CONNECT 4 /* establish connection to peer */ 458 #define PRU_ACCEPT 5 /* accept connection from peer */ 459 #define PRU_DISCONNECT 6 /* disconnect from peer */ 460 #define PRU_SHUTDOWN 7 /* won't send any more data */ 461 #define PRU_RCVD 8 /* have taken data; more room now */ 462 #define PRU_SEND 9 /* send this data */ 463 #define PRU_ABORT 10 /* abort (fast DISCONNECT, DETATCH) */ 464 #define PRU_CONTROL 11 /* control operations on protocol */ 465 #define PRU_SENSE 12 /* return status into m */ 466 #define PRU_RCVOOB 13 /* retrieve out of band data */ 467 #define PRU_SENDOOB 14 /* send out of band data */ 468 #define PRU_SOCKADDR 15 /* fetch socket's address */ 469 #define PRU_PEERADDR 16 /* fetch peer's address */ 470 #define PRU_CONNECT2 17 /* connect two sockets */ 471 /* begin for protocols internal use */ 472 #define PRU_FASTTIMO 18 /* 200ms timeout */ 473 #define PRU_SLOWTIMO 19 /* 500ms timeout */ 474 #define PRU_PROTORCV 20 /* receive from below */ 475 #define PRU_PROTOSEND 21 /* send to below */ 476 /* end for protocol's internal use */ 477 #define PRU_SEND_EOF 22 /* send and close */ 478 #define PRU_SOSETLABEL 23 /* MAC label change */ 479 #define PRU_CLOSE 24 /* socket close */ 480 #define PRU_FLUSH 25 /* flush the socket */ 481 #define PRU_NREQ 25 482 483 #ifdef PRUREQUESTS 484 const char *prurequests[] = { 485 "ATTACH", "DETACH", "BIND", "LISTEN", 486 "CONNECT", "ACCEPT", "DISCONNECT", "SHUTDOWN", 487 "RCVD", "SEND", "ABORT", "CONTROL", 488 "SENSE", "RCVOOB", "SENDOOB", "SOCKADDR", 489 "PEERADDR", "CONNECT2", "FASTTIMO", "SLOWTIMO", 490 "PROTORCV", "PROTOSEND", "SEND_EOF", "SOSETLABEL", 491 "CLOSE", "FLUSH", 492 }; 493 #endif 494 495 #endif 496