2 * SPDX-License-Identifier: BSD-2-Clause-FreeBSD
4 * Copyright (c) 2013 Mark Johnston <markj@FreeBSD.org>
6 * Redistribution and use in source and binary forms, with or without
7 * modification, are permitted provided that the following conditions are
9 * 1. Redistributions of source code must retain the above copyright
10 * notice, this list of conditions and the following disclaimer.
11 * 2. 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
16 * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
17 * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
18 * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
19 * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
20 * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
21 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
22 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
23 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
24 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
25 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
31 #include <sys/cdefs.h>
32 __FBSDID("$FreeBSD$");
36 #include <sys/param.h>
37 #include <sys/systm.h>
40 SDT_PROVIDER_DEFINE(ip);
42 SDT_PROVIDER_DEFINE(sctp);
44 SDT_PROVIDER_DEFINE(tcp);
45 SDT_PROVIDER_DEFINE(udp);
46 SDT_PROVIDER_DEFINE(udplite);
48 SDT_PROBE_DEFINE6_XLATE(ip, , , receive,
49 "void *", "pktinfo_t *",
50 "void *", "csinfo_t *",
51 "uint8_t *", "ipinfo_t *",
52 "struct ifnet *", "ifinfo_t *",
53 "struct ip *", "ipv4info_t *",
54 "struct ip6_hdr *", "ipv6info_t *");
56 SDT_PROBE_DEFINE6_XLATE(ip, , , send,
57 "void *", "pktinfo_t *",
58 "void *", "csinfo_t *",
59 "uint8_t *", "ipinfo_t *",
60 "struct ifnet *", "ifinfo_t *",
61 "struct ip *", "ipv4info_t *",
62 "struct ip6_hdr *", "ipv6info_t *");
65 SDT_PROBE_DEFINE5_XLATE(sctp, , , receive,
66 "void *", "pktinfo_t *",
67 "struct sctp_tcb *", "csinfo_t *",
68 "struct mbuf *", "ipinfo_t *",
69 "struct sctp_tcb *", "sctpsinfo_t *" ,
70 "struct sctphdr *", "sctpinfo_t *");
72 SDT_PROBE_DEFINE5_XLATE(sctp, , , send,
73 "void *", "pktinfo_t *",
74 "struct sctp_tcb *", "csinfo_t *",
75 "uint8_t *", "ipinfo_t *",
76 "struct sctp_tcb *", "sctpsinfo_t *" ,
77 "struct sctphdr *", "sctpinfo_t *");
79 SDT_PROBE_DEFINE6_XLATE(sctp, , , state__change,
81 "struct sctp_tcb *", "csinfo_t *",
83 "struct sctp_tcb *", "sctpsinfo_t *",
85 "int", "sctplsinfo_t *");
88 SDT_PROBE_DEFINE5_XLATE(tcp, , , accept__established,
89 "void *", "pktinfo_t *",
90 "struct tcpcb *", "csinfo_t *",
91 "struct mbuf *", "ipinfo_t *",
92 "struct tcpcb *", "tcpsinfo_t *" ,
93 "struct tcphdr *", "tcpinfoh_t *");
95 SDT_PROBE_DEFINE5_XLATE(tcp, , , accept__refused,
96 "void *", "pktinfo_t *",
97 "struct tcpcb *", "csinfo_t *",
98 "struct mbuf *", "ipinfo_t *",
99 "struct tcpcb *", "tcpsinfo_t *" ,
100 "struct tcphdr *", "tcpinfo_t *");
102 SDT_PROBE_DEFINE5_XLATE(tcp, , , connect__established,
103 "void *", "pktinfo_t *",
104 "struct tcpcb *", "csinfo_t *",
105 "struct mbuf *", "ipinfo_t *",
106 "struct tcpcb *", "tcpsinfo_t *" ,
107 "struct tcphdr *", "tcpinfoh_t *");
109 SDT_PROBE_DEFINE5_XLATE(tcp, , , connect__refused,
110 "void *", "pktinfo_t *",
111 "struct tcpcb *", "csinfo_t *",
112 "struct mbuf *", "ipinfo_t *",
113 "struct tcpcb *", "tcpsinfo_t *" ,
114 "struct tcphdr *", "tcpinfoh_t *");
116 SDT_PROBE_DEFINE5_XLATE(tcp, , , connect__request,
117 "void *", "pktinfo_t *",
118 "struct tcpcb *", "csinfo_t *",
119 "uint8_t *", "ipinfo_t *",
120 "struct tcpcb *", "tcpsinfo_t *" ,
121 "struct tcphdr *", "tcpinfo_t *");
123 SDT_PROBE_DEFINE5_XLATE(tcp, , , receive,
124 "void *", "pktinfo_t *",
125 "struct tcpcb *", "csinfo_t *",
126 "struct mbuf *", "ipinfo_t *",
127 "struct tcpcb *", "tcpsinfo_t *" ,
128 "struct tcphdr *", "tcpinfoh_t *");
130 SDT_PROBE_DEFINE5_XLATE(tcp, , , send,
131 "void *", "pktinfo_t *",
132 "struct tcpcb *", "csinfo_t *",
133 "uint8_t *", "ipinfo_t *",
134 "struct tcpcb *", "tcpsinfo_t *" ,
135 "struct tcphdr *", "tcpinfo_t *");
137 SDT_PROBE_DEFINE1_XLATE(tcp, , , siftr,
138 "struct pkt_node *", "siftrinfo_t *");
140 SDT_PROBE_DEFINE3_XLATE(tcp, , , debug__input,
141 "struct tcpcb *", "tcpsinfo_t *" ,
142 "struct tcphdr *", "tcpinfoh_t *",
143 "uint8_t *", "ipinfo_t *");
145 SDT_PROBE_DEFINE3_XLATE(tcp, , , debug__output,
146 "struct tcpcb *", "tcpsinfo_t *" ,
147 "struct tcphdr *", "tcpinfo_t *",
148 "struct mbuf *", "ipinfo_t *");
150 SDT_PROBE_DEFINE2_XLATE(tcp, , , debug__user,
151 "struct tcpcb *", "tcpsinfo_t *" ,
154 SDT_PROBE_DEFINE3_XLATE(tcp, , , debug__drop,
155 "struct tcpcb *", "tcpsinfo_t *" ,
156 "struct tcphdr *", "tcpinfoh_t *",
157 "struct mbuf *", "ipinfo_t *");
159 SDT_PROBE_DEFINE6_XLATE(tcp, , , state__change,
161 "struct tcpcb *", "csinfo_t *",
163 "struct tcpcb *", "tcpsinfo_t *",
165 "int", "tcplsinfo_t *");
167 SDT_PROBE_DEFINE6_XLATE(tcp, , , receive__autoresize,
169 "struct tcpcb *", "csinfo_t *",
170 "struct mbuf *", "ipinfo_t *",
171 "struct tcpcb *", "tcpsinfo_t *" ,
172 "struct tcphdr *", "tcpinfoh_t *",
175 SDT_PROBE_DEFINE5_XLATE(udp, , , receive,
176 "void *", "pktinfo_t *",
177 "struct inpcb *", "csinfo_t *",
178 "uint8_t *", "ipinfo_t *",
179 "struct inpcb *", "udpsinfo_t *",
180 "struct udphdr *", "udpinfo_t *");
182 SDT_PROBE_DEFINE5_XLATE(udp, , , send,
183 "void *", "pktinfo_t *",
184 "struct inpcb *", "csinfo_t *",
185 "uint8_t *", "ipinfo_t *",
186 "struct inpcb *", "udpsinfo_t *",
187 "struct udphdr *", "udpinfo_t *");
189 SDT_PROBE_DEFINE5_XLATE(udplite, , , receive,
190 "void *", "pktinfo_t *",
191 "struct inpcb *", "csinfo_t *",
192 "uint8_t *", "ipinfo_t *",
193 "struct inpcb *", "udplitesinfo_t *",
194 "struct udphdr *", "udpliteinfo_t *");
196 SDT_PROBE_DEFINE5_XLATE(udplite, , , send,
197 "void *", "pktinfo_t *",
198 "struct inpcb *", "csinfo_t *",
199 "uint8_t *", "ipinfo_t *",
200 "struct inpcb *", "udplitesinfo_t *",
201 "struct udphdr *", "udpliteinfo_t *");