]> git.proxmox.com Git - mirror_frr.git/blob - zebra/zebra_trace.h
doc: Add `show ipv6 rpf X:X::X:X` command to docs
[mirror_frr.git] / zebra / zebra_trace.h
1 /* Tracing for zebra
2 *
3 * Copyright (C) 2020 NVIDIA Corporation
4 * Donald Sharp
5 *
6 * This program is free software; you can redistribute it and/or modify it
7 * under the terms of the GNU General Public License as published by the Free
8 * Software Foundation; either version 2 of the License, or (at your option)
9 * any later version.
10 *
11 * This program is distributed in the hope that it will be useful, but WITHOUT
12 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
13 * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
14 * more details.
15 *
16 * You should have received a copy of the GNU General Public License along
17 * with this program; see the file COPYING; if not, write to the Free Software
18 * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
19 */
20
21 #if !defined(__ZEBRA_TRACE_H__) || defined(TRACEPOINT_HEADER_MULTI_READ)
22 #define __ZEBRA_TRACE_H__
23
24 #include "lib/trace.h"
25
26 #ifdef HAVE_LTTNG
27
28 #undef TRACEPOINT_PROVIDER
29 #define TRACEPOINT_PROVIDER frr_zebra
30
31 #undef TRACEPOINT_INCLUDE
32 #define TRACEPOINT_INCLUDE "zebra/zebra_trace.h"
33
34 #include <lttng/tracepoint.h>
35
36 #include <lib/ns.h>
37 #include <lib/table.h>
38
39 #include <zebra/zebra_ns.h>
40
41 TRACEPOINT_EVENT(
42 frr_zebra,
43 netlink_request_intf_addr,
44 TP_ARGS(struct nlsock *, netlink_cmd,
45 int, family,
46 int, type,
47 uint32_t, filter_mask),
48 TP_FIELDS(
49 ctf_integer_hex(intptr_t, netlink_cmd, netlink_cmd)
50 ctf_integer(int, family, family)
51 ctf_integer(int, type, type)
52 ctf_integer(uint32_t, filter_mask, filter_mask)
53 )
54 )
55
56 TRACEPOINT_EVENT(
57 frr_zebra,
58 netlink_interface,
59 TP_ARGS(
60 struct nlmsghdr *, header,
61 ns_id_t, ns_id,
62 int, startup),
63 TP_FIELDS(
64 ctf_integer_hex(intptr_t, header, header)
65 ctf_integer(uint32_t, ns_id, ns_id)
66 ctf_integer(uint32_t, startup, startup)
67 )
68 )
69
70 TRACEPOINT_EVENT(
71 frr_zebra,
72 netlink_nexthop_change,
73 TP_ARGS(
74 struct nlmsghdr *, header,
75 ns_id_t, ns_id,
76 int, startup),
77 TP_FIELDS(
78 ctf_integer_hex(intptr_t, header, header)
79 ctf_integer(uint32_t, ns_id, ns_id)
80 ctf_integer(uint32_t, startup, startup)
81 )
82 )
83
84 TRACEPOINT_EVENT(
85 frr_zebra,
86 netlink_interface_addr,
87 TP_ARGS(
88 struct nlmsghdr *, header,
89 ns_id_t, ns_id,
90 int, startup),
91 TP_FIELDS(
92 ctf_integer_hex(intptr_t, header, header)
93 ctf_integer(uint32_t, ns_id, ns_id)
94 ctf_integer(uint32_t, startup, startup)
95 )
96 )
97
98 TRACEPOINT_EVENT(
99 frr_zebra,
100 netlink_route_change_read_unicast,
101 TP_ARGS(
102 struct nlmsghdr *, header,
103 ns_id_t, ns_id,
104 int, startup),
105 TP_FIELDS(
106 ctf_integer_hex(intptr_t, header, header)
107 ctf_integer(uint32_t, ns_id, ns_id)
108 ctf_integer(uint32_t, startup, startup)
109 )
110 )
111
112 TRACEPOINT_EVENT(
113 frr_zebra,
114 netlink_rule_change,
115 TP_ARGS(
116 struct nlmsghdr *, header,
117 ns_id_t, ns_id,
118 int, startup),
119 TP_FIELDS(
120 ctf_integer_hex(intptr_t, header, header)
121 ctf_integer(uint32_t, ns_id, ns_id)
122 ctf_integer(uint32_t, startup, startup)
123 )
124 )
125
126 TRACEPOINT_EVENT(
127 frr_zebra,
128 netlink_tc_qdisc_change,
129 TP_ARGS(
130 struct nlmsghdr *, header,
131 ns_id_t, ns_id,
132 int, startup),
133 TP_FIELDS(
134 ctf_integer_hex(intptr_t, header, header)
135 ctf_integer(uint32_t, ns_id, ns_id)
136 ctf_integer(uint32_t, startup, startup)
137 )
138 )
139
140 TRACEPOINT_EVENT(
141 frr_zebra,
142 netlink_tc_class_change,
143 TP_ARGS(
144 struct nlmsghdr *, header,
145 ns_id_t, ns_id,
146 int, startup),
147 TP_FIELDS(
148 ctf_integer_hex(intptr_t, header, header)
149 ctf_integer(uint32_t, ns_id, ns_id)
150 ctf_integer(uint32_t, startup, startup)
151 )
152 )
153
154
155 TRACEPOINT_EVENT(
156 frr_zebra,
157 netlink_tc_filter_change,
158 TP_ARGS(
159 struct nlmsghdr *, header,
160 ns_id_t, ns_id,
161 int, startup),
162 TP_FIELDS(
163 ctf_integer_hex(intptr_t, header, header)
164 ctf_integer(uint32_t, ns_id, ns_id)
165 ctf_integer(uint32_t, startup, startup)
166 )
167 )
168
169 #include <lttng/tracepoint-event.h>
170
171 #endif /* HAVE_LTTNG */
172
173 #endif /* __ZEBRA_TRACE_H__ */