2 * Zebra API message creation & consumption.
4 * Copyright (C) 1997-1999 Kunihiro Ishiguro
5 * Copyright (C) 2015-2018 Cumulus Networks, Inc.
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)
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
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
25 #include "lib/zclient.h"
28 #include "zebra/rib.h"
29 #include "zebra/zserv.h"
30 #include "zebra/zebra_pbr.h"
31 #include "zebra/zebra_errors.h"
34 * This is called to process inbound ZAPI messages.
37 * the client datastructure
42 extern void zserv_handle_commands(struct zserv
*client
, struct stream
*msg
);
44 extern int zsend_vrf_add(struct zserv
*zclient
, struct zebra_vrf
*zvrf
);
45 extern int zsend_vrf_delete(struct zserv
*zclient
, struct zebra_vrf
*zvrf
);
46 extern int zsend_interface_add(struct zserv
*zclient
, struct interface
*ifp
);
47 extern int zsend_interface_delete(struct zserv
*zclient
, struct interface
*ifp
);
48 extern int zsend_interface_addresses(struct zserv
*zclient
,
49 struct interface
*ifp
);
50 extern int zsend_interface_address(int cmd
, struct zserv
*zclient
,
51 struct interface
*ifp
,
52 struct connected
*ifc
);
53 extern void nbr_connected_add_ipv6(struct interface
*ifp
,
54 struct in6_addr
*address
);
55 extern void nbr_connected_delete_ipv6(struct interface
*ifp
,
56 struct in6_addr
*address
);
57 extern int zsend_interface_update(int cmd
, struct zserv
*client
,
58 struct interface
*ifp
);
59 extern int zsend_redistribute_route(int cmd
, struct zserv
*zclient
,
60 const struct prefix
*p
,
61 const struct prefix
*src_p
,
62 struct route_entry
*re
);
63 extern int zsend_router_id_update(struct zserv
*zclient
, struct prefix
*p
,
65 extern int zsend_interface_vrf_update(struct zserv
*zclient
,
66 struct interface
*ifp
, vrf_id_t vrf_id
);
67 extern int zsend_interface_link_params(struct zserv
*zclient
,
68 struct interface
*ifp
);
69 extern int zsend_pw_update(struct zserv
*client
, struct zebra_pw
*pw
);
70 extern int zsend_route_notify_owner(struct route_entry
*re
,
71 const struct prefix
*p
,
72 enum zapi_route_notify_owner note
);
74 extern void zsend_rule_notify_owner(struct zebra_pbr_rule
*rule
,
75 enum zapi_rule_notify_owner note
);
76 extern void zsend_ipset_notify_owner(struct zebra_pbr_ipset
*ipset
,
77 enum zapi_ipset_notify_owner note
);
79 zsend_ipset_entry_notify_owner(struct zebra_pbr_ipset_entry
*ipset
,
80 enum zapi_ipset_entry_notify_owner note
);
81 extern void zsend_iptable_notify_owner(struct zebra_pbr_iptable
*iptable
,
82 enum zapi_iptable_notify_owner note
);
83 extern void zserv_nexthop_num_warn(const char *caller
, const struct prefix
*p
,
84 const unsigned int nexthop_num
);