Line | Count | Source (jump to first uncovered line) |
1 | | // SPDX-License-Identifier: GPL-2.0-or-later |
2 | | /* Zebra's client header. |
3 | | * Copyright (C) 1999 Kunihiro Ishiguro |
4 | | */ |
5 | | |
6 | | #ifndef _ZEBRA_ZCLIENT_H |
7 | | #define _ZEBRA_ZCLIENT_H |
8 | | |
9 | | struct zclient; |
10 | | #define FUZZING 1 |
11 | | |
12 | | /* For struct zapi_route. */ |
13 | | #include "prefix.h" |
14 | | #include "ipaddr.h" |
15 | | |
16 | | /* For struct interface and struct connected. */ |
17 | | #include "if.h" |
18 | | |
19 | | /* For vrf_bitmap_t. */ |
20 | | #include "vrf.h" |
21 | | |
22 | | /* For union g_addr */ |
23 | | #include "nexthop.h" |
24 | | /* For resilience */ |
25 | | #include "nexthop_group.h" |
26 | | |
27 | | /* For union pw_protocol_fields */ |
28 | | #include "pw.h" |
29 | | |
30 | | #include "mlag.h" |
31 | | #include "srte.h" |
32 | | #include "srv6.h" |
33 | | |
34 | | #ifdef __cplusplus |
35 | | extern "C" { |
36 | | #endif |
37 | | |
38 | | /* Zebra types. Used in Zserv message header. */ |
39 | | typedef uint16_t zebra_size_t; |
40 | | |
41 | | /* Marker value used in new Zserv, in the byte location corresponding |
42 | | * the command value in the old zserv header. To allow old and new |
43 | | * Zserv headers to be distinguished from each other. |
44 | | */ |
45 | 66.8k | #define ZEBRA_HEADER_MARKER 254 |
46 | | |
47 | | /* For input/output buffer to zebra. */ |
48 | 0 | #define ZEBRA_MAX_PACKET_SIZ 16384U |
49 | 0 | #define ZEBRA_SMALL_PACKET_SIZE 200U |
50 | | |
51 | | /* Zebra header size. */ |
52 | 66.8k | #define ZEBRA_HEADER_SIZE 10 |
53 | | |
54 | | /* special socket path name to use TCP |
55 | | * @ is used as first character because that's abstract socket names on Linux |
56 | | */ |
57 | 0 | #define ZAPI_TCP_PATHNAME "@tcp" |
58 | | |
59 | | /* IPset size name stands for the name of the ipset entry |
60 | | * that can be created by using some zapi interfaces |
61 | | */ |
62 | | #define ZEBRA_IPSET_NAME_SIZE 32 |
63 | | |
64 | | /* IPTable action is defined by two values: either |
65 | | * forward or drop |
66 | | */ |
67 | 0 | #define ZEBRA_IPTABLES_FORWARD 0 |
68 | 0 | #define ZEBRA_IPTABLES_DROP 1 |
69 | | |
70 | | /* Zebra FEC register command flags. */ |
71 | 0 | #define ZEBRA_FEC_REGISTER_LABEL 0x1 |
72 | 0 | #define ZEBRA_FEC_REGISTER_LABEL_INDEX 0x2 |
73 | | |
74 | | /* Client capabilities */ |
75 | | enum zserv_client_capabilities { |
76 | | ZEBRA_CLIENT_GR_CAPABILITIES = 1, |
77 | | ZEBRA_CLIENT_ROUTE_UPDATE_COMPLETE = 2, |
78 | | ZEBRA_CLIENT_ROUTE_UPDATE_PENDING = 3, |
79 | | ZEBRA_CLIENT_GR_DISABLE = 4, |
80 | | ZEBRA_CLIENT_RIB_STALE_TIME |
81 | | }; |
82 | | |
83 | | /* Macro to check if there GR enabled. */ |
84 | 0 | #define ZEBRA_CLIENT_GR_ENABLED(X) (X == ZEBRA_CLIENT_GR_CAPABILITIES) |
85 | | |
86 | | #define ZEBRA_SR_POLICY_NAME_MAX_LENGTH 100 |
87 | | |
88 | | extern struct sockaddr_storage zclient_addr; |
89 | | extern socklen_t zclient_addr_len; |
90 | | |
91 | | /* Zebra message types. */ |
92 | | typedef enum { |
93 | | ZEBRA_INTERFACE_ADD, |
94 | | ZEBRA_INTERFACE_DELETE, |
95 | | ZEBRA_INTERFACE_ADDRESS_ADD, |
96 | | ZEBRA_INTERFACE_ADDRESS_DELETE, |
97 | | ZEBRA_INTERFACE_UP, |
98 | | ZEBRA_INTERFACE_DOWN, |
99 | | ZEBRA_INTERFACE_SET_MASTER, |
100 | | ZEBRA_INTERFACE_SET_PROTODOWN, |
101 | | ZEBRA_ROUTE_ADD, |
102 | | ZEBRA_ROUTE_DELETE, |
103 | | ZEBRA_ROUTE_NOTIFY_OWNER, |
104 | | ZEBRA_REDISTRIBUTE_ADD, |
105 | | ZEBRA_REDISTRIBUTE_DELETE, |
106 | | ZEBRA_REDISTRIBUTE_DEFAULT_ADD, |
107 | | ZEBRA_REDISTRIBUTE_DEFAULT_DELETE, |
108 | | ZEBRA_ROUTER_ID_ADD, |
109 | | ZEBRA_ROUTER_ID_DELETE, |
110 | | ZEBRA_ROUTER_ID_UPDATE, |
111 | | ZEBRA_HELLO, |
112 | | ZEBRA_CAPABILITIES, |
113 | | ZEBRA_NEXTHOP_REGISTER, |
114 | | ZEBRA_NEXTHOP_UNREGISTER, |
115 | | ZEBRA_NEXTHOP_UPDATE, |
116 | | ZEBRA_INTERFACE_NBR_ADDRESS_ADD, |
117 | | ZEBRA_INTERFACE_NBR_ADDRESS_DELETE, |
118 | | ZEBRA_INTERFACE_BFD_DEST_UPDATE, |
119 | | ZEBRA_BFD_DEST_REGISTER, |
120 | | ZEBRA_BFD_DEST_DEREGISTER, |
121 | | ZEBRA_BFD_DEST_UPDATE, |
122 | | ZEBRA_BFD_DEST_REPLAY, |
123 | | ZEBRA_REDISTRIBUTE_ROUTE_ADD, |
124 | | ZEBRA_REDISTRIBUTE_ROUTE_DEL, |
125 | | ZEBRA_VRF_UNREGISTER, |
126 | | ZEBRA_VRF_ADD, |
127 | | ZEBRA_VRF_DELETE, |
128 | | ZEBRA_VRF_LABEL, |
129 | | ZEBRA_INTERFACE_VRF_UPDATE, |
130 | | ZEBRA_BFD_CLIENT_REGISTER, |
131 | | ZEBRA_BFD_CLIENT_DEREGISTER, |
132 | | ZEBRA_INTERFACE_ENABLE_RADV, |
133 | | ZEBRA_INTERFACE_DISABLE_RADV, |
134 | | ZEBRA_NEXTHOP_LOOKUP_MRIB, |
135 | | ZEBRA_INTERFACE_LINK_PARAMS, |
136 | | ZEBRA_MPLS_LABELS_ADD, |
137 | | ZEBRA_MPLS_LABELS_DELETE, |
138 | | ZEBRA_MPLS_LABELS_REPLACE, |
139 | | ZEBRA_SR_POLICY_SET, |
140 | | ZEBRA_SR_POLICY_DELETE, |
141 | | ZEBRA_SR_POLICY_NOTIFY_STATUS, |
142 | | ZEBRA_IPMR_ROUTE_STATS, |
143 | | ZEBRA_LABEL_MANAGER_CONNECT, |
144 | | ZEBRA_LABEL_MANAGER_CONNECT_ASYNC, |
145 | | ZEBRA_GET_LABEL_CHUNK, |
146 | | ZEBRA_RELEASE_LABEL_CHUNK, |
147 | | ZEBRA_FEC_REGISTER, |
148 | | ZEBRA_FEC_UNREGISTER, |
149 | | ZEBRA_FEC_UPDATE, |
150 | | ZEBRA_ADVERTISE_DEFAULT_GW, |
151 | | ZEBRA_ADVERTISE_SVI_MACIP, |
152 | | ZEBRA_ADVERTISE_SUBNET, |
153 | | ZEBRA_ADVERTISE_ALL_VNI, |
154 | | ZEBRA_LOCAL_ES_ADD, |
155 | | ZEBRA_LOCAL_ES_DEL, |
156 | | ZEBRA_REMOTE_ES_VTEP_ADD, |
157 | | ZEBRA_REMOTE_ES_VTEP_DEL, |
158 | | ZEBRA_LOCAL_ES_EVI_ADD, |
159 | | ZEBRA_LOCAL_ES_EVI_DEL, |
160 | | ZEBRA_VNI_ADD, |
161 | | ZEBRA_VNI_DEL, |
162 | | ZEBRA_L3VNI_ADD, |
163 | | ZEBRA_L3VNI_DEL, |
164 | | ZEBRA_REMOTE_VTEP_ADD, |
165 | | ZEBRA_REMOTE_VTEP_DEL, |
166 | | ZEBRA_MACIP_ADD, |
167 | | ZEBRA_MACIP_DEL, |
168 | | ZEBRA_IP_PREFIX_ROUTE_ADD, |
169 | | ZEBRA_IP_PREFIX_ROUTE_DEL, |
170 | | ZEBRA_REMOTE_MACIP_ADD, |
171 | | ZEBRA_REMOTE_MACIP_DEL, |
172 | | ZEBRA_DUPLICATE_ADDR_DETECTION, |
173 | | ZEBRA_PW_ADD, |
174 | | ZEBRA_PW_DELETE, |
175 | | ZEBRA_PW_SET, |
176 | | ZEBRA_PW_UNSET, |
177 | | ZEBRA_PW_STATUS_UPDATE, |
178 | | ZEBRA_RULE_ADD, |
179 | | ZEBRA_RULE_DELETE, |
180 | | ZEBRA_RULE_NOTIFY_OWNER, |
181 | | ZEBRA_TABLE_MANAGER_CONNECT, |
182 | | ZEBRA_GET_TABLE_CHUNK, |
183 | | ZEBRA_RELEASE_TABLE_CHUNK, |
184 | | ZEBRA_IPSET_CREATE, |
185 | | ZEBRA_IPSET_DESTROY, |
186 | | ZEBRA_IPSET_ENTRY_ADD, |
187 | | ZEBRA_IPSET_ENTRY_DELETE, |
188 | | ZEBRA_IPSET_NOTIFY_OWNER, |
189 | | ZEBRA_IPSET_ENTRY_NOTIFY_OWNER, |
190 | | ZEBRA_IPTABLE_ADD, |
191 | | ZEBRA_IPTABLE_DELETE, |
192 | | ZEBRA_IPTABLE_NOTIFY_OWNER, |
193 | | ZEBRA_VXLAN_FLOOD_CONTROL, |
194 | | ZEBRA_VXLAN_SG_ADD, |
195 | | ZEBRA_VXLAN_SG_DEL, |
196 | | ZEBRA_VXLAN_SG_REPLAY, |
197 | | ZEBRA_MLAG_PROCESS_UP, |
198 | | ZEBRA_MLAG_PROCESS_DOWN, |
199 | | ZEBRA_MLAG_CLIENT_REGISTER, |
200 | | ZEBRA_MLAG_CLIENT_UNREGISTER, |
201 | | ZEBRA_MLAG_FORWARD_MSG, |
202 | | ZEBRA_NHG_ADD, |
203 | | ZEBRA_NHG_DEL, |
204 | | ZEBRA_NHG_NOTIFY_OWNER, |
205 | | ZEBRA_EVPN_REMOTE_NH_ADD, |
206 | | ZEBRA_EVPN_REMOTE_NH_DEL, |
207 | | ZEBRA_SRV6_LOCATOR_ADD, |
208 | | ZEBRA_SRV6_LOCATOR_DELETE, |
209 | | ZEBRA_SRV6_MANAGER_GET_LOCATOR_CHUNK, |
210 | | ZEBRA_SRV6_MANAGER_RELEASE_LOCATOR_CHUNK, |
211 | | ZEBRA_ERROR, |
212 | | ZEBRA_CLIENT_CAPABILITIES, |
213 | | ZEBRA_OPAQUE_MESSAGE, |
214 | | ZEBRA_OPAQUE_REGISTER, |
215 | | ZEBRA_OPAQUE_UNREGISTER, |
216 | | ZEBRA_NEIGH_DISCOVER, |
217 | | ZEBRA_ROUTE_NOTIFY_REQUEST, |
218 | | ZEBRA_CLIENT_CLOSE_NOTIFY, |
219 | | ZEBRA_NHRP_NEIGH_ADDED, |
220 | | ZEBRA_NHRP_NEIGH_REMOVED, |
221 | | ZEBRA_NHRP_NEIGH_GET, |
222 | | ZEBRA_NHRP_NEIGH_REGISTER, |
223 | | ZEBRA_NHRP_NEIGH_UNREGISTER, |
224 | | ZEBRA_NEIGH_IP_ADD, |
225 | | ZEBRA_NEIGH_IP_DEL, |
226 | | ZEBRA_CONFIGURE_ARP, |
227 | | ZEBRA_GRE_GET, |
228 | | ZEBRA_GRE_UPDATE, |
229 | | ZEBRA_GRE_SOURCE_SET, |
230 | | ZEBRA_TC_QDISC_INSTALL, |
231 | | ZEBRA_TC_QDISC_UNINSTALL, |
232 | | ZEBRA_TC_CLASS_ADD, |
233 | | ZEBRA_TC_CLASS_DELETE, |
234 | | ZEBRA_TC_FILTER_ADD, |
235 | | ZEBRA_TC_FILTER_DELETE, |
236 | | } zebra_message_types_t; |
237 | | |
238 | | enum zebra_error_types { |
239 | | ZEBRA_UNKNOWN_ERROR, /* Error of unknown type */ |
240 | | ZEBRA_NO_VRF, /* Vrf in header was not found */ |
241 | | ZEBRA_INVALID_MSG_TYPE, /* No handler found for msg type */ |
242 | | }; |
243 | | |
244 | | static inline const char *zebra_error_type2str(enum zebra_error_types type) |
245 | 0 | { |
246 | 0 | const char *ret = "UNKNOWN"; |
247 | 0 |
|
248 | 0 | switch (type) { |
249 | 0 | case ZEBRA_UNKNOWN_ERROR: |
250 | 0 | ret = "ZEBRA_UNKNOWN_ERROR"; |
251 | 0 | break; |
252 | 0 | case ZEBRA_NO_VRF: |
253 | 0 | ret = "ZEBRA_NO_VRF"; |
254 | 0 | break; |
255 | 0 | case ZEBRA_INVALID_MSG_TYPE: |
256 | 0 | ret = "ZEBRA_INVALID_MSG_TYPE"; |
257 | 0 | break; |
258 | 0 | } |
259 | 0 |
|
260 | 0 | return ret; |
261 | 0 | } Unexecuted instantiation: ospf_main.c:zebra_error_type2str Unexecuted instantiation: ospf_bfd.c:zebra_error_type2str Unexecuted instantiation: ospf_dump.c:zebra_error_type2str Unexecuted instantiation: ospf_interface.c:zebra_error_type2str Unexecuted instantiation: ospf_lsa.c:zebra_error_type2str Unexecuted instantiation: ospf_neighbor.c:zebra_error_type2str Unexecuted instantiation: ospf_network.c:zebra_error_type2str Unexecuted instantiation: ospf_nsm.c:zebra_error_type2str Unexecuted instantiation: ospf_opaque.c:zebra_error_type2str Unexecuted instantiation: ospf_packet.c:zebra_error_type2str Unexecuted instantiation: ospf_ri.c:zebra_error_type2str Unexecuted instantiation: ospf_routemap.c:zebra_error_type2str Unexecuted instantiation: ospf_spf.c:zebra_error_type2str Unexecuted instantiation: ospf_sr.c:zebra_error_type2str Unexecuted instantiation: ospf_te.c:zebra_error_type2str Unexecuted instantiation: ospf_vty.c:zebra_error_type2str Unexecuted instantiation: ospf_zebra.c:zebra_error_type2str Unexecuted instantiation: ospfd.c:zebra_error_type2str Unexecuted instantiation: ospf_gr_helper.c:zebra_error_type2str Unexecuted instantiation: ospf_abr.c:zebra_error_type2str Unexecuted instantiation: ospf_apiserver.c:zebra_error_type2str Unexecuted instantiation: ospf_asbr.c:zebra_error_type2str Unexecuted instantiation: ospf_ase.c:zebra_error_type2str Unexecuted instantiation: ospf_ext.c:zebra_error_type2str Unexecuted instantiation: ospf_flood.c:zebra_error_type2str Unexecuted instantiation: ospf_gr.c:zebra_error_type2str Unexecuted instantiation: ospf_ia.c:zebra_error_type2str Unexecuted instantiation: ospf_ism.c:zebra_error_type2str Unexecuted instantiation: ospf_ldp_sync.c:zebra_error_type2str Unexecuted instantiation: ospf_route.c:zebra_error_type2str Unexecuted instantiation: ospf_api.c:zebra_error_type2str Unexecuted instantiation: bfd.c:zebra_error_type2str Unexecuted instantiation: ldp_sync.c:zebra_error_type2str Unexecuted instantiation: libfrr.c:zebra_error_type2str Unexecuted instantiation: link_state.c:zebra_error_type2str Unexecuted instantiation: log.c:zebra_error_type2str Unexecuted instantiation: zclient.c:zebra_error_type2str Unexecuted instantiation: connected.c:zebra_error_type2str Unexecuted instantiation: if_netlink.c:zebra_error_type2str Unexecuted instantiation: interface.c:zebra_error_type2str Unexecuted instantiation: ioctl.c:zebra_error_type2str Unexecuted instantiation: kernel_netlink.c:zebra_error_type2str Unexecuted instantiation: label_manager.c:zebra_error_type2str Unexecuted instantiation: main.c:zebra_error_type2str Unexecuted instantiation: netconf_netlink.c:zebra_error_type2str Unexecuted instantiation: redistribute.c:zebra_error_type2str Unexecuted instantiation: router-id.c:zebra_error_type2str Unexecuted instantiation: rt_netlink.c:zebra_error_type2str Unexecuted instantiation: rtadv.c:zebra_error_type2str Unexecuted instantiation: rtread_netlink.c:zebra_error_type2str Unexecuted instantiation: rule_netlink.c:zebra_error_type2str Unexecuted instantiation: table_manager.c:zebra_error_type2str Unexecuted instantiation: tc_netlink.c:zebra_error_type2str Unexecuted instantiation: zapi_msg.c:zebra_error_type2str Unexecuted instantiation: zebra_affinitymap.c:zebra_error_type2str Unexecuted instantiation: zebra_dplane.c:zebra_error_type2str Unexecuted instantiation: zebra_gr.c:zebra_error_type2str Unexecuted instantiation: zebra_l2.c:zebra_error_type2str Unexecuted instantiation: zebra_l2_bridge_if.c:zebra_error_type2str Unexecuted instantiation: zebra_evpn.c:zebra_error_type2str Unexecuted instantiation: zebra_evpn_mac.c:zebra_error_type2str Unexecuted instantiation: zebra_evpn_neigh.c:zebra_error_type2str Unexecuted instantiation: zebra_mlag.c:zebra_error_type2str Unexecuted instantiation: zebra_mlag_vty.c:zebra_error_type2str Unexecuted instantiation: zebra_mpls.c:zebra_error_type2str Unexecuted instantiation: zebra_mpls_netlink.c:zebra_error_type2str Unexecuted instantiation: zebra_mpls_null.c:zebra_error_type2str Unexecuted instantiation: zebra_mpls_vty.c:zebra_error_type2str Unexecuted instantiation: zebra_srv6.c:zebra_error_type2str Unexecuted instantiation: zebra_srv6_vty.c:zebra_error_type2str Unexecuted instantiation: zebra_mroute.c:zebra_error_type2str Unexecuted instantiation: zebra_nb.c:zebra_error_type2str Unexecuted instantiation: zebra_nb_config.c:zebra_error_type2str Unexecuted instantiation: zebra_nb_rpcs.c:zebra_error_type2str Unexecuted instantiation: zebra_nb_state.c:zebra_error_type2str Unexecuted instantiation: zebra_netns_id.c:zebra_error_type2str Unexecuted instantiation: zebra_netns_notify.c:zebra_error_type2str Unexecuted instantiation: zebra_nhg.c:zebra_error_type2str Unexecuted instantiation: zebra_ns.c:zebra_error_type2str Unexecuted instantiation: zebra_opaque.c:zebra_error_type2str Unexecuted instantiation: zebra_pbr.c:zebra_error_type2str Unexecuted instantiation: zebra_ptm.c:zebra_error_type2str Unexecuted instantiation: zebra_ptm_redistribute.c:zebra_error_type2str Unexecuted instantiation: zebra_pw.c:zebra_error_type2str Unexecuted instantiation: zebra_rib.c:zebra_error_type2str Unexecuted instantiation: zebra_router.c:zebra_error_type2str Unexecuted instantiation: zebra_rnh.c:zebra_error_type2str Unexecuted instantiation: zebra_routemap.c:zebra_error_type2str Unexecuted instantiation: zebra_script.c:zebra_error_type2str Unexecuted instantiation: zebra_srte.c:zebra_error_type2str Unexecuted instantiation: zebra_tc.c:zebra_error_type2str Unexecuted instantiation: zebra_vrf.c:zebra_error_type2str Unexecuted instantiation: zebra_vty.c:zebra_error_type2str Unexecuted instantiation: zebra_vxlan.c:zebra_error_type2str Unexecuted instantiation: zebra_vxlan_if.c:zebra_error_type2str Unexecuted instantiation: zebra_evpn_mh.c:zebra_error_type2str Unexecuted instantiation: zebra_neigh.c:zebra_error_type2str Unexecuted instantiation: zserv.c:zebra_error_type2str Unexecuted instantiation: debug_nl.c:zebra_error_type2str Unexecuted instantiation: bgp_main.c:zebra_error_type2str Unexecuted instantiation: bgp_attr.c:zebra_error_type2str Unexecuted instantiation: bgp_attr_evpn.c:zebra_error_type2str Unexecuted instantiation: bgp_clist.c:zebra_error_type2str Unexecuted instantiation: bgp_community.c:zebra_error_type2str Unexecuted instantiation: bgp_community_alias.c:zebra_error_type2str Unexecuted instantiation: bgp_debug.c:zebra_error_type2str Unexecuted instantiation: bgp_dump.c:zebra_error_type2str Unexecuted instantiation: bgp_ecommunity.c:zebra_error_type2str Unexecuted instantiation: bgp_evpn.c:zebra_error_type2str Unexecuted instantiation: bgp_evpn_mh.c:zebra_error_type2str Unexecuted instantiation: bgp_evpn_vty.c:zebra_error_type2str Unexecuted instantiation: bgp_filter.c:zebra_error_type2str Unexecuted instantiation: bgp_flowspec_vty.c:zebra_error_type2str Unexecuted instantiation: bgp_fsm.c:zebra_error_type2str Unexecuted instantiation: bgp_io.c:zebra_error_type2str Unexecuted instantiation: bgp_keepalives.c:zebra_error_type2str Unexecuted instantiation: bgp_labelpool.c:zebra_error_type2str Unexecuted instantiation: bgp_lcommunity.c:zebra_error_type2str Unexecuted instantiation: bgp_mac.c:zebra_error_type2str Unexecuted instantiation: bgp_mpath.c:zebra_error_type2str Unexecuted instantiation: bgp_mplsvpn.c:zebra_error_type2str Unexecuted instantiation: bgp_network.c:zebra_error_type2str Unexecuted instantiation: bgp_nexthop.c:zebra_error_type2str Unexecuted instantiation: bgp_nht.c:zebra_error_type2str Unexecuted instantiation: bgp_packet.c:zebra_error_type2str Unexecuted instantiation: bgp_pbr.c:zebra_error_type2str Unexecuted instantiation: bgp_rd.c:zebra_error_type2str Unexecuted instantiation: bgp_regex.c:zebra_error_type2str Unexecuted instantiation: bgp_route.c:zebra_error_type2str Unexecuted instantiation: bgp_routemap.c:zebra_error_type2str Unexecuted instantiation: bgp_routemap_nb.c:zebra_error_type2str Unexecuted instantiation: bgp_routemap_nb_config.c:zebra_error_type2str Unexecuted instantiation: bgp_table.c:zebra_error_type2str Unexecuted instantiation: bgp_updgrp.c:zebra_error_type2str Unexecuted instantiation: bgp_updgrp_adv.c:zebra_error_type2str Unexecuted instantiation: bgp_updgrp_packet.c:zebra_error_type2str Unexecuted instantiation: bgp_vpn.c:zebra_error_type2str Unexecuted instantiation: bgp_vty.c:zebra_error_type2str Unexecuted instantiation: bgp_zebra.c:zebra_error_type2str Unexecuted instantiation: bgpd.c:zebra_error_type2str Unexecuted instantiation: bgp_rfapi_cfg.c:zebra_error_type2str Unexecuted instantiation: rfapi_import.c:zebra_error_type2str Unexecuted instantiation: rfapi.c:zebra_error_type2str Unexecuted instantiation: rfapi_ap.c:zebra_error_type2str Unexecuted instantiation: rfapi_encap_tlv.c:zebra_error_type2str Unexecuted instantiation: rfapi_nve_addr.c:zebra_error_type2str Unexecuted instantiation: rfapi_monitor.c:zebra_error_type2str Unexecuted instantiation: rfapi_rib.c:zebra_error_type2str Unexecuted instantiation: rfapi_vty.c:zebra_error_type2str Unexecuted instantiation: vnc_export_bgp.c:zebra_error_type2str Unexecuted instantiation: vnc_export_table.c:zebra_error_type2str Unexecuted instantiation: vnc_import_bgp.c:zebra_error_type2str Unexecuted instantiation: vnc_zebra.c:zebra_error_type2str Unexecuted instantiation: bgp_addpath.c:zebra_error_type2str Unexecuted instantiation: bgp_advertise.c:zebra_error_type2str Unexecuted instantiation: bgp_aspath.c:zebra_error_type2str Unexecuted instantiation: bgp_bfd.c:zebra_error_type2str Unexecuted instantiation: bgp_conditional_adv.c:zebra_error_type2str Unexecuted instantiation: bgp_damp.c:zebra_error_type2str Unexecuted instantiation: bgp_encap_tlv.c:zebra_error_type2str Unexecuted instantiation: bgp_flowspec.c:zebra_error_type2str Unexecuted instantiation: bgp_flowspec_util.c:zebra_error_type2str Unexecuted instantiation: bgp_label.c:zebra_error_type2str Unexecuted instantiation: bgp_open.c:zebra_error_type2str Unexecuted instantiation: rfp_example.c:zebra_error_type2str Unexecuted instantiation: pim_assert.c:zebra_error_type2str Unexecuted instantiation: pim_bfd.c:zebra_error_type2str Unexecuted instantiation: pim_bsm.c:zebra_error_type2str Unexecuted instantiation: pim_cmd_common.c:zebra_error_type2str Unexecuted instantiation: pim_hello.c:zebra_error_type2str Unexecuted instantiation: pim_iface.c:zebra_error_type2str Unexecuted instantiation: pim_ifchannel.c:zebra_error_type2str Unexecuted instantiation: pim_instance.c:zebra_error_type2str Unexecuted instantiation: pim_join.c:zebra_error_type2str Unexecuted instantiation: pim_jp_agg.c:zebra_error_type2str Unexecuted instantiation: pim_macro.c:zebra_error_type2str Unexecuted instantiation: pim_mroute.c:zebra_error_type2str Unexecuted instantiation: pim_msg.c:zebra_error_type2str Unexecuted instantiation: pim_nb_config.c:zebra_error_type2str Unexecuted instantiation: pim_neighbor.c:zebra_error_type2str Unexecuted instantiation: pim_nht.c:zebra_error_type2str Unexecuted instantiation: pim_oil.c:zebra_error_type2str Unexecuted instantiation: pim_pim.c:zebra_error_type2str Unexecuted instantiation: pim_rp.c:zebra_error_type2str Unexecuted instantiation: pim_rpf.c:zebra_error_type2str Unexecuted instantiation: pim_sock.c:zebra_error_type2str Unexecuted instantiation: pim_ssmpingd.c:zebra_error_type2str Unexecuted instantiation: pim_static.c:zebra_error_type2str Unexecuted instantiation: pim_tib.c:zebra_error_type2str Unexecuted instantiation: pim_tlv.c:zebra_error_type2str Unexecuted instantiation: pim_upstream.c:zebra_error_type2str Unexecuted instantiation: pim_util.c:zebra_error_type2str Unexecuted instantiation: pim_vty.c:zebra_error_type2str Unexecuted instantiation: pim_zebra.c:zebra_error_type2str Unexecuted instantiation: pim_zlookup.c:zebra_error_type2str Unexecuted instantiation: pim_vxlan.c:zebra_error_type2str Unexecuted instantiation: pim_register.c:zebra_error_type2str Unexecuted instantiation: pimd.c:zebra_error_type2str Unexecuted instantiation: pim_cmd.c:zebra_error_type2str Unexecuted instantiation: pim_igmp.c:zebra_error_type2str Unexecuted instantiation: pim_igmp_mtrace.c:zebra_error_type2str Unexecuted instantiation: pim_igmpv2.c:zebra_error_type2str Unexecuted instantiation: pim_igmpv3.c:zebra_error_type2str Unexecuted instantiation: pim_main.c:zebra_error_type2str Unexecuted instantiation: pim_mlag.c:zebra_error_type2str Unexecuted instantiation: pim_msdp.c:zebra_error_type2str Unexecuted instantiation: pim_zpthread.c:zebra_error_type2str |
262 | | |
263 | | struct redist_proto { |
264 | | uint8_t enabled; |
265 | | struct list *instances; |
266 | | }; |
267 | | |
268 | | struct zclient_capabilities { |
269 | | uint32_t ecmp; |
270 | | bool mpls_enabled; |
271 | | enum mlag_role role; |
272 | | }; |
273 | | |
274 | | /* Graceful Restart Capabilities message */ |
275 | | struct zapi_cap { |
276 | | enum zserv_client_capabilities cap; |
277 | | uint32_t stale_removal_time; |
278 | | afi_t afi; |
279 | | safi_t safi; |
280 | | vrf_id_t vrf_id; |
281 | | }; |
282 | | |
283 | | /* clang-format off */ |
284 | | #define ZAPI_CALLBACK_ARGS \ |
285 | | int cmd, struct zclient *zclient, uint16_t length, vrf_id_t vrf_id |
286 | | |
287 | | /* function-type typedef (pointer not included) */ |
288 | | typedef int (zclient_handler)(ZAPI_CALLBACK_ARGS); |
289 | | /* clang-format on */ |
290 | | |
291 | | /* Structure for the zebra client. */ |
292 | | struct zclient { |
293 | | /* The thread master we schedule ourselves on */ |
294 | | struct event_loop *master; |
295 | | |
296 | | /* Privileges to change socket values */ |
297 | | struct zebra_privs_t *privs; |
298 | | |
299 | | /* Do we care about failure events for route install? */ |
300 | | bool receive_notify; |
301 | | |
302 | | /* Is this a synchronous client? */ |
303 | | bool synchronous; |
304 | | |
305 | | /* BFD enabled with bfd_protocol_integration_init() */ |
306 | | bool bfd_integration; |
307 | | |
308 | | /* Session id (optional) to support clients with multiple sessions */ |
309 | | uint32_t session_id; |
310 | | |
311 | | /* Socket to zebra daemon. */ |
312 | | int sock; |
313 | | |
314 | | /* Connection failure count. */ |
315 | | int fail; |
316 | | |
317 | | /* Input buffer for zebra message. */ |
318 | | struct stream *ibuf; |
319 | | |
320 | | /* Output buffer for zebra message. */ |
321 | | struct stream *obuf; |
322 | | |
323 | | /* Buffer of data waiting to be written to zebra. */ |
324 | | struct buffer *wb; |
325 | | |
326 | | /* Read and connect thread. */ |
327 | | struct event *t_read; |
328 | | struct event *t_connect; |
329 | | |
330 | | /* Thread to write buffered data to zebra. */ |
331 | | struct event *t_write; |
332 | | |
333 | | /* Redistribute information. */ |
334 | | uint8_t redist_default; /* clients protocol */ |
335 | | unsigned short instance; |
336 | | struct redist_proto mi_redist[AFI_MAX][ZEBRA_ROUTE_MAX]; |
337 | | vrf_bitmap_t redist[AFI_MAX][ZEBRA_ROUTE_MAX]; |
338 | | |
339 | | /* Redistribute default. */ |
340 | | vrf_bitmap_t default_information[AFI_MAX]; |
341 | | |
342 | | /* Pointer to the callback functions. */ |
343 | | void (*zebra_connected)(struct zclient *); |
344 | | void (*zebra_capabilities)(struct zclient_capabilities *cap); |
345 | | |
346 | | int (*handle_error)(enum zebra_error_types error); |
347 | | |
348 | | /* |
349 | | * When the zclient attempts to write the stream data to |
350 | | * it's named pipe to/from zebra, we may have a situation |
351 | | * where the other daemon has not fully drained the data |
352 | | * from the socket. In this case provide a mechanism |
353 | | * where we will *still* buffer the data to be sent |
354 | | * and also provide a callback mechanism to the appropriate |
355 | | * place where we can signal that we're ready to receive |
356 | | * more data. |
357 | | */ |
358 | | void (*zebra_buffer_write_ready)(void); |
359 | | |
360 | | zclient_handler *const *handlers; |
361 | | size_t n_handlers; |
362 | | }; |
363 | | |
364 | | /* lib handlers added in bfd.c */ |
365 | | extern int zclient_bfd_session_replay(ZAPI_CALLBACK_ARGS); |
366 | | extern int zclient_bfd_session_update(ZAPI_CALLBACK_ARGS); |
367 | | |
368 | | /* Zebra API message flag. */ |
369 | | #define ZAPI_MESSAGE_NEXTHOP 0x01 |
370 | | #define ZAPI_MESSAGE_DISTANCE 0x02 |
371 | | #define ZAPI_MESSAGE_METRIC 0x04 |
372 | | #define ZAPI_MESSAGE_TAG 0x08 |
373 | | #define ZAPI_MESSAGE_MTU 0x10 |
374 | | #define ZAPI_MESSAGE_SRCPFX 0x20 |
375 | | /* Backup nexthops are present */ |
376 | | #define ZAPI_MESSAGE_BACKUP_NEXTHOPS 0x40 |
377 | | #define ZAPI_MESSAGE_NHG 0x80 |
378 | | /* |
379 | | * This should only be used by a DAEMON that needs to communicate |
380 | | * the table being used is not in the VRF. You must pass the |
381 | | * default vrf, else this will be ignored. |
382 | | */ |
383 | | #define ZAPI_MESSAGE_TABLEID 0x0100 |
384 | | #define ZAPI_MESSAGE_SRTE 0x0200 |
385 | | #define ZAPI_MESSAGE_OPAQUE 0x0400 |
386 | | |
387 | 66.8k | #define ZSERV_VERSION 6 |
388 | | /* Zserv protocol message header */ |
389 | | struct zmsghdr { |
390 | | uint16_t length; |
391 | | /* Always set to 255 in new zserv */ |
392 | | uint8_t marker; |
393 | | uint8_t version; |
394 | | vrf_id_t vrf_id; |
395 | | uint16_t command; |
396 | | } __attribute__((packed)); |
397 | | #define ZAPI_HEADER_CMD_LOCATION offsetof(struct zmsghdr, command) |
398 | | |
399 | | /* |
400 | | * ZAPI nexthop. Note that these are sorted when associated with ZAPI routes, |
401 | | * and that sorting must be aligned with the sorting of nexthops in |
402 | | * lib/nexthop.c. Any new fields must be accounted for in zapi_nexthop_cmp(). |
403 | | */ |
404 | | struct zapi_nexthop { |
405 | | enum nexthop_types_t type; |
406 | | vrf_id_t vrf_id; |
407 | | ifindex_t ifindex; |
408 | | uint8_t flags; |
409 | | union { |
410 | | union g_addr gate; |
411 | | enum blackhole_type bh_type; |
412 | | }; |
413 | | |
414 | | /* MPLS labels for BGP-LU or Segment Routing */ |
415 | | uint8_t label_num; |
416 | | enum lsp_types_t label_type; |
417 | | mpls_label_t labels[MPLS_MAX_LABELS]; |
418 | | |
419 | | struct ethaddr rmac; |
420 | | |
421 | | uint32_t weight; |
422 | | |
423 | | /* Backup nexthops, for IP-FRR, TI-LFA, etc */ |
424 | | uint8_t backup_num; |
425 | | uint8_t backup_idx[NEXTHOP_MAX_BACKUPS]; |
426 | | |
427 | | /* SR-TE color. */ |
428 | | uint32_t srte_color; |
429 | | |
430 | | /* SRv6 localsid info for Endpoint-behaviour */ |
431 | | uint32_t seg6local_action; |
432 | | struct seg6local_context seg6local_ctx; |
433 | | |
434 | | /* SRv6 Headend-behaviour */ |
435 | | struct in6_addr seg6_segs; |
436 | | }; |
437 | | |
438 | | /* |
439 | | * ZAPI nexthop flags values - we're encoding a single octet |
440 | | * initially, so ensure that the on-the-wire encoding continues |
441 | | * to match the number of valid flags. |
442 | | */ |
443 | | |
444 | | #define ZAPI_NEXTHOP_FLAG_ONLINK 0x01 |
445 | | #define ZAPI_NEXTHOP_FLAG_LABEL 0x02 |
446 | | #define ZAPI_NEXTHOP_FLAG_WEIGHT 0x04 |
447 | | #define ZAPI_NEXTHOP_FLAG_HAS_BACKUP 0x08 /* Nexthop has a backup */ |
448 | | #define ZAPI_NEXTHOP_FLAG_SEG6 0x10 |
449 | | #define ZAPI_NEXTHOP_FLAG_SEG6LOCAL 0x20 |
450 | | #define ZAPI_NEXTHOP_FLAG_EVPN 0x40 |
451 | | |
452 | | /* |
453 | | * ZAPI Nexthop Group. For use with protocol creation of nexthop groups. |
454 | | */ |
455 | | struct zapi_nhg { |
456 | | uint16_t proto; |
457 | | uint32_t id; |
458 | | |
459 | | struct nhg_resilience resilience; |
460 | | |
461 | | uint16_t nexthop_num; |
462 | | struct zapi_nexthop nexthops[MULTIPATH_NUM]; |
463 | | |
464 | | uint16_t backup_nexthop_num; |
465 | | struct zapi_nexthop backup_nexthops[MULTIPATH_NUM]; |
466 | | }; |
467 | | |
468 | | /* |
469 | | * Some of these data structures do not map easily to |
470 | | * a actual data structure size giving different compilers |
471 | | * and systems. For those data structures we need |
472 | | * to use the smallest available stream_getX/putX functions |
473 | | * to encode/decode. |
474 | | */ |
475 | | struct zapi_route { |
476 | | uint8_t type; |
477 | | unsigned short instance; |
478 | | |
479 | | /* If you add flags, update zclient_dump_route_flags */ |
480 | | uint32_t flags; |
481 | | /* |
482 | | * Cause Zebra to consider this routes nexthops recursively |
483 | | */ |
484 | | #define ZEBRA_FLAG_ALLOW_RECURSION 0x01 |
485 | | /* |
486 | | * This is a route that is read in on startup that was left around |
487 | | * from a previous run of FRR |
488 | | */ |
489 | 0 | #define ZEBRA_FLAG_SELFROUTE 0x02 |
490 | | /* |
491 | | * This flag is used to tell Zebra that the BGP route being passed |
492 | | * down is a IBGP route |
493 | | */ |
494 | | #define ZEBRA_FLAG_IBGP 0x04 |
495 | | /* |
496 | | * This is a route that has been selected for FIB installation. |
497 | | * This flag is set in zebra and can be passed up to routing daemons |
498 | | */ |
499 | | #define ZEBRA_FLAG_SELECTED 0x08 |
500 | | /* |
501 | | * This is a route that we are telling Zebra that this route *must* |
502 | | * win and will be installed even over ZEBRA_FLAG_SELECTED |
503 | | */ |
504 | | #define ZEBRA_FLAG_FIB_OVERRIDE 0x10 |
505 | | /* |
506 | | * This flag tells Zebra that the route is a EVPN route and should |
507 | | * be treated specially |
508 | | */ |
509 | | #define ZEBRA_FLAG_EVPN_ROUTE 0x20 |
510 | | /* |
511 | | * This flag tells Zebra that it should treat the distance passed |
512 | | * down as an additional discriminator for route selection of the |
513 | | * route entry. This mainly is used for backup static routes. |
514 | | */ |
515 | | #define ZEBRA_FLAG_RR_USE_DISTANCE 0x40 |
516 | | /* |
517 | | * This flag tells everyone that the route was intentionally |
518 | | * not offloaded and the route will be sent to the cpu for |
519 | | * forwarding. This flag makes no sense unless you are in |
520 | | * an asic offload situation |
521 | | */ |
522 | 0 | #define ZEBRA_FLAG_TRAPPED 0x80 |
523 | | /* |
524 | | * This flag tells everyone that the route has been |
525 | | * successfully offloaded to an asic for forwarding. |
526 | | * This flag makes no sense unless you are in an asic |
527 | | * offload situation. |
528 | | */ |
529 | 0 | #define ZEBRA_FLAG_OFFLOADED 0x100 |
530 | | /* |
531 | | * This flag tells everyone that the route has |
532 | | * failed offloading. |
533 | | * This flag makes no sense unless you are in an asic |
534 | | * offload situation. |
535 | | */ |
536 | 0 | #define ZEBRA_FLAG_OFFLOAD_FAILED 0x200 |
537 | | |
538 | | /* |
539 | | * This flag lets us know that we think the route entry |
540 | | * received has caused us to be out of sync with the |
541 | | * kernel (NLM_F_APPEND at the very least ) |
542 | | */ |
543 | 0 | #define ZEBRA_FLAG_OUTOFSYNC 0x400 |
544 | | |
545 | | /* The older XXX_MESSAGE flags live here */ |
546 | | uint32_t message; |
547 | | |
548 | | /* |
549 | | * This is an enum but we are going to treat it as a uint8_t |
550 | | * for purpose of encoding/decoding |
551 | | */ |
552 | | safi_t safi; |
553 | | |
554 | | struct prefix prefix; |
555 | | struct prefix_ipv6 src_prefix; |
556 | | |
557 | | uint16_t nexthop_num; |
558 | | struct zapi_nexthop nexthops[MULTIPATH_NUM]; |
559 | | |
560 | | /* Support backup routes for IP FRR, TI-LFA, traffic engineering */ |
561 | | uint16_t backup_nexthop_num; |
562 | | struct zapi_nexthop backup_nexthops[MULTIPATH_NUM]; |
563 | | |
564 | | uint32_t nhgid; |
565 | | |
566 | | uint8_t distance; |
567 | | |
568 | | uint32_t metric; |
569 | | |
570 | | route_tag_t tag; |
571 | | |
572 | | uint32_t mtu; |
573 | | |
574 | | vrf_id_t vrf_id; |
575 | | |
576 | | uint32_t tableid; |
577 | | |
578 | | /* SR-TE color (used for nexthop updates only). */ |
579 | | uint32_t srte_color; |
580 | | |
581 | 0 | #define ZAPI_MESSAGE_OPAQUE_LENGTH 1024 |
582 | | struct { |
583 | | uint16_t length; |
584 | | uint8_t data[ZAPI_MESSAGE_OPAQUE_LENGTH]; |
585 | | } opaque; |
586 | | }; |
587 | | |
588 | | extern char *zclient_dump_route_flags(uint32_t flags, char *buf, size_t len); |
589 | | |
590 | | struct zapi_labels { |
591 | | uint8_t message; |
592 | | #define ZAPI_LABELS_FTN 0x01 |
593 | | #define ZAPI_LABELS_HAS_BACKUPS 0x02 |
594 | | enum lsp_types_t type; |
595 | | mpls_label_t local_label; |
596 | | struct { |
597 | | struct prefix prefix; |
598 | | uint8_t type; |
599 | | unsigned short instance; |
600 | | } route; |
601 | | |
602 | | uint16_t nexthop_num; |
603 | | struct zapi_nexthop nexthops[MULTIPATH_NUM]; |
604 | | |
605 | | /* Backup nexthops, if present */ |
606 | | uint16_t backup_nexthop_num; |
607 | | struct zapi_nexthop backup_nexthops[MULTIPATH_NUM]; |
608 | | }; |
609 | | |
610 | | struct zapi_srte_tunnel { |
611 | | enum lsp_types_t type; |
612 | | mpls_label_t local_label; |
613 | | uint8_t label_num; |
614 | | mpls_label_t labels[MPLS_MAX_LABELS]; |
615 | | }; |
616 | | |
617 | | struct zapi_sr_policy { |
618 | | uint32_t color; |
619 | | struct ipaddr endpoint; |
620 | | char name[SRTE_POLICY_NAME_MAX_LENGTH]; |
621 | | struct zapi_srte_tunnel segment_list; |
622 | | int status; |
623 | | }; |
624 | | |
625 | | struct zapi_pw { |
626 | | char ifname[INTERFACE_NAMSIZ]; |
627 | | ifindex_t ifindex; |
628 | | int type; |
629 | | int af; |
630 | | union g_addr nexthop; |
631 | | uint32_t local_label; |
632 | | uint32_t remote_label; |
633 | | uint8_t flags; |
634 | | union pw_protocol_fields data; |
635 | | uint8_t protocol; |
636 | | }; |
637 | | |
638 | | struct zapi_pw_status { |
639 | | char ifname[INTERFACE_NAMSIZ]; |
640 | | ifindex_t ifindex; |
641 | | uint32_t status; |
642 | | }; |
643 | | |
644 | | /* IGP instance data associated to a RLFA. */ |
645 | | struct zapi_rlfa_igp { |
646 | | vrf_id_t vrf_id; |
647 | | int protocol; |
648 | | union { |
649 | | struct { |
650 | | char area_tag[32]; |
651 | | struct { |
652 | | int tree_id; |
653 | | int level; |
654 | | unsigned int run_id; |
655 | | } spf; |
656 | | } isis; |
657 | | }; |
658 | | }; |
659 | | |
660 | | /* IGP -> LDP RLFA (un)registration message. */ |
661 | | struct zapi_rlfa_request { |
662 | | /* IGP instance data. */ |
663 | | struct zapi_rlfa_igp igp; |
664 | | |
665 | | /* Destination prefix. */ |
666 | | struct prefix destination; |
667 | | |
668 | | /* PQ node address. */ |
669 | | struct in_addr pq_address; |
670 | | }; |
671 | | |
672 | | /* LDP -> IGP RLFA label update. */ |
673 | | struct zapi_rlfa_response { |
674 | | /* IGP instance data. */ |
675 | | struct zapi_rlfa_igp igp; |
676 | | |
677 | | /* Destination prefix. */ |
678 | | struct prefix destination; |
679 | | |
680 | | /* Resolved LDP labels. */ |
681 | | mpls_label_t pq_label; |
682 | | uint16_t nexthop_num; |
683 | | struct { |
684 | | int family; |
685 | | union g_addr gate; |
686 | | mpls_label_t label; |
687 | | } nexthops[MULTIPATH_NUM]; |
688 | | }; |
689 | | |
690 | | enum zapi_route_notify_owner { |
691 | | ZAPI_ROUTE_FAIL_INSTALL, |
692 | | ZAPI_ROUTE_BETTER_ADMIN_WON, |
693 | | ZAPI_ROUTE_INSTALLED, |
694 | | ZAPI_ROUTE_REMOVED, |
695 | | ZAPI_ROUTE_REMOVE_FAIL, |
696 | | }; |
697 | | |
698 | | enum zapi_nhg_notify_owner { |
699 | | ZAPI_NHG_FAIL_INSTALL, |
700 | | ZAPI_NHG_INSTALLED, |
701 | | ZAPI_NHG_REMOVED, |
702 | | ZAPI_NHG_REMOVE_FAIL, |
703 | | }; |
704 | | |
705 | | enum zapi_rule_notify_owner { |
706 | | ZAPI_RULE_FAIL_INSTALL, |
707 | | ZAPI_RULE_INSTALLED, |
708 | | ZAPI_RULE_REMOVED, |
709 | | ZAPI_RULE_FAIL_REMOVE, |
710 | | }; |
711 | | |
712 | | enum ipset_type { |
713 | | IPSET_NET_NET = 1, |
714 | | IPSET_NET_PORT_NET, |
715 | | IPSET_NET_PORT, |
716 | | IPSET_NET |
717 | | }; |
718 | | |
719 | | enum zapi_ipset_notify_owner { |
720 | | ZAPI_IPSET_FAIL_INSTALL = 0, |
721 | | ZAPI_IPSET_INSTALLED, |
722 | | ZAPI_IPSET_REMOVED, |
723 | | ZAPI_IPSET_FAIL_REMOVE, |
724 | | }; |
725 | | |
726 | | enum zapi_ipset_entry_notify_owner { |
727 | | ZAPI_IPSET_ENTRY_FAIL_INSTALL = 0, |
728 | | ZAPI_IPSET_ENTRY_INSTALLED, |
729 | | ZAPI_IPSET_ENTRY_REMOVED, |
730 | | ZAPI_IPSET_ENTRY_FAIL_REMOVE, |
731 | | }; |
732 | | |
733 | | enum zapi_iptable_notify_owner { |
734 | | ZAPI_IPTABLE_FAIL_INSTALL = 0, |
735 | | ZAPI_IPTABLE_INSTALLED, |
736 | | ZAPI_IPTABLE_REMOVED, |
737 | | ZAPI_IPTABLE_FAIL_REMOVE, |
738 | | }; |
739 | | |
740 | | enum zclient_send_status { |
741 | | ZCLIENT_SEND_FAILURE = -1, |
742 | | ZCLIENT_SEND_SUCCESS = 0, |
743 | | ZCLIENT_SEND_BUFFERED = 1 |
744 | | }; |
745 | | |
746 | | static inline const char * |
747 | | zapi_nhg_notify_owner2str(enum zapi_nhg_notify_owner note) |
748 | 0 | { |
749 | 0 | const char *ret = "UNKNOWN"; |
750 | 0 |
|
751 | 0 | switch (note) { |
752 | 0 | case ZAPI_NHG_FAIL_INSTALL: |
753 | 0 | ret = "ZAPI_NHG_FAIL_INSTALL"; |
754 | 0 | break; |
755 | 0 | case ZAPI_NHG_INSTALLED: |
756 | 0 | ret = "ZAPI_NHG_INSTALLED"; |
757 | 0 | break; |
758 | 0 | case ZAPI_NHG_REMOVE_FAIL: |
759 | 0 | ret = "ZAPI_NHG_REMOVE_FAIL"; |
760 | 0 | break; |
761 | 0 | case ZAPI_NHG_REMOVED: |
762 | 0 | ret = "ZAPI_NHG_REMOVED"; |
763 | 0 | break; |
764 | 0 | } |
765 | 0 |
|
766 | 0 | return ret; |
767 | 0 | } Unexecuted instantiation: ospf_main.c:zapi_nhg_notify_owner2str Unexecuted instantiation: ospf_bfd.c:zapi_nhg_notify_owner2str Unexecuted instantiation: ospf_dump.c:zapi_nhg_notify_owner2str Unexecuted instantiation: ospf_interface.c:zapi_nhg_notify_owner2str Unexecuted instantiation: ospf_lsa.c:zapi_nhg_notify_owner2str Unexecuted instantiation: ospf_neighbor.c:zapi_nhg_notify_owner2str Unexecuted instantiation: ospf_network.c:zapi_nhg_notify_owner2str Unexecuted instantiation: ospf_nsm.c:zapi_nhg_notify_owner2str Unexecuted instantiation: ospf_opaque.c:zapi_nhg_notify_owner2str Unexecuted instantiation: ospf_packet.c:zapi_nhg_notify_owner2str Unexecuted instantiation: ospf_ri.c:zapi_nhg_notify_owner2str Unexecuted instantiation: ospf_routemap.c:zapi_nhg_notify_owner2str Unexecuted instantiation: ospf_spf.c:zapi_nhg_notify_owner2str Unexecuted instantiation: ospf_sr.c:zapi_nhg_notify_owner2str Unexecuted instantiation: ospf_te.c:zapi_nhg_notify_owner2str Unexecuted instantiation: ospf_vty.c:zapi_nhg_notify_owner2str Unexecuted instantiation: ospf_zebra.c:zapi_nhg_notify_owner2str Unexecuted instantiation: ospfd.c:zapi_nhg_notify_owner2str Unexecuted instantiation: ospf_gr_helper.c:zapi_nhg_notify_owner2str Unexecuted instantiation: ospf_abr.c:zapi_nhg_notify_owner2str Unexecuted instantiation: ospf_apiserver.c:zapi_nhg_notify_owner2str Unexecuted instantiation: ospf_asbr.c:zapi_nhg_notify_owner2str Unexecuted instantiation: ospf_ase.c:zapi_nhg_notify_owner2str Unexecuted instantiation: ospf_ext.c:zapi_nhg_notify_owner2str Unexecuted instantiation: ospf_flood.c:zapi_nhg_notify_owner2str Unexecuted instantiation: ospf_gr.c:zapi_nhg_notify_owner2str Unexecuted instantiation: ospf_ia.c:zapi_nhg_notify_owner2str Unexecuted instantiation: ospf_ism.c:zapi_nhg_notify_owner2str Unexecuted instantiation: ospf_ldp_sync.c:zapi_nhg_notify_owner2str Unexecuted instantiation: ospf_route.c:zapi_nhg_notify_owner2str Unexecuted instantiation: ospf_api.c:zapi_nhg_notify_owner2str Unexecuted instantiation: bfd.c:zapi_nhg_notify_owner2str Unexecuted instantiation: ldp_sync.c:zapi_nhg_notify_owner2str Unexecuted instantiation: libfrr.c:zapi_nhg_notify_owner2str Unexecuted instantiation: link_state.c:zapi_nhg_notify_owner2str Unexecuted instantiation: log.c:zapi_nhg_notify_owner2str Unexecuted instantiation: zclient.c:zapi_nhg_notify_owner2str Unexecuted instantiation: connected.c:zapi_nhg_notify_owner2str Unexecuted instantiation: if_netlink.c:zapi_nhg_notify_owner2str Unexecuted instantiation: interface.c:zapi_nhg_notify_owner2str Unexecuted instantiation: ioctl.c:zapi_nhg_notify_owner2str Unexecuted instantiation: kernel_netlink.c:zapi_nhg_notify_owner2str Unexecuted instantiation: label_manager.c:zapi_nhg_notify_owner2str Unexecuted instantiation: main.c:zapi_nhg_notify_owner2str Unexecuted instantiation: netconf_netlink.c:zapi_nhg_notify_owner2str Unexecuted instantiation: redistribute.c:zapi_nhg_notify_owner2str Unexecuted instantiation: router-id.c:zapi_nhg_notify_owner2str Unexecuted instantiation: rt_netlink.c:zapi_nhg_notify_owner2str Unexecuted instantiation: rtadv.c:zapi_nhg_notify_owner2str Unexecuted instantiation: rtread_netlink.c:zapi_nhg_notify_owner2str Unexecuted instantiation: rule_netlink.c:zapi_nhg_notify_owner2str Unexecuted instantiation: table_manager.c:zapi_nhg_notify_owner2str Unexecuted instantiation: tc_netlink.c:zapi_nhg_notify_owner2str Unexecuted instantiation: zapi_msg.c:zapi_nhg_notify_owner2str Unexecuted instantiation: zebra_affinitymap.c:zapi_nhg_notify_owner2str Unexecuted instantiation: zebra_dplane.c:zapi_nhg_notify_owner2str Unexecuted instantiation: zebra_gr.c:zapi_nhg_notify_owner2str Unexecuted instantiation: zebra_l2.c:zapi_nhg_notify_owner2str Unexecuted instantiation: zebra_l2_bridge_if.c:zapi_nhg_notify_owner2str Unexecuted instantiation: zebra_evpn.c:zapi_nhg_notify_owner2str Unexecuted instantiation: zebra_evpn_mac.c:zapi_nhg_notify_owner2str Unexecuted instantiation: zebra_evpn_neigh.c:zapi_nhg_notify_owner2str Unexecuted instantiation: zebra_mlag.c:zapi_nhg_notify_owner2str Unexecuted instantiation: zebra_mlag_vty.c:zapi_nhg_notify_owner2str Unexecuted instantiation: zebra_mpls.c:zapi_nhg_notify_owner2str Unexecuted instantiation: zebra_mpls_netlink.c:zapi_nhg_notify_owner2str Unexecuted instantiation: zebra_mpls_null.c:zapi_nhg_notify_owner2str Unexecuted instantiation: zebra_mpls_vty.c:zapi_nhg_notify_owner2str Unexecuted instantiation: zebra_srv6.c:zapi_nhg_notify_owner2str Unexecuted instantiation: zebra_srv6_vty.c:zapi_nhg_notify_owner2str Unexecuted instantiation: zebra_mroute.c:zapi_nhg_notify_owner2str Unexecuted instantiation: zebra_nb.c:zapi_nhg_notify_owner2str Unexecuted instantiation: zebra_nb_config.c:zapi_nhg_notify_owner2str Unexecuted instantiation: zebra_nb_rpcs.c:zapi_nhg_notify_owner2str Unexecuted instantiation: zebra_nb_state.c:zapi_nhg_notify_owner2str Unexecuted instantiation: zebra_netns_id.c:zapi_nhg_notify_owner2str Unexecuted instantiation: zebra_netns_notify.c:zapi_nhg_notify_owner2str Unexecuted instantiation: zebra_nhg.c:zapi_nhg_notify_owner2str Unexecuted instantiation: zebra_ns.c:zapi_nhg_notify_owner2str Unexecuted instantiation: zebra_opaque.c:zapi_nhg_notify_owner2str Unexecuted instantiation: zebra_pbr.c:zapi_nhg_notify_owner2str Unexecuted instantiation: zebra_ptm.c:zapi_nhg_notify_owner2str Unexecuted instantiation: zebra_ptm_redistribute.c:zapi_nhg_notify_owner2str Unexecuted instantiation: zebra_pw.c:zapi_nhg_notify_owner2str Unexecuted instantiation: zebra_rib.c:zapi_nhg_notify_owner2str Unexecuted instantiation: zebra_router.c:zapi_nhg_notify_owner2str Unexecuted instantiation: zebra_rnh.c:zapi_nhg_notify_owner2str Unexecuted instantiation: zebra_routemap.c:zapi_nhg_notify_owner2str Unexecuted instantiation: zebra_script.c:zapi_nhg_notify_owner2str Unexecuted instantiation: zebra_srte.c:zapi_nhg_notify_owner2str Unexecuted instantiation: zebra_tc.c:zapi_nhg_notify_owner2str Unexecuted instantiation: zebra_vrf.c:zapi_nhg_notify_owner2str Unexecuted instantiation: zebra_vty.c:zapi_nhg_notify_owner2str Unexecuted instantiation: zebra_vxlan.c:zapi_nhg_notify_owner2str Unexecuted instantiation: zebra_vxlan_if.c:zapi_nhg_notify_owner2str Unexecuted instantiation: zebra_evpn_mh.c:zapi_nhg_notify_owner2str Unexecuted instantiation: zebra_neigh.c:zapi_nhg_notify_owner2str Unexecuted instantiation: zserv.c:zapi_nhg_notify_owner2str Unexecuted instantiation: debug_nl.c:zapi_nhg_notify_owner2str Unexecuted instantiation: bgp_main.c:zapi_nhg_notify_owner2str Unexecuted instantiation: bgp_attr.c:zapi_nhg_notify_owner2str Unexecuted instantiation: bgp_attr_evpn.c:zapi_nhg_notify_owner2str Unexecuted instantiation: bgp_clist.c:zapi_nhg_notify_owner2str Unexecuted instantiation: bgp_community.c:zapi_nhg_notify_owner2str Unexecuted instantiation: bgp_community_alias.c:zapi_nhg_notify_owner2str Unexecuted instantiation: bgp_debug.c:zapi_nhg_notify_owner2str Unexecuted instantiation: bgp_dump.c:zapi_nhg_notify_owner2str Unexecuted instantiation: bgp_ecommunity.c:zapi_nhg_notify_owner2str Unexecuted instantiation: bgp_evpn.c:zapi_nhg_notify_owner2str Unexecuted instantiation: bgp_evpn_mh.c:zapi_nhg_notify_owner2str Unexecuted instantiation: bgp_evpn_vty.c:zapi_nhg_notify_owner2str Unexecuted instantiation: bgp_filter.c:zapi_nhg_notify_owner2str Unexecuted instantiation: bgp_flowspec_vty.c:zapi_nhg_notify_owner2str Unexecuted instantiation: bgp_fsm.c:zapi_nhg_notify_owner2str Unexecuted instantiation: bgp_io.c:zapi_nhg_notify_owner2str Unexecuted instantiation: bgp_keepalives.c:zapi_nhg_notify_owner2str Unexecuted instantiation: bgp_labelpool.c:zapi_nhg_notify_owner2str Unexecuted instantiation: bgp_lcommunity.c:zapi_nhg_notify_owner2str Unexecuted instantiation: bgp_mac.c:zapi_nhg_notify_owner2str Unexecuted instantiation: bgp_mpath.c:zapi_nhg_notify_owner2str Unexecuted instantiation: bgp_mplsvpn.c:zapi_nhg_notify_owner2str Unexecuted instantiation: bgp_network.c:zapi_nhg_notify_owner2str Unexecuted instantiation: bgp_nexthop.c:zapi_nhg_notify_owner2str Unexecuted instantiation: bgp_nht.c:zapi_nhg_notify_owner2str Unexecuted instantiation: bgp_packet.c:zapi_nhg_notify_owner2str Unexecuted instantiation: bgp_pbr.c:zapi_nhg_notify_owner2str Unexecuted instantiation: bgp_rd.c:zapi_nhg_notify_owner2str Unexecuted instantiation: bgp_regex.c:zapi_nhg_notify_owner2str Unexecuted instantiation: bgp_route.c:zapi_nhg_notify_owner2str Unexecuted instantiation: bgp_routemap.c:zapi_nhg_notify_owner2str Unexecuted instantiation: bgp_routemap_nb.c:zapi_nhg_notify_owner2str Unexecuted instantiation: bgp_routemap_nb_config.c:zapi_nhg_notify_owner2str Unexecuted instantiation: bgp_table.c:zapi_nhg_notify_owner2str Unexecuted instantiation: bgp_updgrp.c:zapi_nhg_notify_owner2str Unexecuted instantiation: bgp_updgrp_adv.c:zapi_nhg_notify_owner2str Unexecuted instantiation: bgp_updgrp_packet.c:zapi_nhg_notify_owner2str Unexecuted instantiation: bgp_vpn.c:zapi_nhg_notify_owner2str Unexecuted instantiation: bgp_vty.c:zapi_nhg_notify_owner2str Unexecuted instantiation: bgp_zebra.c:zapi_nhg_notify_owner2str Unexecuted instantiation: bgpd.c:zapi_nhg_notify_owner2str Unexecuted instantiation: bgp_rfapi_cfg.c:zapi_nhg_notify_owner2str Unexecuted instantiation: rfapi_import.c:zapi_nhg_notify_owner2str Unexecuted instantiation: rfapi.c:zapi_nhg_notify_owner2str Unexecuted instantiation: rfapi_ap.c:zapi_nhg_notify_owner2str Unexecuted instantiation: rfapi_encap_tlv.c:zapi_nhg_notify_owner2str Unexecuted instantiation: rfapi_nve_addr.c:zapi_nhg_notify_owner2str Unexecuted instantiation: rfapi_monitor.c:zapi_nhg_notify_owner2str Unexecuted instantiation: rfapi_rib.c:zapi_nhg_notify_owner2str Unexecuted instantiation: rfapi_vty.c:zapi_nhg_notify_owner2str Unexecuted instantiation: vnc_export_bgp.c:zapi_nhg_notify_owner2str Unexecuted instantiation: vnc_export_table.c:zapi_nhg_notify_owner2str Unexecuted instantiation: vnc_import_bgp.c:zapi_nhg_notify_owner2str Unexecuted instantiation: vnc_zebra.c:zapi_nhg_notify_owner2str Unexecuted instantiation: bgp_addpath.c:zapi_nhg_notify_owner2str Unexecuted instantiation: bgp_advertise.c:zapi_nhg_notify_owner2str Unexecuted instantiation: bgp_aspath.c:zapi_nhg_notify_owner2str Unexecuted instantiation: bgp_bfd.c:zapi_nhg_notify_owner2str Unexecuted instantiation: bgp_conditional_adv.c:zapi_nhg_notify_owner2str Unexecuted instantiation: bgp_damp.c:zapi_nhg_notify_owner2str Unexecuted instantiation: bgp_encap_tlv.c:zapi_nhg_notify_owner2str Unexecuted instantiation: bgp_flowspec.c:zapi_nhg_notify_owner2str Unexecuted instantiation: bgp_flowspec_util.c:zapi_nhg_notify_owner2str Unexecuted instantiation: bgp_label.c:zapi_nhg_notify_owner2str Unexecuted instantiation: bgp_open.c:zapi_nhg_notify_owner2str Unexecuted instantiation: rfp_example.c:zapi_nhg_notify_owner2str Unexecuted instantiation: pim_assert.c:zapi_nhg_notify_owner2str Unexecuted instantiation: pim_bfd.c:zapi_nhg_notify_owner2str Unexecuted instantiation: pim_bsm.c:zapi_nhg_notify_owner2str Unexecuted instantiation: pim_cmd_common.c:zapi_nhg_notify_owner2str Unexecuted instantiation: pim_hello.c:zapi_nhg_notify_owner2str Unexecuted instantiation: pim_iface.c:zapi_nhg_notify_owner2str Unexecuted instantiation: pim_ifchannel.c:zapi_nhg_notify_owner2str Unexecuted instantiation: pim_instance.c:zapi_nhg_notify_owner2str Unexecuted instantiation: pim_join.c:zapi_nhg_notify_owner2str Unexecuted instantiation: pim_jp_agg.c:zapi_nhg_notify_owner2str Unexecuted instantiation: pim_macro.c:zapi_nhg_notify_owner2str Unexecuted instantiation: pim_mroute.c:zapi_nhg_notify_owner2str Unexecuted instantiation: pim_msg.c:zapi_nhg_notify_owner2str Unexecuted instantiation: pim_nb_config.c:zapi_nhg_notify_owner2str Unexecuted instantiation: pim_neighbor.c:zapi_nhg_notify_owner2str Unexecuted instantiation: pim_nht.c:zapi_nhg_notify_owner2str Unexecuted instantiation: pim_oil.c:zapi_nhg_notify_owner2str Unexecuted instantiation: pim_pim.c:zapi_nhg_notify_owner2str Unexecuted instantiation: pim_rp.c:zapi_nhg_notify_owner2str Unexecuted instantiation: pim_rpf.c:zapi_nhg_notify_owner2str Unexecuted instantiation: pim_sock.c:zapi_nhg_notify_owner2str Unexecuted instantiation: pim_ssmpingd.c:zapi_nhg_notify_owner2str Unexecuted instantiation: pim_static.c:zapi_nhg_notify_owner2str Unexecuted instantiation: pim_tib.c:zapi_nhg_notify_owner2str Unexecuted instantiation: pim_tlv.c:zapi_nhg_notify_owner2str Unexecuted instantiation: pim_upstream.c:zapi_nhg_notify_owner2str Unexecuted instantiation: pim_util.c:zapi_nhg_notify_owner2str Unexecuted instantiation: pim_vty.c:zapi_nhg_notify_owner2str Unexecuted instantiation: pim_zebra.c:zapi_nhg_notify_owner2str Unexecuted instantiation: pim_zlookup.c:zapi_nhg_notify_owner2str Unexecuted instantiation: pim_vxlan.c:zapi_nhg_notify_owner2str Unexecuted instantiation: pim_register.c:zapi_nhg_notify_owner2str Unexecuted instantiation: pimd.c:zapi_nhg_notify_owner2str Unexecuted instantiation: pim_cmd.c:zapi_nhg_notify_owner2str Unexecuted instantiation: pim_igmp.c:zapi_nhg_notify_owner2str Unexecuted instantiation: pim_igmp_mtrace.c:zapi_nhg_notify_owner2str Unexecuted instantiation: pim_igmpv2.c:zapi_nhg_notify_owner2str Unexecuted instantiation: pim_igmpv3.c:zapi_nhg_notify_owner2str Unexecuted instantiation: pim_main.c:zapi_nhg_notify_owner2str Unexecuted instantiation: pim_mlag.c:zapi_nhg_notify_owner2str Unexecuted instantiation: pim_msdp.c:zapi_nhg_notify_owner2str Unexecuted instantiation: pim_zpthread.c:zapi_nhg_notify_owner2str |
768 | | |
769 | | static inline const char * |
770 | | zapi_rule_notify_owner2str(enum zapi_rule_notify_owner note) |
771 | 0 | { |
772 | 0 | const char *ret = "UNKNOWN"; |
773 | 0 |
|
774 | 0 | switch (note) { |
775 | 0 | case ZAPI_RULE_FAIL_INSTALL: |
776 | 0 | ret = "ZAPI_RULE_FAIL_INSTALL"; |
777 | 0 | break; |
778 | 0 | case ZAPI_RULE_INSTALLED: |
779 | 0 | ret = "ZAPI_RULE_INSTALLED"; |
780 | 0 | break; |
781 | 0 | case ZAPI_RULE_FAIL_REMOVE: |
782 | 0 | ret = "ZAPI_RULE_FAIL_REMOVE"; |
783 | 0 | break; |
784 | 0 | case ZAPI_RULE_REMOVED: |
785 | 0 | ret = "ZAPI_RULE_REMOVED"; |
786 | 0 | break; |
787 | 0 | } |
788 | 0 |
|
789 | 0 | return ret; |
790 | 0 | } Unexecuted instantiation: ospf_main.c:zapi_rule_notify_owner2str Unexecuted instantiation: ospf_bfd.c:zapi_rule_notify_owner2str Unexecuted instantiation: ospf_dump.c:zapi_rule_notify_owner2str Unexecuted instantiation: ospf_interface.c:zapi_rule_notify_owner2str Unexecuted instantiation: ospf_lsa.c:zapi_rule_notify_owner2str Unexecuted instantiation: ospf_neighbor.c:zapi_rule_notify_owner2str Unexecuted instantiation: ospf_network.c:zapi_rule_notify_owner2str Unexecuted instantiation: ospf_nsm.c:zapi_rule_notify_owner2str Unexecuted instantiation: ospf_opaque.c:zapi_rule_notify_owner2str Unexecuted instantiation: ospf_packet.c:zapi_rule_notify_owner2str Unexecuted instantiation: ospf_ri.c:zapi_rule_notify_owner2str Unexecuted instantiation: ospf_routemap.c:zapi_rule_notify_owner2str Unexecuted instantiation: ospf_spf.c:zapi_rule_notify_owner2str Unexecuted instantiation: ospf_sr.c:zapi_rule_notify_owner2str Unexecuted instantiation: ospf_te.c:zapi_rule_notify_owner2str Unexecuted instantiation: ospf_vty.c:zapi_rule_notify_owner2str Unexecuted instantiation: ospf_zebra.c:zapi_rule_notify_owner2str Unexecuted instantiation: ospfd.c:zapi_rule_notify_owner2str Unexecuted instantiation: ospf_gr_helper.c:zapi_rule_notify_owner2str Unexecuted instantiation: ospf_abr.c:zapi_rule_notify_owner2str Unexecuted instantiation: ospf_apiserver.c:zapi_rule_notify_owner2str Unexecuted instantiation: ospf_asbr.c:zapi_rule_notify_owner2str Unexecuted instantiation: ospf_ase.c:zapi_rule_notify_owner2str Unexecuted instantiation: ospf_ext.c:zapi_rule_notify_owner2str Unexecuted instantiation: ospf_flood.c:zapi_rule_notify_owner2str Unexecuted instantiation: ospf_gr.c:zapi_rule_notify_owner2str Unexecuted instantiation: ospf_ia.c:zapi_rule_notify_owner2str Unexecuted instantiation: ospf_ism.c:zapi_rule_notify_owner2str Unexecuted instantiation: ospf_ldp_sync.c:zapi_rule_notify_owner2str Unexecuted instantiation: ospf_route.c:zapi_rule_notify_owner2str Unexecuted instantiation: ospf_api.c:zapi_rule_notify_owner2str Unexecuted instantiation: bfd.c:zapi_rule_notify_owner2str Unexecuted instantiation: ldp_sync.c:zapi_rule_notify_owner2str Unexecuted instantiation: libfrr.c:zapi_rule_notify_owner2str Unexecuted instantiation: link_state.c:zapi_rule_notify_owner2str Unexecuted instantiation: log.c:zapi_rule_notify_owner2str Unexecuted instantiation: zclient.c:zapi_rule_notify_owner2str Unexecuted instantiation: connected.c:zapi_rule_notify_owner2str Unexecuted instantiation: if_netlink.c:zapi_rule_notify_owner2str Unexecuted instantiation: interface.c:zapi_rule_notify_owner2str Unexecuted instantiation: ioctl.c:zapi_rule_notify_owner2str Unexecuted instantiation: kernel_netlink.c:zapi_rule_notify_owner2str Unexecuted instantiation: label_manager.c:zapi_rule_notify_owner2str Unexecuted instantiation: main.c:zapi_rule_notify_owner2str Unexecuted instantiation: netconf_netlink.c:zapi_rule_notify_owner2str Unexecuted instantiation: redistribute.c:zapi_rule_notify_owner2str Unexecuted instantiation: router-id.c:zapi_rule_notify_owner2str Unexecuted instantiation: rt_netlink.c:zapi_rule_notify_owner2str Unexecuted instantiation: rtadv.c:zapi_rule_notify_owner2str Unexecuted instantiation: rtread_netlink.c:zapi_rule_notify_owner2str Unexecuted instantiation: rule_netlink.c:zapi_rule_notify_owner2str Unexecuted instantiation: table_manager.c:zapi_rule_notify_owner2str Unexecuted instantiation: tc_netlink.c:zapi_rule_notify_owner2str Unexecuted instantiation: zapi_msg.c:zapi_rule_notify_owner2str Unexecuted instantiation: zebra_affinitymap.c:zapi_rule_notify_owner2str Unexecuted instantiation: zebra_dplane.c:zapi_rule_notify_owner2str Unexecuted instantiation: zebra_gr.c:zapi_rule_notify_owner2str Unexecuted instantiation: zebra_l2.c:zapi_rule_notify_owner2str Unexecuted instantiation: zebra_l2_bridge_if.c:zapi_rule_notify_owner2str Unexecuted instantiation: zebra_evpn.c:zapi_rule_notify_owner2str Unexecuted instantiation: zebra_evpn_mac.c:zapi_rule_notify_owner2str Unexecuted instantiation: zebra_evpn_neigh.c:zapi_rule_notify_owner2str Unexecuted instantiation: zebra_mlag.c:zapi_rule_notify_owner2str Unexecuted instantiation: zebra_mlag_vty.c:zapi_rule_notify_owner2str Unexecuted instantiation: zebra_mpls.c:zapi_rule_notify_owner2str Unexecuted instantiation: zebra_mpls_netlink.c:zapi_rule_notify_owner2str Unexecuted instantiation: zebra_mpls_null.c:zapi_rule_notify_owner2str Unexecuted instantiation: zebra_mpls_vty.c:zapi_rule_notify_owner2str Unexecuted instantiation: zebra_srv6.c:zapi_rule_notify_owner2str Unexecuted instantiation: zebra_srv6_vty.c:zapi_rule_notify_owner2str Unexecuted instantiation: zebra_mroute.c:zapi_rule_notify_owner2str Unexecuted instantiation: zebra_nb.c:zapi_rule_notify_owner2str Unexecuted instantiation: zebra_nb_config.c:zapi_rule_notify_owner2str Unexecuted instantiation: zebra_nb_rpcs.c:zapi_rule_notify_owner2str Unexecuted instantiation: zebra_nb_state.c:zapi_rule_notify_owner2str Unexecuted instantiation: zebra_netns_id.c:zapi_rule_notify_owner2str Unexecuted instantiation: zebra_netns_notify.c:zapi_rule_notify_owner2str Unexecuted instantiation: zebra_nhg.c:zapi_rule_notify_owner2str Unexecuted instantiation: zebra_ns.c:zapi_rule_notify_owner2str Unexecuted instantiation: zebra_opaque.c:zapi_rule_notify_owner2str Unexecuted instantiation: zebra_pbr.c:zapi_rule_notify_owner2str Unexecuted instantiation: zebra_ptm.c:zapi_rule_notify_owner2str Unexecuted instantiation: zebra_ptm_redistribute.c:zapi_rule_notify_owner2str Unexecuted instantiation: zebra_pw.c:zapi_rule_notify_owner2str Unexecuted instantiation: zebra_rib.c:zapi_rule_notify_owner2str Unexecuted instantiation: zebra_router.c:zapi_rule_notify_owner2str Unexecuted instantiation: zebra_rnh.c:zapi_rule_notify_owner2str Unexecuted instantiation: zebra_routemap.c:zapi_rule_notify_owner2str Unexecuted instantiation: zebra_script.c:zapi_rule_notify_owner2str Unexecuted instantiation: zebra_srte.c:zapi_rule_notify_owner2str Unexecuted instantiation: zebra_tc.c:zapi_rule_notify_owner2str Unexecuted instantiation: zebra_vrf.c:zapi_rule_notify_owner2str Unexecuted instantiation: zebra_vty.c:zapi_rule_notify_owner2str Unexecuted instantiation: zebra_vxlan.c:zapi_rule_notify_owner2str Unexecuted instantiation: zebra_vxlan_if.c:zapi_rule_notify_owner2str Unexecuted instantiation: zebra_evpn_mh.c:zapi_rule_notify_owner2str Unexecuted instantiation: zebra_neigh.c:zapi_rule_notify_owner2str Unexecuted instantiation: zserv.c:zapi_rule_notify_owner2str Unexecuted instantiation: debug_nl.c:zapi_rule_notify_owner2str Unexecuted instantiation: bgp_main.c:zapi_rule_notify_owner2str Unexecuted instantiation: bgp_attr.c:zapi_rule_notify_owner2str Unexecuted instantiation: bgp_attr_evpn.c:zapi_rule_notify_owner2str Unexecuted instantiation: bgp_clist.c:zapi_rule_notify_owner2str Unexecuted instantiation: bgp_community.c:zapi_rule_notify_owner2str Unexecuted instantiation: bgp_community_alias.c:zapi_rule_notify_owner2str Unexecuted instantiation: bgp_debug.c:zapi_rule_notify_owner2str Unexecuted instantiation: bgp_dump.c:zapi_rule_notify_owner2str Unexecuted instantiation: bgp_ecommunity.c:zapi_rule_notify_owner2str Unexecuted instantiation: bgp_evpn.c:zapi_rule_notify_owner2str Unexecuted instantiation: bgp_evpn_mh.c:zapi_rule_notify_owner2str Unexecuted instantiation: bgp_evpn_vty.c:zapi_rule_notify_owner2str Unexecuted instantiation: bgp_filter.c:zapi_rule_notify_owner2str Unexecuted instantiation: bgp_flowspec_vty.c:zapi_rule_notify_owner2str Unexecuted instantiation: bgp_fsm.c:zapi_rule_notify_owner2str Unexecuted instantiation: bgp_io.c:zapi_rule_notify_owner2str Unexecuted instantiation: bgp_keepalives.c:zapi_rule_notify_owner2str Unexecuted instantiation: bgp_labelpool.c:zapi_rule_notify_owner2str Unexecuted instantiation: bgp_lcommunity.c:zapi_rule_notify_owner2str Unexecuted instantiation: bgp_mac.c:zapi_rule_notify_owner2str Unexecuted instantiation: bgp_mpath.c:zapi_rule_notify_owner2str Unexecuted instantiation: bgp_mplsvpn.c:zapi_rule_notify_owner2str Unexecuted instantiation: bgp_network.c:zapi_rule_notify_owner2str Unexecuted instantiation: bgp_nexthop.c:zapi_rule_notify_owner2str Unexecuted instantiation: bgp_nht.c:zapi_rule_notify_owner2str Unexecuted instantiation: bgp_packet.c:zapi_rule_notify_owner2str Unexecuted instantiation: bgp_pbr.c:zapi_rule_notify_owner2str Unexecuted instantiation: bgp_rd.c:zapi_rule_notify_owner2str Unexecuted instantiation: bgp_regex.c:zapi_rule_notify_owner2str Unexecuted instantiation: bgp_route.c:zapi_rule_notify_owner2str Unexecuted instantiation: bgp_routemap.c:zapi_rule_notify_owner2str Unexecuted instantiation: bgp_routemap_nb.c:zapi_rule_notify_owner2str Unexecuted instantiation: bgp_routemap_nb_config.c:zapi_rule_notify_owner2str Unexecuted instantiation: bgp_table.c:zapi_rule_notify_owner2str Unexecuted instantiation: bgp_updgrp.c:zapi_rule_notify_owner2str Unexecuted instantiation: bgp_updgrp_adv.c:zapi_rule_notify_owner2str Unexecuted instantiation: bgp_updgrp_packet.c:zapi_rule_notify_owner2str Unexecuted instantiation: bgp_vpn.c:zapi_rule_notify_owner2str Unexecuted instantiation: bgp_vty.c:zapi_rule_notify_owner2str Unexecuted instantiation: bgp_zebra.c:zapi_rule_notify_owner2str Unexecuted instantiation: bgpd.c:zapi_rule_notify_owner2str Unexecuted instantiation: bgp_rfapi_cfg.c:zapi_rule_notify_owner2str Unexecuted instantiation: rfapi_import.c:zapi_rule_notify_owner2str Unexecuted instantiation: rfapi.c:zapi_rule_notify_owner2str Unexecuted instantiation: rfapi_ap.c:zapi_rule_notify_owner2str Unexecuted instantiation: rfapi_encap_tlv.c:zapi_rule_notify_owner2str Unexecuted instantiation: rfapi_nve_addr.c:zapi_rule_notify_owner2str Unexecuted instantiation: rfapi_monitor.c:zapi_rule_notify_owner2str Unexecuted instantiation: rfapi_rib.c:zapi_rule_notify_owner2str Unexecuted instantiation: rfapi_vty.c:zapi_rule_notify_owner2str Unexecuted instantiation: vnc_export_bgp.c:zapi_rule_notify_owner2str Unexecuted instantiation: vnc_export_table.c:zapi_rule_notify_owner2str Unexecuted instantiation: vnc_import_bgp.c:zapi_rule_notify_owner2str Unexecuted instantiation: vnc_zebra.c:zapi_rule_notify_owner2str Unexecuted instantiation: bgp_addpath.c:zapi_rule_notify_owner2str Unexecuted instantiation: bgp_advertise.c:zapi_rule_notify_owner2str Unexecuted instantiation: bgp_aspath.c:zapi_rule_notify_owner2str Unexecuted instantiation: bgp_bfd.c:zapi_rule_notify_owner2str Unexecuted instantiation: bgp_conditional_adv.c:zapi_rule_notify_owner2str Unexecuted instantiation: bgp_damp.c:zapi_rule_notify_owner2str Unexecuted instantiation: bgp_encap_tlv.c:zapi_rule_notify_owner2str Unexecuted instantiation: bgp_flowspec.c:zapi_rule_notify_owner2str Unexecuted instantiation: bgp_flowspec_util.c:zapi_rule_notify_owner2str Unexecuted instantiation: bgp_label.c:zapi_rule_notify_owner2str Unexecuted instantiation: bgp_open.c:zapi_rule_notify_owner2str Unexecuted instantiation: rfp_example.c:zapi_rule_notify_owner2str Unexecuted instantiation: pim_assert.c:zapi_rule_notify_owner2str Unexecuted instantiation: pim_bfd.c:zapi_rule_notify_owner2str Unexecuted instantiation: pim_bsm.c:zapi_rule_notify_owner2str Unexecuted instantiation: pim_cmd_common.c:zapi_rule_notify_owner2str Unexecuted instantiation: pim_hello.c:zapi_rule_notify_owner2str Unexecuted instantiation: pim_iface.c:zapi_rule_notify_owner2str Unexecuted instantiation: pim_ifchannel.c:zapi_rule_notify_owner2str Unexecuted instantiation: pim_instance.c:zapi_rule_notify_owner2str Unexecuted instantiation: pim_join.c:zapi_rule_notify_owner2str Unexecuted instantiation: pim_jp_agg.c:zapi_rule_notify_owner2str Unexecuted instantiation: pim_macro.c:zapi_rule_notify_owner2str Unexecuted instantiation: pim_mroute.c:zapi_rule_notify_owner2str Unexecuted instantiation: pim_msg.c:zapi_rule_notify_owner2str Unexecuted instantiation: pim_nb_config.c:zapi_rule_notify_owner2str Unexecuted instantiation: pim_neighbor.c:zapi_rule_notify_owner2str Unexecuted instantiation: pim_nht.c:zapi_rule_notify_owner2str Unexecuted instantiation: pim_oil.c:zapi_rule_notify_owner2str Unexecuted instantiation: pim_pim.c:zapi_rule_notify_owner2str Unexecuted instantiation: pim_rp.c:zapi_rule_notify_owner2str Unexecuted instantiation: pim_rpf.c:zapi_rule_notify_owner2str Unexecuted instantiation: pim_sock.c:zapi_rule_notify_owner2str Unexecuted instantiation: pim_ssmpingd.c:zapi_rule_notify_owner2str Unexecuted instantiation: pim_static.c:zapi_rule_notify_owner2str Unexecuted instantiation: pim_tib.c:zapi_rule_notify_owner2str Unexecuted instantiation: pim_tlv.c:zapi_rule_notify_owner2str Unexecuted instantiation: pim_upstream.c:zapi_rule_notify_owner2str Unexecuted instantiation: pim_util.c:zapi_rule_notify_owner2str Unexecuted instantiation: pim_vty.c:zapi_rule_notify_owner2str Unexecuted instantiation: pim_zebra.c:zapi_rule_notify_owner2str Unexecuted instantiation: pim_zlookup.c:zapi_rule_notify_owner2str Unexecuted instantiation: pim_vxlan.c:zapi_rule_notify_owner2str Unexecuted instantiation: pim_register.c:zapi_rule_notify_owner2str Unexecuted instantiation: pimd.c:zapi_rule_notify_owner2str Unexecuted instantiation: pim_cmd.c:zapi_rule_notify_owner2str Unexecuted instantiation: pim_igmp.c:zapi_rule_notify_owner2str Unexecuted instantiation: pim_igmp_mtrace.c:zapi_rule_notify_owner2str Unexecuted instantiation: pim_igmpv2.c:zapi_rule_notify_owner2str Unexecuted instantiation: pim_igmpv3.c:zapi_rule_notify_owner2str Unexecuted instantiation: pim_main.c:zapi_rule_notify_owner2str Unexecuted instantiation: pim_mlag.c:zapi_rule_notify_owner2str Unexecuted instantiation: pim_msdp.c:zapi_rule_notify_owner2str Unexecuted instantiation: pim_zpthread.c:zapi_rule_notify_owner2str |
791 | | |
792 | | /* Zebra MAC types */ |
793 | | #define ZEBRA_MACIP_TYPE_STICKY 0x01 /* Sticky MAC*/ |
794 | | #define ZEBRA_MACIP_TYPE_GW 0x02 /* gateway (SVI) mac*/ |
795 | | #define ZEBRA_MACIP_TYPE_ROUTER_FLAG 0x04 /* Router Flag - proxy NA */ |
796 | | #define ZEBRA_MACIP_TYPE_OVERRIDE_FLAG 0x08 /* Override Flag */ |
797 | | #define ZEBRA_MACIP_TYPE_SVI_IP 0x10 /* SVI MAC-IP */ |
798 | | #define ZEBRA_MACIP_TYPE_PROXY_ADVERT 0x20 /* Not locally active */ |
799 | 0 | #define ZEBRA_MACIP_TYPE_SYNC_PATH 0x40 /* sync path */ |
800 | | /* XXX - flags is an u8; that needs to be changed to u32 if you need |
801 | | * to allocate past 0x80. Additionally touch zclient_evpn_dump_macip_flags |
802 | | */ |
803 | | #define MACIP_BUF_SIZE 128 |
804 | | extern char *zclient_evpn_dump_macip_flags(uint8_t flags, char *buf, |
805 | | size_t len); |
806 | | |
807 | | /* Zebra ES VTEP flags (ZEBRA_REMOTE_ES_VTEP_ADD) */ |
808 | | /* ESR has been rxed from the VTEP. Only VTEPs that have advertised the |
809 | | * Type-4 route can participate in DF election. |
810 | | */ |
811 | 0 | #define ZAPI_ES_VTEP_FLAG_ESR_RXED (1 << 0) |
812 | | |
813 | | enum zebra_neigh_state { ZEBRA_NEIGH_INACTIVE = 0, ZEBRA_NEIGH_ACTIVE = 1 }; |
814 | | |
815 | | struct zclient_options { |
816 | | bool receive_notify; |
817 | | bool synchronous; |
818 | | }; |
819 | | |
820 | | extern struct zclient_options zclient_options_default; |
821 | | |
822 | | /* link layer representation for GRE like interfaces |
823 | | * ip_in is the underlay IP, ip_out is the tunnel dest |
824 | | * index stands for the index of the interface |
825 | | * ndm state stands for the NDM value in netlink |
826 | | * (see linux/neighbour.h) |
827 | | */ |
828 | | #define ZEBRA_NEIGH_STATE_INCOMPLETE (0x01) |
829 | 0 | #define ZEBRA_NEIGH_STATE_REACHABLE (0x02) |
830 | | #define ZEBRA_NEIGH_STATE_STALE (0x04) |
831 | | #define ZEBRA_NEIGH_STATE_DELAY (0x08) |
832 | | #define ZEBRA_NEIGH_STATE_PROBE (0x10) |
833 | 0 | #define ZEBRA_NEIGH_STATE_FAILED (0x20) |
834 | | #define ZEBRA_NEIGH_STATE_NOARP (0x40) |
835 | | #define ZEBRA_NEIGH_STATE_PERMANENT (0x80) |
836 | | #define ZEBRA_NEIGH_STATE_NONE (0x00) |
837 | | |
838 | | struct zapi_neigh_ip { |
839 | | int cmd; |
840 | | struct ipaddr ip_in; |
841 | | struct ipaddr ip_out; |
842 | | ifindex_t index; |
843 | | uint32_t ndm_state; |
844 | | }; |
845 | | int zclient_neigh_ip_decode(struct stream *s, struct zapi_neigh_ip *api); |
846 | | int zclient_neigh_ip_encode(struct stream *s, uint16_t cmd, union sockunion *in, |
847 | | union sockunion *out, struct interface *ifp, |
848 | | int ndm_state); |
849 | | |
850 | | /* |
851 | | * We reserve the top 4 bits for l2-NHG, everything else |
852 | | * is for zebra/proto l3-NHG. |
853 | | * |
854 | | * Each client is going to get it's own nexthop group space |
855 | | * and we'll separate them, we'll figure out where to start based upon |
856 | | * the route_types.h |
857 | | */ |
858 | | #define ZEBRA_NHG_PROTO_UPPER \ |
859 | 0 | ((uint32_t)250000000) /* Bottom 28 bits then rounded down */ |
860 | 0 | #define ZEBRA_NHG_PROTO_SPACING (ZEBRA_NHG_PROTO_UPPER / ZEBRA_ROUTE_MAX) |
861 | | #define ZEBRA_NHG_PROTO_LOWER \ |
862 | 0 | (ZEBRA_NHG_PROTO_SPACING * (ZEBRA_ROUTE_CONNECT + 1)) |
863 | | |
864 | | extern uint32_t zclient_get_nhg_start(uint32_t proto); |
865 | | |
866 | | extern struct zclient *zclient_new(struct event_loop *m, |
867 | | struct zclient_options *opt, |
868 | | zclient_handler *const *handlers, |
869 | | size_t n_handlers); |
870 | | |
871 | | extern void zclient_init(struct zclient *, int, unsigned short, |
872 | | struct zebra_privs_t *privs); |
873 | | extern int zclient_start(struct zclient *); |
874 | | extern void zclient_stop(struct zclient *); |
875 | | extern void zclient_reset(struct zclient *); |
876 | | extern void zclient_free(struct zclient *); |
877 | | |
878 | | extern int zclient_socket_connect(struct zclient *); |
879 | | |
880 | | extern unsigned short *redist_check_instance(struct redist_proto *, |
881 | | unsigned short); |
882 | | extern void redist_add_instance(struct redist_proto *, unsigned short); |
883 | | extern void redist_del_instance(struct redist_proto *, unsigned short); |
884 | | extern void redist_del_all_instances(struct redist_proto *red); |
885 | | |
886 | | /* |
887 | | * Send to zebra that the specified vrf is using label to resolve |
888 | | * itself for L3VPN's. Repeated calls of this function with |
889 | | * different labels will cause an effective update of the |
890 | | * label for lookup. If you pass in MPLS_LABEL_NONE |
891 | | * we will cause a delete action and remove this label pop |
892 | | * operation. |
893 | | * |
894 | | * The underlying AF_MPLS doesn't care about afi's |
895 | | * but we can make the zebra_vrf keep track of what |
896 | | * we have installed and play some special games |
897 | | * to get them both installed. |
898 | | */ |
899 | | extern enum zclient_send_status |
900 | | zclient_send_vrf_label(struct zclient *zclient, vrf_id_t vrf_id, afi_t afi, |
901 | | mpls_label_t label, enum lsp_types_t ltype); |
902 | | |
903 | | extern enum zclient_send_status |
904 | | zclient_send_localsid(struct zclient *zclient, const struct in6_addr *sid, |
905 | | vrf_id_t vrf_id, enum seg6local_action_t action, |
906 | | const struct seg6local_context *context); |
907 | | |
908 | | extern void zclient_send_reg_requests(struct zclient *, vrf_id_t); |
909 | | extern void zclient_send_dereg_requests(struct zclient *, vrf_id_t); |
910 | | extern enum zclient_send_status |
911 | | zclient_send_router_id_update(struct zclient *zclient, |
912 | | zebra_message_types_t type, afi_t afi, |
913 | | vrf_id_t vrf_id); |
914 | | |
915 | | extern enum zclient_send_status |
916 | | zclient_send_interface_radv_req(struct zclient *zclient, vrf_id_t vrf_id, |
917 | | struct interface *ifp, int enable, |
918 | | uint32_t ra_interval); |
919 | | extern enum zclient_send_status |
920 | | zclient_send_interface_protodown(struct zclient *zclient, vrf_id_t vrf_id, |
921 | | struct interface *ifp, bool down); |
922 | | |
923 | | /* Send redistribute command to zebra daemon. Do not update zclient state. */ |
924 | | extern enum zclient_send_status |
925 | | zebra_redistribute_send(int command, struct zclient *, afi_t, int type, |
926 | | unsigned short instance, vrf_id_t vrf_id); |
927 | | |
928 | | extern enum zclient_send_status |
929 | | zebra_redistribute_default_send(int command, struct zclient *zclient, afi_t afi, |
930 | | vrf_id_t vrf_id); |
931 | | |
932 | | /* Send route notify request to zebra */ |
933 | | extern int zebra_route_notify_send(int command, struct zclient *zclient, |
934 | | bool set); |
935 | | |
936 | | /* If state has changed, update state and call zebra_redistribute_send. */ |
937 | | extern void zclient_redistribute(int command, struct zclient *, afi_t, int type, |
938 | | unsigned short instance, vrf_id_t vrf_id); |
939 | | |
940 | | /* If state has changed, update state and send the command to zebra. */ |
941 | | extern void zclient_redistribute_default(int command, struct zclient *, |
942 | | afi_t, vrf_id_t vrf_id); |
943 | | |
944 | | /* |
945 | | * Send the message in zclient->obuf to the zebra daemon (or enqueue it). |
946 | | * Returns: |
947 | | * -1 on a I/O error |
948 | | * 0 data was successfully sent |
949 | | * 1 data was buffered for future usage |
950 | | */ |
951 | | extern enum zclient_send_status zclient_send_message(struct zclient *); |
952 | | |
953 | | /* create header for command, length to be filled in by user later */ |
954 | | extern void zclient_create_header(struct stream *, uint16_t, vrf_id_t); |
955 | | /* |
956 | | * Read sizeof(struct zmsghdr) bytes from the provided socket and parse the |
957 | | * received data into the specified fields. If this is successful, read the |
958 | | * rest of the packet into the provided stream. |
959 | | * |
960 | | * s |
961 | | * The stream to read into |
962 | | * |
963 | | * sock |
964 | | * The socket to read from |
965 | | * |
966 | | * size |
967 | | * Parsed message size will be placed in the pointed-at integer |
968 | | * |
969 | | * marker |
970 | | * Parsed marker will be placed in the pointed-at byte |
971 | | * |
972 | | * version |
973 | | * Parsed version will be placed in the pointed-at byte |
974 | | * |
975 | | * vrf_id |
976 | | * Parsed VRF ID will be placed in the pointed-at vrf_id_t |
977 | | * |
978 | | * cmd |
979 | | * Parsed command number will be placed in the pointed-at integer |
980 | | * |
981 | | * Returns: |
982 | | * -1 if: |
983 | | * - insufficient data for header was read |
984 | | * - a version mismatch was detected |
985 | | * - a marker mismatch was detected |
986 | | * - header size field specified more data than could be read |
987 | | */ |
988 | | extern int zclient_read_header(struct stream *s, int sock, uint16_t *size, |
989 | | uint8_t *marker, uint8_t *version, |
990 | | vrf_id_t *vrf_id, uint16_t *cmd); |
991 | | /* |
992 | | * Parse header from ZAPI message stream into struct zmsghdr. |
993 | | * This function assumes the stream getp points at the first byte of the header. |
994 | | * If the function is successful then the stream getp will point to the byte |
995 | | * immediately after the last byte of the header. |
996 | | * |
997 | | * zmsg |
998 | | * The stream containing the header |
999 | | * |
1000 | | * hdr |
1001 | | * The header struct to parse into. |
1002 | | * |
1003 | | * Returns: |
1004 | | * true if parsing succeeded, false otherwise |
1005 | | */ |
1006 | | extern bool zapi_parse_header(struct stream *zmsg, struct zmsghdr *hdr); |
1007 | | |
1008 | | extern enum zclient_send_status |
1009 | | zclient_interface_set_master(struct zclient *client, struct interface *master, |
1010 | | struct interface *slave); |
1011 | | extern struct interface *zebra_interface_state_read(struct stream *s, vrf_id_t); |
1012 | | extern struct connected *zebra_interface_address_read(int, struct stream *, |
1013 | | vrf_id_t); |
1014 | | extern struct nbr_connected * |
1015 | | zebra_interface_nbr_address_read(int, struct stream *, vrf_id_t); |
1016 | | extern struct interface *zebra_interface_vrf_update_read(struct stream *s, |
1017 | | vrf_id_t vrf_id, |
1018 | | vrf_id_t *new_vrf_id); |
1019 | | extern int zebra_router_id_update_read(struct stream *s, struct prefix *rid); |
1020 | | |
1021 | | extern struct interface *zebra_interface_link_params_read(struct stream *s, |
1022 | | vrf_id_t vrf_id, |
1023 | | bool *changed); |
1024 | | extern size_t zebra_interface_link_params_write(struct stream *, |
1025 | | struct interface *); |
1026 | | extern enum zclient_send_status |
1027 | | zclient_send_get_label_chunk(struct zclient *zclient, uint8_t keep, |
1028 | | uint32_t chunk_size, uint32_t base); |
1029 | | |
1030 | | extern int lm_label_manager_connect(struct zclient *zclient, int async); |
1031 | | extern int lm_get_label_chunk(struct zclient *zclient, uint8_t keep, |
1032 | | uint32_t base, uint32_t chunk_size, |
1033 | | uint32_t *start, uint32_t *end); |
1034 | | extern int lm_release_label_chunk(struct zclient *zclient, uint32_t start, |
1035 | | uint32_t end); |
1036 | | extern int tm_table_manager_connect(struct zclient *zclient); |
1037 | | extern int tm_get_table_chunk(struct zclient *zclient, uint32_t chunk_size, |
1038 | | uint32_t *start, uint32_t *end); |
1039 | | extern int tm_release_table_chunk(struct zclient *zclient, uint32_t start, |
1040 | | uint32_t end); |
1041 | | extern int srv6_manager_get_locator_chunk(struct zclient *zclient, |
1042 | | const char *locator_name); |
1043 | | extern int srv6_manager_release_locator_chunk(struct zclient *zclient, |
1044 | | const char *locator_name); |
1045 | | |
1046 | | extern enum zclient_send_status zebra_send_sr_policy(struct zclient *zclient, |
1047 | | int cmd, |
1048 | | struct zapi_sr_policy *zp); |
1049 | | extern int zapi_sr_policy_encode(struct stream *s, int cmd, |
1050 | | struct zapi_sr_policy *zp); |
1051 | | extern int zapi_sr_policy_decode(struct stream *s, struct zapi_sr_policy *zp); |
1052 | | extern int zapi_sr_policy_notify_status_decode(struct stream *s, |
1053 | | struct zapi_sr_policy *zp); |
1054 | | |
1055 | | extern enum zclient_send_status zebra_send_mpls_labels(struct zclient *zclient, |
1056 | | int cmd, |
1057 | | struct zapi_labels *zl); |
1058 | | extern int zapi_labels_encode(struct stream *s, int cmd, |
1059 | | struct zapi_labels *zl); |
1060 | | extern int zapi_labels_decode(struct stream *s, struct zapi_labels *zl); |
1061 | | |
1062 | | extern int zapi_srv6_locator_encode(struct stream *s, |
1063 | | const struct srv6_locator *l); |
1064 | | extern int zapi_srv6_locator_decode(struct stream *s, struct srv6_locator *l); |
1065 | | extern int zapi_srv6_locator_chunk_encode(struct stream *s, |
1066 | | const struct srv6_locator_chunk *c); |
1067 | | extern int zapi_srv6_locator_chunk_decode(struct stream *s, |
1068 | | struct srv6_locator_chunk *c); |
1069 | | |
1070 | | extern enum zclient_send_status zebra_send_pw(struct zclient *zclient, |
1071 | | int command, struct zapi_pw *pw); |
1072 | | extern int zebra_read_pw_status_update(ZAPI_CALLBACK_ARGS, |
1073 | | struct zapi_pw_status *pw); |
1074 | | |
1075 | | extern enum zclient_send_status zclient_route_send(uint8_t, struct zclient *, |
1076 | | struct zapi_route *); |
1077 | | extern enum zclient_send_status |
1078 | | zclient_send_rnh(struct zclient *zclient, int command, const struct prefix *p, |
1079 | | safi_t safi, bool connected, bool resolve_via_default, |
1080 | | vrf_id_t vrf_id); |
1081 | | int zapi_nexthop_encode(struct stream *s, const struct zapi_nexthop *api_nh, |
1082 | | uint32_t api_flags, uint32_t api_message); |
1083 | | extern int zapi_route_encode(uint8_t, struct stream *, struct zapi_route *); |
1084 | | extern int zapi_route_decode(struct stream *s, struct zapi_route *api); |
1085 | | extern int zapi_nexthop_decode(struct stream *s, struct zapi_nexthop *api_nh, |
1086 | | uint32_t api_flags, uint32_t api_message); |
1087 | | bool zapi_nhg_notify_decode(struct stream *s, uint32_t *id, |
1088 | | enum zapi_nhg_notify_owner *note); |
1089 | | bool zapi_route_notify_decode(struct stream *s, struct prefix *p, |
1090 | | uint32_t *tableid, |
1091 | | enum zapi_route_notify_owner *note, |
1092 | | afi_t *afi, safi_t *safi); |
1093 | | bool zapi_rule_notify_decode(struct stream *s, uint32_t *seqno, |
1094 | | uint32_t *priority, uint32_t *unique, char *ifname, |
1095 | | enum zapi_rule_notify_owner *note); |
1096 | | bool zapi_ipset_notify_decode(struct stream *s, |
1097 | | uint32_t *unique, |
1098 | | enum zapi_ipset_notify_owner *note); |
1099 | | |
1100 | | /* Nexthop-group message apis */ |
1101 | | extern enum zclient_send_status |
1102 | | zclient_nhg_send(struct zclient *zclient, int cmd, struct zapi_nhg *api_nhg); |
1103 | | |
1104 | 0 | #define ZEBRA_IPSET_NAME_SIZE 32 |
1105 | | |
1106 | | bool zapi_ipset_entry_notify_decode(struct stream *s, |
1107 | | uint32_t *unique, |
1108 | | char *ipset_name, |
1109 | | enum zapi_ipset_entry_notify_owner *note); |
1110 | | bool zapi_iptable_notify_decode(struct stream *s, |
1111 | | uint32_t *unique, |
1112 | | enum zapi_iptable_notify_owner *note); |
1113 | | |
1114 | | extern struct nexthop * |
1115 | | nexthop_from_zapi_nexthop(const struct zapi_nexthop *znh); |
1116 | | int zapi_nexthop_from_nexthop(struct zapi_nexthop *znh, |
1117 | | const struct nexthop *nh); |
1118 | | int zapi_backup_nexthop_from_nexthop(struct zapi_nexthop *znh, |
1119 | | const struct nexthop *nh); |
1120 | | /* |
1121 | | * match -> is the prefix that the calling daemon asked to be matched |
1122 | | * against. |
1123 | | * nhr->prefix -> is the actual prefix that was matched against in the |
1124 | | * rib itself. |
1125 | | * |
1126 | | * This distinction is made because a LPM can be made if there is a |
1127 | | * covering route. This way the upper level protocol can make a decision |
1128 | | * point about whether or not it wants to use the match or not. |
1129 | | */ |
1130 | | extern bool zapi_nexthop_update_decode(struct stream *s, struct prefix *match, |
1131 | | struct zapi_route *nhr); |
1132 | | const char *zapi_nexthop2str(const struct zapi_nexthop *znh, char *buf, |
1133 | | int bufsize); |
1134 | | |
1135 | | /* Decode the zebra error message */ |
1136 | | extern bool zapi_error_decode(struct stream *s, enum zebra_error_types *error); |
1137 | | |
1138 | | /* Encode and decode restart capabilities */ |
1139 | | extern enum zclient_send_status |
1140 | | zclient_capabilities_send(uint32_t cmd, struct zclient *zclient, |
1141 | | struct zapi_cap *api); |
1142 | | extern int32_t zapi_capabilities_decode(struct stream *s, struct zapi_cap *api); |
1143 | | |
1144 | | static inline void zapi_route_set_blackhole(struct zapi_route *api, |
1145 | | enum blackhole_type bh_type) |
1146 | 0 | { |
1147 | 0 | api->nexthop_num = 1; |
1148 | 0 | api->nexthops[0].type = NEXTHOP_TYPE_BLACKHOLE; |
1149 | 0 | api->nexthops[0].vrf_id = VRF_DEFAULT; |
1150 | 0 | api->nexthops[0].bh_type = bh_type; |
1151 | 0 | SET_FLAG(api->message, ZAPI_MESSAGE_NEXTHOP); |
1152 | 0 | }; Unexecuted instantiation: ospf_main.c:zapi_route_set_blackhole Unexecuted instantiation: ospf_bfd.c:zapi_route_set_blackhole Unexecuted instantiation: ospf_dump.c:zapi_route_set_blackhole Unexecuted instantiation: ospf_interface.c:zapi_route_set_blackhole Unexecuted instantiation: ospf_lsa.c:zapi_route_set_blackhole Unexecuted instantiation: ospf_neighbor.c:zapi_route_set_blackhole Unexecuted instantiation: ospf_network.c:zapi_route_set_blackhole Unexecuted instantiation: ospf_nsm.c:zapi_route_set_blackhole Unexecuted instantiation: ospf_opaque.c:zapi_route_set_blackhole Unexecuted instantiation: ospf_packet.c:zapi_route_set_blackhole Unexecuted instantiation: ospf_ri.c:zapi_route_set_blackhole Unexecuted instantiation: ospf_routemap.c:zapi_route_set_blackhole Unexecuted instantiation: ospf_spf.c:zapi_route_set_blackhole Unexecuted instantiation: ospf_sr.c:zapi_route_set_blackhole Unexecuted instantiation: ospf_te.c:zapi_route_set_blackhole Unexecuted instantiation: ospf_vty.c:zapi_route_set_blackhole Unexecuted instantiation: ospf_zebra.c:zapi_route_set_blackhole Unexecuted instantiation: ospfd.c:zapi_route_set_blackhole Unexecuted instantiation: ospf_gr_helper.c:zapi_route_set_blackhole Unexecuted instantiation: ospf_abr.c:zapi_route_set_blackhole Unexecuted instantiation: ospf_apiserver.c:zapi_route_set_blackhole Unexecuted instantiation: ospf_asbr.c:zapi_route_set_blackhole Unexecuted instantiation: ospf_ase.c:zapi_route_set_blackhole Unexecuted instantiation: ospf_ext.c:zapi_route_set_blackhole Unexecuted instantiation: ospf_flood.c:zapi_route_set_blackhole Unexecuted instantiation: ospf_gr.c:zapi_route_set_blackhole Unexecuted instantiation: ospf_ia.c:zapi_route_set_blackhole Unexecuted instantiation: ospf_ism.c:zapi_route_set_blackhole Unexecuted instantiation: ospf_ldp_sync.c:zapi_route_set_blackhole Unexecuted instantiation: ospf_route.c:zapi_route_set_blackhole Unexecuted instantiation: ospf_api.c:zapi_route_set_blackhole Unexecuted instantiation: bfd.c:zapi_route_set_blackhole Unexecuted instantiation: ldp_sync.c:zapi_route_set_blackhole Unexecuted instantiation: libfrr.c:zapi_route_set_blackhole Unexecuted instantiation: link_state.c:zapi_route_set_blackhole Unexecuted instantiation: log.c:zapi_route_set_blackhole Unexecuted instantiation: zclient.c:zapi_route_set_blackhole Unexecuted instantiation: connected.c:zapi_route_set_blackhole Unexecuted instantiation: if_netlink.c:zapi_route_set_blackhole Unexecuted instantiation: interface.c:zapi_route_set_blackhole Unexecuted instantiation: ioctl.c:zapi_route_set_blackhole Unexecuted instantiation: kernel_netlink.c:zapi_route_set_blackhole Unexecuted instantiation: label_manager.c:zapi_route_set_blackhole Unexecuted instantiation: main.c:zapi_route_set_blackhole Unexecuted instantiation: netconf_netlink.c:zapi_route_set_blackhole Unexecuted instantiation: redistribute.c:zapi_route_set_blackhole Unexecuted instantiation: router-id.c:zapi_route_set_blackhole Unexecuted instantiation: rt_netlink.c:zapi_route_set_blackhole Unexecuted instantiation: rtadv.c:zapi_route_set_blackhole Unexecuted instantiation: rtread_netlink.c:zapi_route_set_blackhole Unexecuted instantiation: rule_netlink.c:zapi_route_set_blackhole Unexecuted instantiation: table_manager.c:zapi_route_set_blackhole Unexecuted instantiation: tc_netlink.c:zapi_route_set_blackhole Unexecuted instantiation: zapi_msg.c:zapi_route_set_blackhole Unexecuted instantiation: zebra_affinitymap.c:zapi_route_set_blackhole Unexecuted instantiation: zebra_dplane.c:zapi_route_set_blackhole Unexecuted instantiation: zebra_gr.c:zapi_route_set_blackhole Unexecuted instantiation: zebra_l2.c:zapi_route_set_blackhole Unexecuted instantiation: zebra_l2_bridge_if.c:zapi_route_set_blackhole Unexecuted instantiation: zebra_evpn.c:zapi_route_set_blackhole Unexecuted instantiation: zebra_evpn_mac.c:zapi_route_set_blackhole Unexecuted instantiation: zebra_evpn_neigh.c:zapi_route_set_blackhole Unexecuted instantiation: zebra_mlag.c:zapi_route_set_blackhole Unexecuted instantiation: zebra_mlag_vty.c:zapi_route_set_blackhole Unexecuted instantiation: zebra_mpls.c:zapi_route_set_blackhole Unexecuted instantiation: zebra_mpls_netlink.c:zapi_route_set_blackhole Unexecuted instantiation: zebra_mpls_null.c:zapi_route_set_blackhole Unexecuted instantiation: zebra_mpls_vty.c:zapi_route_set_blackhole Unexecuted instantiation: zebra_srv6.c:zapi_route_set_blackhole Unexecuted instantiation: zebra_srv6_vty.c:zapi_route_set_blackhole Unexecuted instantiation: zebra_mroute.c:zapi_route_set_blackhole Unexecuted instantiation: zebra_nb.c:zapi_route_set_blackhole Unexecuted instantiation: zebra_nb_config.c:zapi_route_set_blackhole Unexecuted instantiation: zebra_nb_rpcs.c:zapi_route_set_blackhole Unexecuted instantiation: zebra_nb_state.c:zapi_route_set_blackhole Unexecuted instantiation: zebra_netns_id.c:zapi_route_set_blackhole Unexecuted instantiation: zebra_netns_notify.c:zapi_route_set_blackhole Unexecuted instantiation: zebra_nhg.c:zapi_route_set_blackhole Unexecuted instantiation: zebra_ns.c:zapi_route_set_blackhole Unexecuted instantiation: zebra_opaque.c:zapi_route_set_blackhole Unexecuted instantiation: zebra_pbr.c:zapi_route_set_blackhole Unexecuted instantiation: zebra_ptm.c:zapi_route_set_blackhole Unexecuted instantiation: zebra_ptm_redistribute.c:zapi_route_set_blackhole Unexecuted instantiation: zebra_pw.c:zapi_route_set_blackhole Unexecuted instantiation: zebra_rib.c:zapi_route_set_blackhole Unexecuted instantiation: zebra_router.c:zapi_route_set_blackhole Unexecuted instantiation: zebra_rnh.c:zapi_route_set_blackhole Unexecuted instantiation: zebra_routemap.c:zapi_route_set_blackhole Unexecuted instantiation: zebra_script.c:zapi_route_set_blackhole Unexecuted instantiation: zebra_srte.c:zapi_route_set_blackhole Unexecuted instantiation: zebra_tc.c:zapi_route_set_blackhole Unexecuted instantiation: zebra_vrf.c:zapi_route_set_blackhole Unexecuted instantiation: zebra_vty.c:zapi_route_set_blackhole Unexecuted instantiation: zebra_vxlan.c:zapi_route_set_blackhole Unexecuted instantiation: zebra_vxlan_if.c:zapi_route_set_blackhole Unexecuted instantiation: zebra_evpn_mh.c:zapi_route_set_blackhole Unexecuted instantiation: zebra_neigh.c:zapi_route_set_blackhole Unexecuted instantiation: zserv.c:zapi_route_set_blackhole Unexecuted instantiation: debug_nl.c:zapi_route_set_blackhole Unexecuted instantiation: bgp_main.c:zapi_route_set_blackhole Unexecuted instantiation: bgp_attr.c:zapi_route_set_blackhole Unexecuted instantiation: bgp_attr_evpn.c:zapi_route_set_blackhole Unexecuted instantiation: bgp_clist.c:zapi_route_set_blackhole Unexecuted instantiation: bgp_community.c:zapi_route_set_blackhole Unexecuted instantiation: bgp_community_alias.c:zapi_route_set_blackhole Unexecuted instantiation: bgp_debug.c:zapi_route_set_blackhole Unexecuted instantiation: bgp_dump.c:zapi_route_set_blackhole Unexecuted instantiation: bgp_ecommunity.c:zapi_route_set_blackhole Unexecuted instantiation: bgp_evpn.c:zapi_route_set_blackhole Unexecuted instantiation: bgp_evpn_mh.c:zapi_route_set_blackhole Unexecuted instantiation: bgp_evpn_vty.c:zapi_route_set_blackhole Unexecuted instantiation: bgp_filter.c:zapi_route_set_blackhole Unexecuted instantiation: bgp_flowspec_vty.c:zapi_route_set_blackhole Unexecuted instantiation: bgp_fsm.c:zapi_route_set_blackhole Unexecuted instantiation: bgp_io.c:zapi_route_set_blackhole Unexecuted instantiation: bgp_keepalives.c:zapi_route_set_blackhole Unexecuted instantiation: bgp_labelpool.c:zapi_route_set_blackhole Unexecuted instantiation: bgp_lcommunity.c:zapi_route_set_blackhole Unexecuted instantiation: bgp_mac.c:zapi_route_set_blackhole Unexecuted instantiation: bgp_mpath.c:zapi_route_set_blackhole Unexecuted instantiation: bgp_mplsvpn.c:zapi_route_set_blackhole Unexecuted instantiation: bgp_network.c:zapi_route_set_blackhole Unexecuted instantiation: bgp_nexthop.c:zapi_route_set_blackhole Unexecuted instantiation: bgp_nht.c:zapi_route_set_blackhole Unexecuted instantiation: bgp_packet.c:zapi_route_set_blackhole Unexecuted instantiation: bgp_pbr.c:zapi_route_set_blackhole Unexecuted instantiation: bgp_rd.c:zapi_route_set_blackhole Unexecuted instantiation: bgp_regex.c:zapi_route_set_blackhole Unexecuted instantiation: bgp_route.c:zapi_route_set_blackhole Unexecuted instantiation: bgp_routemap.c:zapi_route_set_blackhole Unexecuted instantiation: bgp_routemap_nb.c:zapi_route_set_blackhole Unexecuted instantiation: bgp_routemap_nb_config.c:zapi_route_set_blackhole Unexecuted instantiation: bgp_table.c:zapi_route_set_blackhole Unexecuted instantiation: bgp_updgrp.c:zapi_route_set_blackhole Unexecuted instantiation: bgp_updgrp_adv.c:zapi_route_set_blackhole Unexecuted instantiation: bgp_updgrp_packet.c:zapi_route_set_blackhole Unexecuted instantiation: bgp_vpn.c:zapi_route_set_blackhole Unexecuted instantiation: bgp_vty.c:zapi_route_set_blackhole Unexecuted instantiation: bgp_zebra.c:zapi_route_set_blackhole Unexecuted instantiation: bgpd.c:zapi_route_set_blackhole Unexecuted instantiation: bgp_rfapi_cfg.c:zapi_route_set_blackhole Unexecuted instantiation: rfapi_import.c:zapi_route_set_blackhole Unexecuted instantiation: rfapi.c:zapi_route_set_blackhole Unexecuted instantiation: rfapi_ap.c:zapi_route_set_blackhole Unexecuted instantiation: rfapi_encap_tlv.c:zapi_route_set_blackhole Unexecuted instantiation: rfapi_nve_addr.c:zapi_route_set_blackhole Unexecuted instantiation: rfapi_monitor.c:zapi_route_set_blackhole Unexecuted instantiation: rfapi_rib.c:zapi_route_set_blackhole Unexecuted instantiation: rfapi_vty.c:zapi_route_set_blackhole Unexecuted instantiation: vnc_export_bgp.c:zapi_route_set_blackhole Unexecuted instantiation: vnc_export_table.c:zapi_route_set_blackhole Unexecuted instantiation: vnc_import_bgp.c:zapi_route_set_blackhole Unexecuted instantiation: vnc_zebra.c:zapi_route_set_blackhole Unexecuted instantiation: bgp_addpath.c:zapi_route_set_blackhole Unexecuted instantiation: bgp_advertise.c:zapi_route_set_blackhole Unexecuted instantiation: bgp_aspath.c:zapi_route_set_blackhole Unexecuted instantiation: bgp_bfd.c:zapi_route_set_blackhole Unexecuted instantiation: bgp_conditional_adv.c:zapi_route_set_blackhole Unexecuted instantiation: bgp_damp.c:zapi_route_set_blackhole Unexecuted instantiation: bgp_encap_tlv.c:zapi_route_set_blackhole Unexecuted instantiation: bgp_flowspec.c:zapi_route_set_blackhole Unexecuted instantiation: bgp_flowspec_util.c:zapi_route_set_blackhole Unexecuted instantiation: bgp_label.c:zapi_route_set_blackhole Unexecuted instantiation: bgp_open.c:zapi_route_set_blackhole Unexecuted instantiation: rfp_example.c:zapi_route_set_blackhole Unexecuted instantiation: pim_assert.c:zapi_route_set_blackhole Unexecuted instantiation: pim_bfd.c:zapi_route_set_blackhole Unexecuted instantiation: pim_bsm.c:zapi_route_set_blackhole Unexecuted instantiation: pim_cmd_common.c:zapi_route_set_blackhole Unexecuted instantiation: pim_hello.c:zapi_route_set_blackhole Unexecuted instantiation: pim_iface.c:zapi_route_set_blackhole Unexecuted instantiation: pim_ifchannel.c:zapi_route_set_blackhole Unexecuted instantiation: pim_instance.c:zapi_route_set_blackhole Unexecuted instantiation: pim_join.c:zapi_route_set_blackhole Unexecuted instantiation: pim_jp_agg.c:zapi_route_set_blackhole Unexecuted instantiation: pim_macro.c:zapi_route_set_blackhole Unexecuted instantiation: pim_mroute.c:zapi_route_set_blackhole Unexecuted instantiation: pim_msg.c:zapi_route_set_blackhole Unexecuted instantiation: pim_nb_config.c:zapi_route_set_blackhole Unexecuted instantiation: pim_neighbor.c:zapi_route_set_blackhole Unexecuted instantiation: pim_nht.c:zapi_route_set_blackhole Unexecuted instantiation: pim_oil.c:zapi_route_set_blackhole Unexecuted instantiation: pim_pim.c:zapi_route_set_blackhole Unexecuted instantiation: pim_rp.c:zapi_route_set_blackhole Unexecuted instantiation: pim_rpf.c:zapi_route_set_blackhole Unexecuted instantiation: pim_sock.c:zapi_route_set_blackhole Unexecuted instantiation: pim_ssmpingd.c:zapi_route_set_blackhole Unexecuted instantiation: pim_static.c:zapi_route_set_blackhole Unexecuted instantiation: pim_tib.c:zapi_route_set_blackhole Unexecuted instantiation: pim_tlv.c:zapi_route_set_blackhole Unexecuted instantiation: pim_upstream.c:zapi_route_set_blackhole Unexecuted instantiation: pim_util.c:zapi_route_set_blackhole Unexecuted instantiation: pim_vty.c:zapi_route_set_blackhole Unexecuted instantiation: pim_zebra.c:zapi_route_set_blackhole Unexecuted instantiation: pim_zlookup.c:zapi_route_set_blackhole Unexecuted instantiation: pim_vxlan.c:zapi_route_set_blackhole Unexecuted instantiation: pim_register.c:zapi_route_set_blackhole Unexecuted instantiation: pimd.c:zapi_route_set_blackhole Unexecuted instantiation: pim_cmd.c:zapi_route_set_blackhole Unexecuted instantiation: pim_igmp.c:zapi_route_set_blackhole Unexecuted instantiation: pim_igmp_mtrace.c:zapi_route_set_blackhole Unexecuted instantiation: pim_igmpv2.c:zapi_route_set_blackhole Unexecuted instantiation: pim_igmpv3.c:zapi_route_set_blackhole Unexecuted instantiation: pim_main.c:zapi_route_set_blackhole Unexecuted instantiation: pim_mlag.c:zapi_route_set_blackhole Unexecuted instantiation: pim_msdp.c:zapi_route_set_blackhole Unexecuted instantiation: pim_zpthread.c:zapi_route_set_blackhole |
1153 | | |
1154 | | extern enum zclient_send_status |
1155 | | zclient_send_mlag_register(struct zclient *client, uint32_t bit_map); |
1156 | | extern enum zclient_send_status |
1157 | | zclient_send_mlag_deregister(struct zclient *client); |
1158 | | |
1159 | | extern enum zclient_send_status zclient_send_mlag_data(struct zclient *client, |
1160 | | struct stream *client_s); |
1161 | | |
1162 | | /* |
1163 | | * Send an OPAQUE message, contents opaque to zebra - but note that |
1164 | | * the length of the payload is restricted by the zclient's |
1165 | | * outgoing message buffer. |
1166 | | * The message header is a message subtype; please use the registry |
1167 | | * below to avoid sub-type collisions. Clients use the registration |
1168 | | * apis to manage the specific opaque subtypes they want to receive. |
1169 | | */ |
1170 | | enum zclient_send_status zclient_send_opaque(struct zclient *zclient, |
1171 | | uint32_t type, const uint8_t *data, |
1172 | | size_t datasize); |
1173 | | |
1174 | | enum zclient_send_status |
1175 | | zclient_send_opaque_unicast(struct zclient *zclient, uint32_t type, |
1176 | | uint8_t proto, uint16_t instance, |
1177 | | uint32_t session_id, const uint8_t *data, |
1178 | | size_t datasize); |
1179 | | |
1180 | | /* Struct representing the decoded opaque header info */ |
1181 | | struct zapi_opaque_msg { |
1182 | | uint32_t type; /* Subtype */ |
1183 | | uint16_t len; /* len after zapi header and this info */ |
1184 | | uint16_t flags; |
1185 | | |
1186 | | /* Client-specific info - *if* UNICAST flag is set */ |
1187 | | uint8_t proto; |
1188 | | uint16_t instance; |
1189 | | uint32_t session_id; |
1190 | | }; |
1191 | | |
1192 | | #define ZAPI_OPAQUE_FLAG_UNICAST 0x01 |
1193 | | |
1194 | | /* Simple struct to convey registration/unreg requests */ |
1195 | | struct zapi_opaque_reg_info { |
1196 | | /* Message subtype */ |
1197 | | uint32_t type; |
1198 | | |
1199 | | /* Client session tuple */ |
1200 | | uint8_t proto; |
1201 | | uint16_t instance; |
1202 | | uint32_t session_id; |
1203 | | }; |
1204 | | |
1205 | | /* Decode incoming opaque */ |
1206 | | int zclient_opaque_decode(struct stream *msg, struct zapi_opaque_msg *info); |
1207 | | |
1208 | | enum zclient_send_status zclient_register_opaque(struct zclient *zclient, |
1209 | | uint32_t type); |
1210 | | enum zclient_send_status zclient_unregister_opaque(struct zclient *zclient, |
1211 | | uint32_t type); |
1212 | | int zapi_opaque_reg_decode(struct stream *msg, |
1213 | | struct zapi_opaque_reg_info *info); |
1214 | | |
1215 | | /* |
1216 | | * Registry of opaque message types. Please do not reuse an in-use |
1217 | | * type code; some daemons are likely relying on it. |
1218 | | */ |
1219 | | enum zapi_opaque_registry { |
1220 | | /* Request link-state database dump, at restart for example */ |
1221 | | LINK_STATE_SYNC = 1, |
1222 | | /* Update containing link-state db info */ |
1223 | | LINK_STATE_UPDATE = 2, |
1224 | | /* Request LDP-SYNC state from LDP */ |
1225 | | LDP_IGP_SYNC_IF_STATE_REQUEST = 3, |
1226 | | /* Update containing LDP IGP Sync State info */ |
1227 | | LDP_IGP_SYNC_IF_STATE_UPDATE = 4, |
1228 | | /* Announce that LDP is up */ |
1229 | | LDP_IGP_SYNC_ANNOUNCE_UPDATE = 5, |
1230 | | /* Register RLFA with LDP */ |
1231 | | LDP_RLFA_REGISTER = 7, |
1232 | | /* Unregister all RLFAs with LDP */ |
1233 | | LDP_RLFA_UNREGISTER_ALL = 8, |
1234 | | /* Announce LDP labels associated to a previously registered RLFA */ |
1235 | | LDP_RLFA_LABELS = 9, |
1236 | | }; |
1237 | | |
1238 | | /* Send the hello message. |
1239 | | * Returns 0 for success or -1 on an I/O error. |
1240 | | */ |
1241 | | extern enum zclient_send_status zclient_send_hello(struct zclient *client); |
1242 | | |
1243 | | extern enum zclient_send_status |
1244 | | zclient_send_neigh_discovery_req(struct zclient *zclient, |
1245 | | const struct interface *ifp, |
1246 | | const struct prefix *p); |
1247 | | |
1248 | | struct zapi_client_close_info { |
1249 | | /* Client session tuple */ |
1250 | | uint8_t proto; |
1251 | | uint16_t instance; |
1252 | | uint32_t session_id; |
1253 | | }; |
1254 | | |
1255 | | #ifdef FUZZING |
1256 | | int zclient_read_fuzz(struct zclient *zclient, const uint8_t *data, size_t len); |
1257 | | #endif |
1258 | | |
1259 | | /* Decode incoming client close notify */ |
1260 | | extern int zapi_client_close_notify_decode(struct stream *s, |
1261 | | struct zapi_client_close_info *info); |
1262 | | |
1263 | | extern int zclient_send_zebra_gre_request(struct zclient *client, |
1264 | | struct interface *ifp); |
1265 | | #ifdef __cplusplus |
1266 | | } |
1267 | | #endif |
1268 | | |
1269 | | #endif /* _ZEBRA_ZCLIENT_H */ |