]> git.proxmox.com Git - mirror_frr.git/blob - zebra/rt.h
0b14a3ef36e6d82bada50e7f145b45632e0de713
[mirror_frr.git] / zebra / rt.h
1 /*
2 * kernel routing table update prototype.
3 * Copyright (C) 1998 Kunihiro Ishiguro
4 *
5 * This file is part of GNU Zebra.
6 *
7 * GNU Zebra is free software; you can redistribute it and/or modify it
8 * under the terms of the GNU General Public License as published by the
9 * Free Software Foundation; either version 2, or (at your option) any
10 * later version.
11 *
12 * GNU Zebra is distributed in the hope that it will be useful, but
13 * WITHOUT ANY WARRANTY; without even the implied warranty of
14 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
15 * General Public License for more details.
16 *
17 * You should have received a copy of the GNU General Public License along
18 * with this program; see the file COPYING; if not, write to the Free Software
19 * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
20 */
21
22 #ifndef _ZEBRA_RT_H
23 #define _ZEBRA_RT_H
24
25 #include "prefix.h"
26 #include "if.h"
27 #include "vlan.h"
28 #include "vxlan.h"
29 #include "zebra/rib.h"
30 #include "zebra/zebra_ns.h"
31 #include "zebra/zebra_mpls.h"
32 #include "zebra/zebra_dplane.h"
33
34 /*
35 * Update or delete a route or LSP from the kernel,
36 * using info from a dataplane context.
37 */
38 extern enum zebra_dplane_result kernel_route_update(
39 struct zebra_dplane_ctx *ctx);
40
41 extern enum zebra_dplane_result kernel_lsp_update(
42 struct zebra_dplane_ctx *ctx);
43
44 extern int kernel_address_add_ipv4(struct interface *, struct connected *);
45 extern int kernel_address_delete_ipv4(struct interface *, struct connected *);
46 extern int kernel_address_add_ipv6(struct interface *, struct connected *);
47 extern int kernel_address_delete_ipv6(struct interface *, struct connected *);
48 extern int kernel_neigh_update(int cmd, int ifindex, uint32_t addr, char *lla,
49 int llalen, ns_id_t ns_id);
50 extern int kernel_interface_set_master(struct interface *master,
51 struct interface *slave);
52
53 extern int mpls_kernel_init(void);
54
55 extern uint32_t kernel_get_speed(struct interface *ifp);
56 extern int kernel_get_ipmr_sg_stats(struct zebra_vrf *zvrf, void *mroute);
57 extern int kernel_add_vtep(vni_t vni, struct interface *ifp,
58 struct in_addr *vtep_ip);
59 extern int kernel_del_vtep(vni_t vni, struct interface *ifp,
60 struct in_addr *vtep_ip);
61 extern int kernel_add_mac(struct interface *ifp, vlanid_t vid,
62 struct ethaddr *mac, struct in_addr vtep_ip,
63 bool sticky);
64 extern int kernel_del_mac(struct interface *ifp, vlanid_t vid,
65 struct ethaddr *mac, struct in_addr vtep_ip);
66
67 extern int kernel_add_neigh(struct interface *ifp, struct ipaddr *ip,
68 struct ethaddr *mac, uint8_t flags);
69 extern int kernel_del_neigh(struct interface *ifp, struct ipaddr *ip);
70
71 /*
72 * Southbound Initialization routines to get initial starting
73 * state.
74 */
75 extern void interface_list(struct zebra_ns *zns);
76 extern void kernel_init(struct zebra_ns *zns);
77 extern void kernel_terminate(struct zebra_ns *zns, bool complete);
78 extern void macfdb_read(struct zebra_ns *zns);
79 extern void macfdb_read_for_bridge(struct zebra_ns *zns, struct interface *ifp,
80 struct interface *br_if);
81 extern void macfdb_read_specific_mac(struct zebra_ns *zns,
82 struct interface *br_if,
83 struct ethaddr *mac, vlanid_t vid);
84 extern void neigh_read(struct zebra_ns *zns);
85 extern void neigh_read_for_vlan(struct zebra_ns *zns, struct interface *ifp);
86 extern void neigh_read_specific_ip(struct ipaddr *ip,
87 struct interface *vlan_if);
88 extern void route_read(struct zebra_ns *zns);
89
90 #endif /* _ZEBRA_RT_H */