xref: /freebsd/sys/netinet/in_kdtrace.c (revision 646c28ea80cb0f9258386626297495b5a0e56db5)
157f60867SMark Johnston /*-
24d846d26SWarner Losh  * SPDX-License-Identifier: BSD-2-Clause
3fe267a55SPedro F. Giffuni  *
457f60867SMark Johnston  * Copyright (c) 2013 Mark Johnston <markj@FreeBSD.org>
557f60867SMark Johnston  *
657f60867SMark Johnston  * Redistribution and use in source and binary forms, with or without
757f60867SMark Johnston  * modification, are permitted provided that the following conditions are
857f60867SMark Johnston  * met:
957f60867SMark Johnston  * 1. Redistributions of source code must retain the above copyright
1057f60867SMark Johnston  *    notice, this list of conditions and the following disclaimer.
1157f60867SMark Johnston  * 2. Redistributions in binary form must reproduce the above copyright
1257f60867SMark Johnston  *    notice, this list of conditions and the following disclaimer in
1357f60867SMark Johnston  *    the documentation and/or other materials provided with the
1457f60867SMark Johnston  *    distribution.
1557f60867SMark Johnston  *
1657f60867SMark Johnston  * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
1757f60867SMark Johnston  * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
1857f60867SMark Johnston  * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
1957f60867SMark Johnston  * ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
2057f60867SMark Johnston  * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
2157f60867SMark Johnston  * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
2257f60867SMark Johnston  * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
2357f60867SMark Johnston  * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
2457f60867SMark Johnston  * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
2557f60867SMark Johnston  * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
2657f60867SMark Johnston  * SUCH DAMAGE.
2757f60867SMark Johnston  */
2857f60867SMark Johnston 
2957f60867SMark Johnston #include <sys/param.h>
3057f60867SMark Johnston #include <sys/systm.h>
3157f60867SMark Johnston #include <sys/sdt.h>
3257f60867SMark Johnston 
3360d8dbbeSKristof Provost SDT_PROVIDER_DEFINE(mib);
3457f60867SMark Johnston SDT_PROVIDER_DEFINE(ip);
3557f60867SMark Johnston SDT_PROVIDER_DEFINE(tcp);
3657f60867SMark Johnston SDT_PROVIDER_DEFINE(udp);
377bda9663SMichael Tuexen SDT_PROVIDER_DEFINE(udplite);
3857f60867SMark Johnston 
3960d8dbbeSKristof Provost #ifndef KDTRACE_NO_MIB_SDT
4060d8dbbeSKristof Provost #define MIB_PROBE_IP(name) \
4160d8dbbeSKristof Provost     SDT_PROBE_DEFINE1(mib, ip, count, name, \
4260d8dbbeSKristof Provost         "int")
4360d8dbbeSKristof Provost 
4460d8dbbeSKristof Provost MIB_PROBE_IP(ips_total);
4560d8dbbeSKristof Provost MIB_PROBE_IP(ips_badsum);
4660d8dbbeSKristof Provost MIB_PROBE_IP(ips_tooshort);
4760d8dbbeSKristof Provost MIB_PROBE_IP(ips_toosmall);
4860d8dbbeSKristof Provost MIB_PROBE_IP(ips_badhlen);
4960d8dbbeSKristof Provost MIB_PROBE_IP(ips_badlen);
5060d8dbbeSKristof Provost MIB_PROBE_IP(ips_fragments);
5160d8dbbeSKristof Provost MIB_PROBE_IP(ips_fragdropped);
5260d8dbbeSKristof Provost MIB_PROBE_IP(ips_fragtimeout);
5360d8dbbeSKristof Provost MIB_PROBE_IP(ips_forward);
5460d8dbbeSKristof Provost MIB_PROBE_IP(ips_fastforward);
5560d8dbbeSKristof Provost MIB_PROBE_IP(ips_cantforward);
5660d8dbbeSKristof Provost MIB_PROBE_IP(ips_redirectsent);
5760d8dbbeSKristof Provost MIB_PROBE_IP(ips_noproto);
5860d8dbbeSKristof Provost MIB_PROBE_IP(ips_delivered);
5960d8dbbeSKristof Provost MIB_PROBE_IP(ips_localout);
6060d8dbbeSKristof Provost MIB_PROBE_IP(ips_odropped);
6160d8dbbeSKristof Provost MIB_PROBE_IP(ips_reassembled);
6260d8dbbeSKristof Provost MIB_PROBE_IP(ips_fragmented);
6360d8dbbeSKristof Provost MIB_PROBE_IP(ips_ofragments);
6460d8dbbeSKristof Provost MIB_PROBE_IP(ips_cantfrag);
6560d8dbbeSKristof Provost MIB_PROBE_IP(ips_badoptions);
6660d8dbbeSKristof Provost MIB_PROBE_IP(ips_noroute);
6760d8dbbeSKristof Provost MIB_PROBE_IP(ips_badvers);
6860d8dbbeSKristof Provost MIB_PROBE_IP(ips_rawout);
6960d8dbbeSKristof Provost MIB_PROBE_IP(ips_toolong);
7060d8dbbeSKristof Provost MIB_PROBE_IP(ips_notmember);
7160d8dbbeSKristof Provost MIB_PROBE_IP(ips_nogif);
7260d8dbbeSKristof Provost MIB_PROBE_IP(ips_badaddr);
7360d8dbbeSKristof Provost 
7460d8dbbeSKristof Provost #define MIB_PROBE_IP6(name) \
7560d8dbbeSKristof Provost     SDT_PROBE_DEFINE1(mib, ip6, count, name, \
7660d8dbbeSKristof Provost         "int")
7760d8dbbeSKristof Provost #define MIB_PROBE2_IP6(name) \
7860d8dbbeSKristof Provost     SDT_PROBE_DEFINE2(mib, ip6, count, name, \
7960d8dbbeSKristof Provost         "int", "int")
8060d8dbbeSKristof Provost 
8160d8dbbeSKristof Provost MIB_PROBE_IP6(ip6s_total);
8260d8dbbeSKristof Provost MIB_PROBE_IP6(ip6s_tooshort);
8360d8dbbeSKristof Provost MIB_PROBE_IP6(ip6s_toosmall);
8460d8dbbeSKristof Provost MIB_PROBE_IP6(ip6s_fragments);
8560d8dbbeSKristof Provost MIB_PROBE_IP6(ip6s_fragdropped);
8660d8dbbeSKristof Provost MIB_PROBE_IP6(ip6s_fragtimeout);
8760d8dbbeSKristof Provost MIB_PROBE_IP6(ip6s_fragoverflow);
8860d8dbbeSKristof Provost MIB_PROBE_IP6(ip6s_forward);
8960d8dbbeSKristof Provost MIB_PROBE_IP6(ip6s_cantforward);
9060d8dbbeSKristof Provost MIB_PROBE_IP6(ip6s_redirectsent);
9160d8dbbeSKristof Provost MIB_PROBE_IP6(ip6s_delivered);
9260d8dbbeSKristof Provost MIB_PROBE_IP6(ip6s_localout);
9360d8dbbeSKristof Provost MIB_PROBE_IP6(ip6s_odropped);
9460d8dbbeSKristof Provost MIB_PROBE_IP6(ip6s_reassembled);
9560d8dbbeSKristof Provost MIB_PROBE_IP6(ip6s_atomicfrags);
9660d8dbbeSKristof Provost MIB_PROBE_IP6(ip6s_fragmented);
9760d8dbbeSKristof Provost MIB_PROBE_IP6(ip6s_ofragments);
9860d8dbbeSKristof Provost MIB_PROBE_IP6(ip6s_cantfrag);
9960d8dbbeSKristof Provost MIB_PROBE_IP6(ip6s_badoptions);
10060d8dbbeSKristof Provost MIB_PROBE_IP6(ip6s_noroute);
10160d8dbbeSKristof Provost MIB_PROBE_IP6(ip6s_badvers);
10260d8dbbeSKristof Provost MIB_PROBE_IP6(ip6s_rawout);
10360d8dbbeSKristof Provost MIB_PROBE_IP6(ip6s_badscope);
10460d8dbbeSKristof Provost MIB_PROBE_IP6(ip6s_notmember);
10560d8dbbeSKristof Provost MIB_PROBE2_IP6(ip6s_nxthist);
10660d8dbbeSKristof Provost MIB_PROBE_IP6(ip6s_m1);
10760d8dbbeSKristof Provost MIB_PROBE2_IP6(ip6s_m2m);
10860d8dbbeSKristof Provost MIB_PROBE_IP6(ip6s_mext1);
10960d8dbbeSKristof Provost MIB_PROBE_IP6(ip6s_mext2m);
11060d8dbbeSKristof Provost MIB_PROBE_IP6(ip6s_exthdrtoolong);
11160d8dbbeSKristof Provost MIB_PROBE_IP6(ip6s_nogif);
11260d8dbbeSKristof Provost MIB_PROBE_IP6(ip6s_toomanyhdr);
11360d8dbbeSKristof Provost MIB_PROBE_IP6(ip6s_sources_none);
11460d8dbbeSKristof Provost MIB_PROBE2_IP6(ip6s_sources_sameif);
11560d8dbbeSKristof Provost MIB_PROBE2_IP6(ip6s_sources_otherif);
11660d8dbbeSKristof Provost MIB_PROBE2_IP6(ip6s_sources_samescope);
11760d8dbbeSKristof Provost MIB_PROBE2_IP6(ip6s_sources_otherscope);
11860d8dbbeSKristof Provost MIB_PROBE2_IP6(ip6s_sources_deprecated);
11960d8dbbeSKristof Provost MIB_PROBE2_IP6(ip6s_sources_rule);
12060d8dbbeSKristof Provost 
12160d8dbbeSKristof Provost #define MIB_PROBE_ICMP(name) \
12260d8dbbeSKristof Provost     SDT_PROBE_DEFINE1(mib, icmp, count, name, \
12360d8dbbeSKristof Provost         "int")
12460d8dbbeSKristof Provost #define MIB_PROBE2_ICMP(name) \
12560d8dbbeSKristof Provost     SDT_PROBE_DEFINE2(mib, icmp, count, name, \
12660d8dbbeSKristof Provost         "int", "int")
12760d8dbbeSKristof Provost 
12860d8dbbeSKristof Provost MIB_PROBE_ICMP(icps_error);
12960d8dbbeSKristof Provost MIB_PROBE_ICMP(icps_oldshort);
13060d8dbbeSKristof Provost MIB_PROBE_ICMP(icps_oldicmp);
13160d8dbbeSKristof Provost MIB_PROBE2_ICMP(icps_outhist);
13260d8dbbeSKristof Provost MIB_PROBE_ICMP(icps_badcode);
13360d8dbbeSKristof Provost MIB_PROBE_ICMP(icps_tooshort);
13460d8dbbeSKristof Provost MIB_PROBE_ICMP(icps_checksum);
13560d8dbbeSKristof Provost MIB_PROBE_ICMP(icps_badlen);
13660d8dbbeSKristof Provost MIB_PROBE_ICMP(icps_reflect);
13760d8dbbeSKristof Provost MIB_PROBE2_ICMP(icps_inhist);
13860d8dbbeSKristof Provost MIB_PROBE_ICMP(icps_bmcastecho);
13960d8dbbeSKristof Provost MIB_PROBE_ICMP(icps_bmcasttstamp);
14060d8dbbeSKristof Provost MIB_PROBE_ICMP(icps_badaddr);
14160d8dbbeSKristof Provost MIB_PROBE_ICMP(icps_noroute);
14260d8dbbeSKristof Provost 
14360d8dbbeSKristof Provost #define MIB_PROBE_ICMP6(name) \
14460d8dbbeSKristof Provost     SDT_PROBE_DEFINE1(mib, icmp6, count, name, \
14560d8dbbeSKristof Provost         "int")
14660d8dbbeSKristof Provost #define MIB_PROBE2_ICMP6(name) \
14760d8dbbeSKristof Provost     SDT_PROBE_DEFINE2(mib, icmp6, count, name, \
14860d8dbbeSKristof Provost         "int", "int")
14960d8dbbeSKristof Provost 
15060d8dbbeSKristof Provost MIB_PROBE_ICMP6(icp6s_error);
15160d8dbbeSKristof Provost MIB_PROBE_ICMP6(icp6s_canterror);
15260d8dbbeSKristof Provost MIB_PROBE_ICMP6(icp6s_toofreq);
15360d8dbbeSKristof Provost MIB_PROBE2_ICMP6(icp6s_outhist);
15460d8dbbeSKristof Provost MIB_PROBE_ICMP6(icp6s_badcode);
15560d8dbbeSKristof Provost MIB_PROBE_ICMP6(icp6s_tooshort);
15660d8dbbeSKristof Provost MIB_PROBE_ICMP6(icp6s_checksum);
15760d8dbbeSKristof Provost MIB_PROBE_ICMP6(icp6s_badlen);
15860d8dbbeSKristof Provost MIB_PROBE_ICMP6(icp6s_dropped);
15960d8dbbeSKristof Provost MIB_PROBE_ICMP6(icp6s_reflect);
16060d8dbbeSKristof Provost MIB_PROBE2_ICMP6(icp6s_inhist);
16160d8dbbeSKristof Provost MIB_PROBE_ICMP6(icp6s_nd_toomanyopt);
16260d8dbbeSKristof Provost MIB_PROBE_ICMP6(icp6s_odst_unreach_noroute);
16360d8dbbeSKristof Provost MIB_PROBE_ICMP6(icp6s_odst_unreach_admin);
16460d8dbbeSKristof Provost MIB_PROBE_ICMP6(icp6s_odst_unreach_beyondscope);
16560d8dbbeSKristof Provost MIB_PROBE_ICMP6(icp6s_odst_unreach_addr);
16660d8dbbeSKristof Provost MIB_PROBE_ICMP6(icp6s_odst_unreach_noport);
16760d8dbbeSKristof Provost MIB_PROBE_ICMP6(icp6s_opacket_too_big);
16860d8dbbeSKristof Provost MIB_PROBE_ICMP6(icp6s_otime_exceed_transit);
16960d8dbbeSKristof Provost MIB_PROBE_ICMP6(icp6s_otime_exceed_reassembly);
17060d8dbbeSKristof Provost MIB_PROBE_ICMP6(icp6s_oparamprob_header);
17160d8dbbeSKristof Provost MIB_PROBE_ICMP6(icp6s_oparamprob_nextheader);
17260d8dbbeSKristof Provost MIB_PROBE_ICMP6(icp6s_oparamprob_option);
17360d8dbbeSKristof Provost MIB_PROBE_ICMP6(icp6s_oredirect);
17460d8dbbeSKristof Provost MIB_PROBE_ICMP6(icp6s_ounknown);
17560d8dbbeSKristof Provost MIB_PROBE_ICMP6(icp6s_pmtuchg);
17660d8dbbeSKristof Provost MIB_PROBE_ICMP6(icp6s_nd_badopt);
17760d8dbbeSKristof Provost MIB_PROBE_ICMP6(icp6s_badns);
17860d8dbbeSKristof Provost MIB_PROBE_ICMP6(icp6s_badna);
17960d8dbbeSKristof Provost MIB_PROBE_ICMP6(icp6s_badrs);
18060d8dbbeSKristof Provost MIB_PROBE_ICMP6(icp6s_badra);
18160d8dbbeSKristof Provost MIB_PROBE_ICMP6(icp6s_badredirect);
18260d8dbbeSKristof Provost MIB_PROBE_ICMP6(icp6s_overflowdefrtr);
18360d8dbbeSKristof Provost MIB_PROBE_ICMP6(icp6s_overflowprfx);
18460d8dbbeSKristof Provost MIB_PROBE_ICMP6(icp6s_overflownndp);
18560d8dbbeSKristof Provost MIB_PROBE_ICMP6(icp6s_overflowredirect);
18660d8dbbeSKristof Provost MIB_PROBE_ICMP6(icp6s_invlhlim);
18760d8dbbeSKristof Provost 
18860d8dbbeSKristof Provost #define	MIB_PROBE_UDP(name)	SDT_PROBE_DEFINE1(mib, udp, count, name, "int")
18960d8dbbeSKristof Provost MIB_PROBE_UDP(udps_ipackets);
19060d8dbbeSKristof Provost MIB_PROBE_UDP(udps_hdrops);
19160d8dbbeSKristof Provost MIB_PROBE_UDP(udps_badsum);
19260d8dbbeSKristof Provost MIB_PROBE_UDP(udps_nosum);
19360d8dbbeSKristof Provost MIB_PROBE_UDP(udps_badlen);
19460d8dbbeSKristof Provost MIB_PROBE_UDP(udps_noport);
19560d8dbbeSKristof Provost MIB_PROBE_UDP(udps_noportbcast);
19660d8dbbeSKristof Provost MIB_PROBE_UDP(udps_fullsock);
19760d8dbbeSKristof Provost MIB_PROBE_UDP(udps_pcbcachemiss);
19860d8dbbeSKristof Provost MIB_PROBE_UDP(udps_pcbhashmiss);
19960d8dbbeSKristof Provost MIB_PROBE_UDP(udps_opackets);
20060d8dbbeSKristof Provost MIB_PROBE_UDP(udps_fastout);
20160d8dbbeSKristof Provost MIB_PROBE_UDP(udps_noportmcast);
20260d8dbbeSKristof Provost MIB_PROBE_UDP(udps_filtermcast);
20360d8dbbeSKristof Provost 
20460d8dbbeSKristof Provost #define	MIB_PROBE_TCP(name)	SDT_PROBE_DEFINE1(mib, tcp, count, name, "int")
20560d8dbbeSKristof Provost 
20660d8dbbeSKristof Provost MIB_PROBE_TCP(tcps_connattempt);
20760d8dbbeSKristof Provost MIB_PROBE_TCP(tcps_accepts);
20860d8dbbeSKristof Provost MIB_PROBE_TCP(tcps_connects);
20960d8dbbeSKristof Provost MIB_PROBE_TCP(tcps_drops);
21060d8dbbeSKristof Provost MIB_PROBE_TCP(tcps_conndrops);
21160d8dbbeSKristof Provost MIB_PROBE_TCP(tcps_minmmsdrops);
21260d8dbbeSKristof Provost MIB_PROBE_TCP(tcps_closed);
21360d8dbbeSKristof Provost MIB_PROBE_TCP(tcps_segstimed);
21460d8dbbeSKristof Provost MIB_PROBE_TCP(tcps_rttupdated);
21560d8dbbeSKristof Provost MIB_PROBE_TCP(tcps_delack);
21660d8dbbeSKristof Provost MIB_PROBE_TCP(tcps_timeoutdrop);
21760d8dbbeSKristof Provost MIB_PROBE_TCP(tcps_rexmttimeo);
21860d8dbbeSKristof Provost MIB_PROBE_TCP(tcps_persisttimeo);
21960d8dbbeSKristof Provost MIB_PROBE_TCP(tcps_keeptimeo);
22060d8dbbeSKristof Provost MIB_PROBE_TCP(tcps_keepprobe);
22160d8dbbeSKristof Provost MIB_PROBE_TCP(tcps_keepdrops);
22260d8dbbeSKristof Provost MIB_PROBE_TCP(tcps_progdrops);
22360d8dbbeSKristof Provost 
22460d8dbbeSKristof Provost MIB_PROBE_TCP(tcps_sndtotal);
22560d8dbbeSKristof Provost MIB_PROBE_TCP(tcps_sndpack);
22660d8dbbeSKristof Provost MIB_PROBE_TCP(tcps_sndbyte);
22760d8dbbeSKristof Provost MIB_PROBE_TCP(tcps_sndrexmitpack);
22860d8dbbeSKristof Provost MIB_PROBE_TCP(tcps_sndrexmitbyte);
22960d8dbbeSKristof Provost MIB_PROBE_TCP(tcps_sndrexmitbad);
23060d8dbbeSKristof Provost MIB_PROBE_TCP(tcps_sndacks);
23160d8dbbeSKristof Provost MIB_PROBE_TCP(tcps_sndprobe);
23260d8dbbeSKristof Provost MIB_PROBE_TCP(tcps_sndurg);
23360d8dbbeSKristof Provost MIB_PROBE_TCP(tcps_sndwinup);
23460d8dbbeSKristof Provost MIB_PROBE_TCP(tcps_sndctrl);
23560d8dbbeSKristof Provost 
23660d8dbbeSKristof Provost MIB_PROBE_TCP(tcps_rcvtotal);
23760d8dbbeSKristof Provost MIB_PROBE_TCP(tcps_rcvpack);
23860d8dbbeSKristof Provost MIB_PROBE_TCP(tcps_rcvbyte);
23960d8dbbeSKristof Provost MIB_PROBE_TCP(tcps_rcvbadsum);
24060d8dbbeSKristof Provost MIB_PROBE_TCP(tcps_rcvbadoff);
24160d8dbbeSKristof Provost MIB_PROBE_TCP(tcps_rcvreassfull);
24260d8dbbeSKristof Provost MIB_PROBE_TCP(tcps_rcvshort);
24360d8dbbeSKristof Provost MIB_PROBE_TCP(tcps_rcvduppack);
24460d8dbbeSKristof Provost MIB_PROBE_TCP(tcps_rcvdupbyte);
24560d8dbbeSKristof Provost MIB_PROBE_TCP(tcps_rcvpartduppack);
24660d8dbbeSKristof Provost MIB_PROBE_TCP(tcps_rcvpartdupbyte);
24760d8dbbeSKristof Provost MIB_PROBE_TCP(tcps_rcvoopack);
24860d8dbbeSKristof Provost MIB_PROBE_TCP(tcps_rcvoobyte);
24960d8dbbeSKristof Provost MIB_PROBE_TCP(tcps_rcvpackafterwin);
25060d8dbbeSKristof Provost MIB_PROBE_TCP(tcps_rcvbyteafterwin);
25160d8dbbeSKristof Provost MIB_PROBE_TCP(tcps_rcvafterclose);
25260d8dbbeSKristof Provost MIB_PROBE_TCP(tcps_rcvwinprobe);
25360d8dbbeSKristof Provost MIB_PROBE_TCP(tcps_rcvdupack);
25460d8dbbeSKristof Provost MIB_PROBE_TCP(tcps_rcvacktoomuch);
25560d8dbbeSKristof Provost MIB_PROBE_TCP(tcps_rcvackpack);
25660d8dbbeSKristof Provost MIB_PROBE_TCP(tcps_rcvackbyte);
25760d8dbbeSKristof Provost MIB_PROBE_TCP(tcps_rcvwinupd);
25860d8dbbeSKristof Provost MIB_PROBE_TCP(tcps_pawsdrop);
25960d8dbbeSKristof Provost MIB_PROBE_TCP(tcps_predack);
26060d8dbbeSKristof Provost MIB_PROBE_TCP(tcps_preddat);
26160d8dbbeSKristof Provost MIB_PROBE_TCP(tcps_pcbackemiss);
26260d8dbbeSKristof Provost MIB_PROBE_TCP(tcps_cachedrtt);
26360d8dbbeSKristof Provost MIB_PROBE_TCP(tcps_cachedrttvar);
26460d8dbbeSKristof Provost MIB_PROBE_TCP(tcps_cachedssthresh);
26560d8dbbeSKristof Provost MIB_PROBE_TCP(tcps_usedrtt);
26660d8dbbeSKristof Provost MIB_PROBE_TCP(tcps_usedrttvar);
26760d8dbbeSKristof Provost MIB_PROBE_TCP(tcps_usedssthresh);
26860d8dbbeSKristof Provost MIB_PROBE_TCP(tcps_persistdrop);
26960d8dbbeSKristof Provost MIB_PROBE_TCP(tcps_badsyn);
27060d8dbbeSKristof Provost MIB_PROBE_TCP(tcps_mturesent);
27160d8dbbeSKristof Provost MIB_PROBE_TCP(tcps_listendrop);
27260d8dbbeSKristof Provost MIB_PROBE_TCP(tcps_badrst);
27360d8dbbeSKristof Provost 
27460d8dbbeSKristof Provost MIB_PROBE_TCP(tcps_sc_added);
27560d8dbbeSKristof Provost MIB_PROBE_TCP(tcps_sc_retransmitted);
27660d8dbbeSKristof Provost MIB_PROBE_TCP(tcps_sc_dupsyn);
27760d8dbbeSKristof Provost MIB_PROBE_TCP(tcps_sc_dropped);
27860d8dbbeSKristof Provost MIB_PROBE_TCP(tcps_sc_completed);
27960d8dbbeSKristof Provost MIB_PROBE_TCP(tcps_sc_bucketoverflow);
28060d8dbbeSKristof Provost MIB_PROBE_TCP(tcps_sc_cacheoverflow);
28160d8dbbeSKristof Provost MIB_PROBE_TCP(tcps_sc_reset);
28260d8dbbeSKristof Provost MIB_PROBE_TCP(tcps_sc_stale);
28360d8dbbeSKristof Provost MIB_PROBE_TCP(tcps_sc_aborted);
28460d8dbbeSKristof Provost MIB_PROBE_TCP(tcps_sc_badack);
28560d8dbbeSKristof Provost MIB_PROBE_TCP(tcps_sc_unreach);
28660d8dbbeSKristof Provost MIB_PROBE_TCP(tcps_sc_zonefail);
28760d8dbbeSKristof Provost MIB_PROBE_TCP(tcps_sc_sendcookie);
28860d8dbbeSKristof Provost MIB_PROBE_TCP(tcps_sc_recvcookie);
28960d8dbbeSKristof Provost 
29060d8dbbeSKristof Provost MIB_PROBE_TCP(tcps_hc_added);
29160d8dbbeSKristof Provost MIB_PROBE_TCP(tcps_hc_bucketoverflow);
29260d8dbbeSKristof Provost 
29360d8dbbeSKristof Provost MIB_PROBE_TCP(tcps_finwait2_drops);
29460d8dbbeSKristof Provost 
29560d8dbbeSKristof Provost MIB_PROBE_TCP(tcps_sack_recovery_episode);
29660d8dbbeSKristof Provost MIB_PROBE_TCP(tcps_sack_rexmits);
2972a9aae9eSRichard Scheffenegger MIB_PROBE_TCP(tcps_sack_rexmits_tso);
29860d8dbbeSKristof Provost MIB_PROBE_TCP(tcps_sack_rexmit_bytes);
29960d8dbbeSKristof Provost MIB_PROBE_TCP(tcps_sack_rcv_blocks);
30060d8dbbeSKristof Provost MIB_PROBE_TCP(tcps_sack_send_blocks);
30160d8dbbeSKristof Provost MIB_PROBE_TCP(tcps_sack_lostrexmt);
30260d8dbbeSKristof Provost MIB_PROBE_TCP(tcps_sack_sboverflow);
30360d8dbbeSKristof Provost 
30460d8dbbeSKristof Provost MIB_PROBE_TCP(tcps_ecn_rcvce);
30560d8dbbeSKristof Provost MIB_PROBE_TCP(tcps_ecn_rcvect0);
30660d8dbbeSKristof Provost MIB_PROBE_TCP(tcps_ecn_rcvect1);
30760d8dbbeSKristof Provost MIB_PROBE_TCP(tcps_ecn_shs);
30860d8dbbeSKristof Provost MIB_PROBE_TCP(tcps_ecn_rcwnd);
30960d8dbbeSKristof Provost 
31060d8dbbeSKristof Provost MIB_PROBE_TCP(tcps_sig_rcvgoodsig);
31160d8dbbeSKristof Provost MIB_PROBE_TCP(tcps_sig_rcvbadsig);
31260d8dbbeSKristof Provost MIB_PROBE_TCP(tcps_sig_err_buildsig);
31360d8dbbeSKristof Provost MIB_PROBE_TCP(tcps_sig_err_sigopt);
31460d8dbbeSKristof Provost MIB_PROBE_TCP(tcps_sig_err_nosigopt);
31560d8dbbeSKristof Provost 
31660d8dbbeSKristof Provost MIB_PROBE_TCP(tcps_pmtud_blackhole_activated);
31760d8dbbeSKristof Provost MIB_PROBE_TCP(tcps_pmtud_blackhole_activated_min_mss);
31860d8dbbeSKristof Provost MIB_PROBE_TCP(tcps_pmtud_blackhole_failed);
31960d8dbbeSKristof Provost 
32060d8dbbeSKristof Provost MIB_PROBE_TCP(tcps_tunneled_pkts);
32160d8dbbeSKristof Provost MIB_PROBE_TCP(tcps_tunneled_errs);
32260d8dbbeSKristof Provost 
32360d8dbbeSKristof Provost MIB_PROBE_TCP(tcps_dsack_count);
32460d8dbbeSKristof Provost MIB_PROBE_TCP(tcps_dsack_bytes);
32560d8dbbeSKristof Provost MIB_PROBE_TCP(tcps_dsack_tlp_bytes);
32660d8dbbeSKristof Provost 
32760d8dbbeSKristof Provost MIB_PROBE_TCP(tcps_tw_recycles);
32860d8dbbeSKristof Provost MIB_PROBE_TCP(tcps_tw_resets);
32960d8dbbeSKristof Provost MIB_PROBE_TCP(tcps_tw_responds);
33060d8dbbeSKristof Provost 
33160d8dbbeSKristof Provost MIB_PROBE_TCP(tcps_ace_nect);
33260d8dbbeSKristof Provost MIB_PROBE_TCP(tcps_ace_ect1);
33360d8dbbeSKristof Provost MIB_PROBE_TCP(tcps_ace_ect0);
33460d8dbbeSKristof Provost MIB_PROBE_TCP(tcps_ace_ce);
33560d8dbbeSKristof Provost 
33660d8dbbeSKristof Provost MIB_PROBE_TCP(tcps_ecn_sndect0);
33760d8dbbeSKristof Provost MIB_PROBE_TCP(tcps_ecn_sndect1);
33860d8dbbeSKristof Provost 
33960d8dbbeSKristof Provost MIB_PROBE_TCP(tcps_tlpresends);
34060d8dbbeSKristof Provost MIB_PROBE_TCP(tcps_tlpresend_bytes);
34160d8dbbeSKristof Provost 
342*646c28eaSMichael Tuexen MIB_PROBE_TCP(tcps_rcvghostack);
343*646c28eaSMichael Tuexen MIB_PROBE_TCP(tcps_rcvacktooold);
34460d8dbbeSKristof Provost #endif
34560d8dbbeSKristof Provost 
346d9fae5abSAndriy Gapon SDT_PROBE_DEFINE6_XLATE(ip, , , receive,
34757f60867SMark Johnston     "void *", "pktinfo_t *",
34857f60867SMark Johnston     "void *", "csinfo_t *",
34957f60867SMark Johnston     "uint8_t *", "ipinfo_t *",
35057f60867SMark Johnston     "struct ifnet *", "ifinfo_t *",
35157f60867SMark Johnston     "struct ip *", "ipv4info_t *",
35257f60867SMark Johnston     "struct ip6_hdr *", "ipv6info_t *");
35357f60867SMark Johnston 
354d9fae5abSAndriy Gapon SDT_PROBE_DEFINE6_XLATE(ip, , , send,
35557f60867SMark Johnston     "void *", "pktinfo_t *",
35657f60867SMark Johnston     "void *", "csinfo_t *",
35757f60867SMark Johnston     "uint8_t *", "ipinfo_t *",
35857f60867SMark Johnston     "struct ifnet *", "ifinfo_t *",
35957f60867SMark Johnston     "struct ip *", "ipv4info_t *",
36057f60867SMark Johnston     "struct ip6_hdr *", "ipv6info_t *");
36157f60867SMark Johnston 
362d9fae5abSAndriy Gapon SDT_PROBE_DEFINE5_XLATE(tcp, , , accept__established,
36357f60867SMark Johnston     "void *", "pktinfo_t *",
36457f60867SMark Johnston     "struct tcpcb *", "csinfo_t *",
36582988b50SGeorge V. Neville-Neil     "struct mbuf *", "ipinfo_t *",
36657f60867SMark Johnston     "struct tcpcb *", "tcpsinfo_t *" ,
3678298c17cSMark Johnston     "struct tcphdr *", "tcpinfoh_t *");
36857f60867SMark Johnston 
369d9fae5abSAndriy Gapon SDT_PROBE_DEFINE5_XLATE(tcp, , , accept__refused,
37057f60867SMark Johnston     "void *", "pktinfo_t *",
37157f60867SMark Johnston     "struct tcpcb *", "csinfo_t *",
37282988b50SGeorge V. Neville-Neil     "struct mbuf *", "ipinfo_t *",
37357f60867SMark Johnston     "struct tcpcb *", "tcpsinfo_t *" ,
37457f60867SMark Johnston     "struct tcphdr *", "tcpinfo_t *");
37557f60867SMark Johnston 
376d9fae5abSAndriy Gapon SDT_PROBE_DEFINE5_XLATE(tcp, , , connect__established,
37757f60867SMark Johnston     "void *", "pktinfo_t *",
37857f60867SMark Johnston     "struct tcpcb *", "csinfo_t *",
37982988b50SGeorge V. Neville-Neil     "struct mbuf *", "ipinfo_t *",
38057f60867SMark Johnston     "struct tcpcb *", "tcpsinfo_t *" ,
3818298c17cSMark Johnston     "struct tcphdr *", "tcpinfoh_t *");
38257f60867SMark Johnston 
383d9fae5abSAndriy Gapon SDT_PROBE_DEFINE5_XLATE(tcp, , , connect__refused,
38457f60867SMark Johnston     "void *", "pktinfo_t *",
38557f60867SMark Johnston     "struct tcpcb *", "csinfo_t *",
38682988b50SGeorge V. Neville-Neil     "struct mbuf *", "ipinfo_t *",
38757f60867SMark Johnston     "struct tcpcb *", "tcpsinfo_t *" ,
3888298c17cSMark Johnston     "struct tcphdr *", "tcpinfoh_t *");
38957f60867SMark Johnston 
390d9fae5abSAndriy Gapon SDT_PROBE_DEFINE5_XLATE(tcp, , , connect__request,
39157f60867SMark Johnston     "void *", "pktinfo_t *",
39257f60867SMark Johnston     "struct tcpcb *", "csinfo_t *",
39357f60867SMark Johnston     "uint8_t *", "ipinfo_t *",
39457f60867SMark Johnston     "struct tcpcb *", "tcpsinfo_t *" ,
39557f60867SMark Johnston     "struct tcphdr *", "tcpinfo_t *");
39657f60867SMark Johnston 
397d9fae5abSAndriy Gapon SDT_PROBE_DEFINE5_XLATE(tcp, , , receive,
39857f60867SMark Johnston     "void *", "pktinfo_t *",
39957f60867SMark Johnston     "struct tcpcb *", "csinfo_t *",
40082988b50SGeorge V. Neville-Neil     "struct mbuf *", "ipinfo_t *",
40157f60867SMark Johnston     "struct tcpcb *", "tcpsinfo_t *" ,
4028298c17cSMark Johnston     "struct tcphdr *", "tcpinfoh_t *");
40357f60867SMark Johnston 
404d9fae5abSAndriy Gapon SDT_PROBE_DEFINE5_XLATE(tcp, , , send,
40557f60867SMark Johnston     "void *", "pktinfo_t *",
40657f60867SMark Johnston     "struct tcpcb *", "csinfo_t *",
40757f60867SMark Johnston     "uint8_t *", "ipinfo_t *",
40857f60867SMark Johnston     "struct tcpcb *", "tcpsinfo_t *" ,
40957f60867SMark Johnston     "struct tcphdr *", "tcpinfo_t *");
41057f60867SMark Johnston 
411981ad3ecSGeorge V. Neville-Neil SDT_PROBE_DEFINE1_XLATE(tcp, , , siftr,
412981ad3ecSGeorge V. Neville-Neil     "struct pkt_node *", "siftrinfo_t *");
413981ad3ecSGeorge V. Neville-Neil 
4145d06879aSGeorge V. Neville-Neil SDT_PROBE_DEFINE3_XLATE(tcp, , , debug__input,
4155d06879aSGeorge V. Neville-Neil     "struct tcpcb *", "tcpsinfo_t *" ,
4165557762bSMark Johnston     "struct tcphdr *", "tcpinfoh_t *",
41708d157a8SRobert Wing     "struct mbuf *", "ipinfo_t *");
4185d06879aSGeorge V. Neville-Neil 
4195d06879aSGeorge V. Neville-Neil SDT_PROBE_DEFINE3_XLATE(tcp, , , debug__output,
4205d06879aSGeorge V. Neville-Neil     "struct tcpcb *", "tcpsinfo_t *" ,
4215d06879aSGeorge V. Neville-Neil     "struct tcphdr *", "tcpinfo_t *",
42282988b50SGeorge V. Neville-Neil     "struct mbuf *", "ipinfo_t *");
4235d06879aSGeorge V. Neville-Neil 
4245d06879aSGeorge V. Neville-Neil SDT_PROBE_DEFINE2_XLATE(tcp, , , debug__user,
4255d06879aSGeorge V. Neville-Neil     "struct tcpcb *", "tcpsinfo_t *" ,
4265d06879aSGeorge V. Neville-Neil     "int", "int");
4275d06879aSGeorge V. Neville-Neil 
4285d06879aSGeorge V. Neville-Neil SDT_PROBE_DEFINE3_XLATE(tcp, , , debug__drop,
4295d06879aSGeorge V. Neville-Neil     "struct tcpcb *", "tcpsinfo_t *" ,
4305557762bSMark Johnston     "struct tcphdr *", "tcpinfoh_t *",
43182988b50SGeorge V. Neville-Neil     "struct mbuf *", "ipinfo_t *");
4325d06879aSGeorge V. Neville-Neil 
433d9fae5abSAndriy Gapon SDT_PROBE_DEFINE6_XLATE(tcp, , , state__change,
43457f60867SMark Johnston     "void *", "void *",
43557f60867SMark Johnston     "struct tcpcb *", "csinfo_t *",
43657f60867SMark Johnston     "void *", "void *",
43757f60867SMark Johnston     "struct tcpcb *", "tcpsinfo_t *",
43857f60867SMark Johnston     "void *", "void *",
43957f60867SMark Johnston     "int", "tcplsinfo_t *");
44057f60867SMark Johnston 
441e44c1887SSteven Hartland SDT_PROBE_DEFINE6_XLATE(tcp, , , receive__autoresize,
442e44c1887SSteven Hartland     "void *", "void *",
443e44c1887SSteven Hartland     "struct tcpcb *", "csinfo_t *",
444e44c1887SSteven Hartland     "struct mbuf *", "ipinfo_t *",
445e44c1887SSteven Hartland     "struct tcpcb *", "tcpsinfo_t *" ,
446e44c1887SSteven Hartland     "struct tcphdr *", "tcpinfoh_t *",
447e44c1887SSteven Hartland     "int", "int");
448e44c1887SSteven Hartland 
449d9fae5abSAndriy Gapon SDT_PROBE_DEFINE5_XLATE(udp, , , receive,
45057f60867SMark Johnston     "void *", "pktinfo_t *",
45157f60867SMark Johnston     "struct inpcb *", "csinfo_t *",
45257f60867SMark Johnston     "uint8_t *", "ipinfo_t *",
45357f60867SMark Johnston     "struct inpcb *", "udpsinfo_t *",
45457f60867SMark Johnston     "struct udphdr *", "udpinfo_t *");
45557f60867SMark Johnston 
456d9fae5abSAndriy Gapon SDT_PROBE_DEFINE5_XLATE(udp, , , send,
45757f60867SMark Johnston     "void *", "pktinfo_t *",
45857f60867SMark Johnston     "struct inpcb *", "csinfo_t *",
45957f60867SMark Johnston     "uint8_t *", "ipinfo_t *",
46057f60867SMark Johnston     "struct inpcb *", "udpsinfo_t *",
46157f60867SMark Johnston     "struct udphdr *", "udpinfo_t *");
4627bda9663SMichael Tuexen 
4637bda9663SMichael Tuexen SDT_PROBE_DEFINE5_XLATE(udplite, , , receive,
4647bda9663SMichael Tuexen     "void *", "pktinfo_t *",
4657bda9663SMichael Tuexen     "struct inpcb *", "csinfo_t *",
4667bda9663SMichael Tuexen     "uint8_t *", "ipinfo_t *",
4677bda9663SMichael Tuexen     "struct inpcb *", "udplitesinfo_t *",
4687bda9663SMichael Tuexen     "struct udphdr *", "udpliteinfo_t *");
4697bda9663SMichael Tuexen 
4707bda9663SMichael Tuexen SDT_PROBE_DEFINE5_XLATE(udplite, , , send,
4717bda9663SMichael Tuexen     "void *", "pktinfo_t *",
4727bda9663SMichael Tuexen     "struct inpcb *", "csinfo_t *",
4737bda9663SMichael Tuexen     "uint8_t *", "ipinfo_t *",
4747bda9663SMichael Tuexen     "struct inpcb *", "udplitesinfo_t *",
4757bda9663SMichael Tuexen     "struct udphdr *", "udpliteinfo_t *");
476