]> git.proxmox.com Git - mirror_frr.git/blame - zebra/zapi_msg.h
Merge pull request #13465 from donaldsharp/ospf_metric_ifindex
[mirror_frr.git] / zebra / zapi_msg.h
CommitLineData
acddc0ed 1// SPDX-License-Identifier: GPL-2.0-or-later
bf094f69 2/*
d8647095 3 * Zebra API message creation & consumption.
bf094f69
QY
4 * Portions:
5 * Copyright (C) 1997-1999 Kunihiro Ishiguro
6 * Copyright (C) 2015-2018 Cumulus Networks, Inc.
7 * et al.
bf094f69
QY
8 */
9
10#include "lib/if.h"
11#include "lib/vrf.h"
12#include "lib/zclient.h"
13#include "lib/pbr.h"
14
15#include "zebra/rib.h"
16#include "zebra/zserv.h"
17#include "zebra/zebra_pbr.h"
43e52561 18#include "zebra/zebra_errors.h"
e11d7c96 19#include "zebra/label_manager.h"
6e68a084 20#include "zebra/zebra_srv6.h"
e11d7c96 21
bf094f69 22
51e94aa7
EDP
23#ifdef __cplusplus
24extern "C" {
25#endif
26
bf094f69
QY
27/*
28 * This is called to process inbound ZAPI messages.
29 *
30 * client
31 * the client datastructure
32 *
79b3664a
MS
33 * fifo
34 * a batch of messages
bf094f69 35 */
79b3664a
MS
36extern void zserv_handle_commands(struct zserv *client,
37 struct stream_fifo *fifo);
bf094f69 38
8b1766b1
QY
39extern int zsend_vrf_add(struct zserv *zclient, struct zebra_vrf *zvrf);
40extern int zsend_vrf_delete(struct zserv *zclient, struct zebra_vrf *zvrf);
41extern int zsend_interface_add(struct zserv *zclient, struct interface *ifp);
42extern int zsend_interface_delete(struct zserv *zclient, struct interface *ifp);
43extern int zsend_interface_addresses(struct zserv *zclient,
44 struct interface *ifp);
45extern int zsend_interface_address(int cmd, struct zserv *zclient,
46 struct interface *ifp,
47 struct connected *ifc);
48extern void nbr_connected_add_ipv6(struct interface *ifp,
49 struct in6_addr *address);
50extern void nbr_connected_delete_ipv6(struct interface *ifp,
51 struct in6_addr *address);
52extern int zsend_interface_update(int cmd, struct zserv *client,
53 struct interface *ifp);
54extern int zsend_redistribute_route(int cmd, struct zserv *zclient,
84faa420 55 const struct route_node *rn,
40f321c0
MS
56 const struct route_entry *re);
57
98a3fb0a
SM
58extern int zsend_router_id_update(struct zserv *zclient, afi_t afi,
59 struct prefix *p, vrf_id_t vrf_id);
8b1766b1
QY
60extern int zsend_interface_vrf_update(struct zserv *zclient,
61 struct interface *ifp, vrf_id_t vrf_id);
62extern int zsend_interface_link_params(struct zserv *zclient,
63 struct interface *ifp);
64extern int zsend_pw_update(struct zserv *client, struct zebra_pw *pw);
a7704e1b
DS
65extern int zsend_route_notify_owner(const struct route_node *rn,
66 struct route_entry *re,
77b38a4a
S
67 enum zapi_route_notify_owner note,
68 afi_t afi, safi_t safi);
25779064 69extern int zsend_route_notify_owner_ctx(const struct zebra_dplane_ctx *ctx,
7cdb1a84 70 enum zapi_route_notify_owner note);
bf094f69 71
f62e5480 72extern void zsend_rule_notify_owner(const struct zebra_dplane_ctx *ctx,
bf094f69 73 enum zapi_rule_notify_owner note);
ef524230 74
5162e000 75extern void zsend_iptable_notify_owner(const struct zebra_dplane_ctx *ctx,
33c08518 76 enum zapi_iptable_notify_owner note);
ef524230 77extern void zsend_ipset_notify_owner(const struct zebra_dplane_ctx *ctx,
33c08518
DS
78 enum zapi_ipset_notify_owner note);
79extern void
80zsend_ipset_entry_notify_owner(const struct zebra_dplane_ctx *ctx,
81 enum zapi_ipset_entry_notify_owner note);
786a9bd9 82extern bool zserv_nexthop_num_warn(const char *caller, const struct prefix *p,
8b1766b1 83 const unsigned int nexthop_num);
b120fe3b
DS
84
85extern void zsend_capabilities_all_clients(void);
e11d7c96 86extern int zsend_assign_label_chunk_response(struct zserv *client,
4cebdb9b 87 vrf_id_t vrf_id,
e11d7c96
EDP
88 struct label_manager_chunk *lmc);
89extern int zsend_label_manager_connect_response(struct zserv *client,
90 vrf_id_t vrf_id,
91 unsigned short result);
31f937fb
SM
92extern int zsend_sr_policy_notify_status(uint32_t color,
93 struct ipaddr *endpoint, char *name,
94 int status);
7723e8d3
PG
95extern void zsend_nhrp_neighbor_notify(int cmd, struct interface *ifp,
96 struct ipaddr *ipaddr, int ndm_state,
d603c077 97 union sockunion *link_layer_ipv4);
51e94aa7 98
581e797e
KS
99extern int zsend_client_close_notify(struct zserv *client,
100 struct zserv *closed_client);
101
ee94437e
MS
102int zsend_nhg_notify(uint16_t type, uint16_t instance, uint32_t session_id,
103 uint32_t id, enum zapi_nhg_notify_owner note);
104
b86c1f4f 105extern void zapi_re_opaque_free(struct re_opaque *opaque);
224ccf29 106
6e68a084
HS
107extern int zsend_zebra_srv6_locator_add(struct zserv *client,
108 struct srv6_locator *loc);
109extern int zsend_zebra_srv6_locator_delete(struct zserv *client,
110 struct srv6_locator *loc);
111extern int zsend_srv6_manager_get_locator_chunk_response(struct zserv *client,
4df9d859 112 vrf_id_t vrf_id, struct srv6_locator *loc);
6e68a084 113
51e94aa7
EDP
114#ifdef __cplusplus
115}
116#endif