2 * Copyright (c) 2013 Mark Johnston <markj@FreeBSD.org>
4 * Redistribution and use in source and binary forms, with or without
5 * modification, are permitted provided that the following conditions are
7 * 1. Redistributions of source code must retain the above copyright
8 * notice, this list of conditions and the following disclaimer.
9 * 2. Redistributions in binary form must reproduce the above copyright
10 * notice, this list of conditions and the following disclaimer in
11 * the documentation and/or other materials provided with the
14 * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
15 * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
16 * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
17 * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
18 * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
19 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
20 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
21 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
22 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
23 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
29 #include <sys/cdefs.h>
30 __FBSDID("$FreeBSD$");
32 #include <sys/param.h>
33 #include <sys/systm.h>
36 SDT_PROVIDER_DEFINE(ip);
37 SDT_PROVIDER_DEFINE(tcp);
38 SDT_PROVIDER_DEFINE(udp);
40 SDT_PROBE_DEFINE6_XLATE(ip, , , receive,
41 "void *", "pktinfo_t *",
42 "void *", "csinfo_t *",
43 "uint8_t *", "ipinfo_t *",
44 "struct ifnet *", "ifinfo_t *",
45 "struct ip *", "ipv4info_t *",
46 "struct ip6_hdr *", "ipv6info_t *");
48 SDT_PROBE_DEFINE6_XLATE(ip, , , send,
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_DEFINE5_XLATE(tcp, , , accept__established,
57 "void *", "pktinfo_t *",
58 "struct tcpcb *", "csinfo_t *",
59 "struct mbuf *", "ipinfo_t *",
60 "struct tcpcb *", "tcpsinfo_t *" ,
61 "struct tcphdr *", "tcpinfoh_t *");
63 SDT_PROBE_DEFINE5_XLATE(tcp, , , accept__refused,
64 "void *", "pktinfo_t *",
65 "struct tcpcb *", "csinfo_t *",
66 "struct mbuf *", "ipinfo_t *",
67 "struct tcpcb *", "tcpsinfo_t *" ,
68 "struct tcphdr *", "tcpinfo_t *");
70 SDT_PROBE_DEFINE5_XLATE(tcp, , , connect__established,
71 "void *", "pktinfo_t *",
72 "struct tcpcb *", "csinfo_t *",
73 "struct mbuf *", "ipinfo_t *",
74 "struct tcpcb *", "tcpsinfo_t *" ,
75 "struct tcphdr *", "tcpinfoh_t *");
77 SDT_PROBE_DEFINE5_XLATE(tcp, , , connect__refused,
78 "void *", "pktinfo_t *",
79 "struct tcpcb *", "csinfo_t *",
80 "struct mbuf *", "ipinfo_t *",
81 "struct tcpcb *", "tcpsinfo_t *" ,
82 "struct tcphdr *", "tcpinfoh_t *");
84 SDT_PROBE_DEFINE5_XLATE(tcp, , , connect__request,
85 "void *", "pktinfo_t *",
86 "struct tcpcb *", "csinfo_t *",
87 "uint8_t *", "ipinfo_t *",
88 "struct tcpcb *", "tcpsinfo_t *" ,
89 "struct tcphdr *", "tcpinfo_t *");
91 SDT_PROBE_DEFINE5_XLATE(tcp, , , receive,
92 "void *", "pktinfo_t *",
93 "struct tcpcb *", "csinfo_t *",
94 "struct mbuf *", "ipinfo_t *",
95 "struct tcpcb *", "tcpsinfo_t *" ,
96 "struct tcphdr *", "tcpinfoh_t *");
98 SDT_PROBE_DEFINE5_XLATE(tcp, , , send,
99 "void *", "pktinfo_t *",
100 "struct tcpcb *", "csinfo_t *",
101 "uint8_t *", "ipinfo_t *",
102 "struct tcpcb *", "tcpsinfo_t *" ,
103 "struct tcphdr *", "tcpinfo_t *");
105 SDT_PROBE_DEFINE1_XLATE(tcp, , , siftr,
106 "struct pkt_node *", "siftrinfo_t *");
108 SDT_PROBE_DEFINE3_XLATE(tcp, , , debug__input,
109 "struct tcpcb *", "tcpsinfo_t *" ,
110 "struct tcphdr *", "tcpinfoh_t *",
111 "uint8_t *", "ipinfo_t *");
113 SDT_PROBE_DEFINE3_XLATE(tcp, , , debug__output,
114 "struct tcpcb *", "tcpsinfo_t *" ,
115 "struct tcphdr *", "tcpinfo_t *",
116 "struct mbuf *", "ipinfo_t *");
118 SDT_PROBE_DEFINE2_XLATE(tcp, , , debug__user,
119 "struct tcpcb *", "tcpsinfo_t *" ,
122 SDT_PROBE_DEFINE3_XLATE(tcp, , , debug__drop,
123 "struct tcpcb *", "tcpsinfo_t *" ,
124 "struct tcphdr *", "tcpinfoh_t *",
125 "struct mbuf *", "ipinfo_t *");
127 SDT_PROBE_DEFINE6_XLATE(tcp, , , state__change,
129 "struct tcpcb *", "csinfo_t *",
131 "struct tcpcb *", "tcpsinfo_t *",
133 "int", "tcplsinfo_t *");
135 SDT_PROBE_DEFINE6_XLATE(tcp, , , receive__autoresize,
137 "struct tcpcb *", "csinfo_t *",
138 "struct mbuf *", "ipinfo_t *",
139 "struct tcpcb *", "tcpsinfo_t *" ,
140 "struct tcphdr *", "tcpinfoh_t *",
143 SDT_PROBE_DEFINE5_XLATE(udp, , , receive,
144 "void *", "pktinfo_t *",
145 "struct inpcb *", "csinfo_t *",
146 "uint8_t *", "ipinfo_t *",
147 "struct inpcb *", "udpsinfo_t *",
148 "struct udphdr *", "udpinfo_t *");
150 SDT_PROBE_DEFINE5_XLATE(udp, , , send,
151 "void *", "pktinfo_t *",
152 "struct inpcb *", "csinfo_t *",
153 "uint8_t *", "ipinfo_t *",
154 "struct inpcb *", "udpsinfo_t *",
155 "struct udphdr *", "udpinfo_t *");