]>
Commit | Line | Data |
---|---|---|
bf094f69 | 1 | /* |
d8647095 | 2 | * Zebra API message creation & consumption. |
bf094f69 QY |
3 | * Portions: |
4 | * Copyright (C) 1997-1999 Kunihiro Ishiguro | |
5 | * Copyright (C) 2015-2018 Cumulus Networks, Inc. | |
6 | * et al. | |
7 | * | |
8 | * This program is free software; you can redistribute it and/or modify it | |
9 | * under the terms of the GNU General Public License as published by the Free | |
10 | * Software Foundation; either version 2 of the License, or (at your option) | |
11 | * any later version. | |
12 | * | |
13 | * This program is distributed in the hope that it will be useful, but WITHOUT | |
14 | * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or | |
15 | * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for | |
16 | * more details. | |
17 | * | |
18 | * You should have received a copy of the GNU General Public License along | |
19 | * with this program; see the file COPYING; if not, write to the Free Software | |
20 | * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA | |
21 | */ | |
22 | ||
23 | #include "lib/if.h" | |
24 | #include "lib/vrf.h" | |
25 | #include "lib/zclient.h" | |
26 | #include "lib/pbr.h" | |
27 | ||
28 | #include "zebra/rib.h" | |
29 | #include "zebra/zserv.h" | |
30 | #include "zebra/zebra_pbr.h" | |
43e52561 | 31 | #include "zebra/zebra_errors.h" |
bf094f69 | 32 | |
51e94aa7 EDP |
33 | #ifdef __cplusplus |
34 | extern "C" { | |
35 | #endif | |
36 | ||
bf094f69 QY |
37 | /* |
38 | * This is called to process inbound ZAPI messages. | |
39 | * | |
40 | * client | |
41 | * the client datastructure | |
42 | * | |
bf094f69 | 43 | * msg |
904e0d88 | 44 | * the message |
bf094f69 | 45 | */ |
904e0d88 | 46 | extern void zserv_handle_commands(struct zserv *client, struct stream *msg); |
bf094f69 | 47 | |
8b1766b1 QY |
48 | extern int zsend_vrf_add(struct zserv *zclient, struct zebra_vrf *zvrf); |
49 | extern int zsend_vrf_delete(struct zserv *zclient, struct zebra_vrf *zvrf); | |
50 | extern int zsend_interface_add(struct zserv *zclient, struct interface *ifp); | |
51 | extern int zsend_interface_delete(struct zserv *zclient, struct interface *ifp); | |
52 | extern int zsend_interface_addresses(struct zserv *zclient, | |
53 | struct interface *ifp); | |
54 | extern int zsend_interface_address(int cmd, struct zserv *zclient, | |
55 | struct interface *ifp, | |
56 | struct connected *ifc); | |
57 | extern void nbr_connected_add_ipv6(struct interface *ifp, | |
58 | struct in6_addr *address); | |
59 | extern void nbr_connected_delete_ipv6(struct interface *ifp, | |
60 | struct in6_addr *address); | |
61 | extern int zsend_interface_update(int cmd, struct zserv *client, | |
62 | struct interface *ifp); | |
63 | extern int zsend_redistribute_route(int cmd, struct zserv *zclient, | |
86391e56 MS |
64 | const struct prefix *p, |
65 | const struct prefix *src_p, | |
8b1766b1 QY |
66 | struct route_entry *re); |
67 | extern int zsend_router_id_update(struct zserv *zclient, struct prefix *p, | |
68 | vrf_id_t vrf_id); | |
69 | extern int zsend_interface_vrf_update(struct zserv *zclient, | |
70 | struct interface *ifp, vrf_id_t vrf_id); | |
71 | extern int zsend_interface_link_params(struct zserv *zclient, | |
72 | struct interface *ifp); | |
73 | extern int zsend_pw_update(struct zserv *client, struct zebra_pw *pw); | |
86391e56 MS |
74 | extern int zsend_route_notify_owner(struct route_entry *re, |
75 | const struct prefix *p, | |
bf094f69 | 76 | enum zapi_route_notify_owner note); |
25779064 | 77 | extern int zsend_route_notify_owner_ctx(const struct zebra_dplane_ctx *ctx, |
7cdb1a84 | 78 | enum zapi_route_notify_owner note); |
bf094f69 QY |
79 | |
80 | extern void zsend_rule_notify_owner(struct zebra_pbr_rule *rule, | |
81 | enum zapi_rule_notify_owner note); | |
82 | extern void zsend_ipset_notify_owner(struct zebra_pbr_ipset *ipset, | |
83 | enum zapi_ipset_notify_owner note); | |
84 | extern void | |
85 | zsend_ipset_entry_notify_owner(struct zebra_pbr_ipset_entry *ipset, | |
86 | enum zapi_ipset_entry_notify_owner note); | |
87 | extern void zsend_iptable_notify_owner(struct zebra_pbr_iptable *iptable, | |
88 | enum zapi_iptable_notify_owner note); | |
8b1766b1 QY |
89 | extern void zserv_nexthop_num_warn(const char *caller, const struct prefix *p, |
90 | const unsigned int nexthop_num); | |
b120fe3b DS |
91 | |
92 | extern void zsend_capabilities_all_clients(void); | |
51e94aa7 EDP |
93 | |
94 | #ifdef __cplusplus | |
95 | } | |
96 | #endif |