]>
Commit | Line | Data |
---|---|---|
718e3744 | 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 | * | |
896014f4 DL |
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 | |
718e3744 | 20 | */ |
21 | ||
22 | #ifndef _ZEBRA_RT_H | |
23 | #define _ZEBRA_RT_H | |
24 | ||
ec1a4283 | 25 | #include "prefix.h" |
26 | #include "if.h" | |
2232a77c | 27 | #include "vlan.h" |
13d60d35 | 28 | #include "vxlan.h" |
5c78b3d0 | 29 | #include "zebra/rib.h" |
40c7bdb0 | 30 | #include "zebra/zebra_ns.h" |
31 | #include "zebra/zebra_mpls.h" | |
ea1c14f6 | 32 | #include "zebra/zebra_dplane.h" |
1e885672 | 33 | |
7cdb1a84 MS |
34 | /* |
35 | * Update or delete a prefix from the kernel, | |
36 | * using info from a dataplane context. | |
37 | */ | |
25779064 MS |
38 | extern enum zebra_dplane_result kernel_route_update( |
39 | struct zebra_dplane_ctx *ctx); | |
7cdb1a84 | 40 | |
d62a17ae | 41 | extern int kernel_address_add_ipv4(struct interface *, struct connected *); |
42 | extern int kernel_address_delete_ipv4(struct interface *, struct connected *); | |
996c9314 LB |
43 | extern int kernel_address_add_ipv6(struct interface *, struct connected *); |
44 | extern int kernel_address_delete_ipv6(struct interface *, struct connected *); | |
45 | extern int kernel_neigh_update(int cmd, int ifindex, uint32_t addr, char *lla, | |
46 | int llalen, ns_id_t ns_id); | |
e0ae31b8 DS |
47 | extern int kernel_interface_set_master(struct interface *master, |
48 | struct interface *slave); | |
4a83e7a0 | 49 | |
ea1c14f6 MS |
50 | extern enum zebra_dplane_result kernel_add_lsp(zebra_lsp_t *lsp); |
51 | extern enum zebra_dplane_result kernel_upd_lsp(zebra_lsp_t *lsp); | |
52 | extern enum zebra_dplane_result kernel_del_lsp(zebra_lsp_t *lsp); | |
4a83e7a0 DS |
53 | |
54 | /* | |
55 | * Add the ability to pass back up the lsp install/delete | |
56 | * success/failure. | |
57 | * | |
58 | * This functions goal is similiar to kernel_route_rib_pass_fail | |
59 | * in that we are separating out the mechanics for | |
60 | * the install/failure to set/unset flags and to notify | |
61 | * as needed. | |
62 | */ | |
ea1c14f6 | 63 | extern void kernel_lsp_pass_fail(zebra_lsp_t *lsp, enum zebra_dplane_status res); |
4a83e7a0 | 64 | |
d62a17ae | 65 | extern int mpls_kernel_init(void); |
66 | ||
dc7b3cae | 67 | extern uint32_t kernel_get_speed(struct interface *ifp); |
43b5cc5e | 68 | extern int kernel_get_ipmr_sg_stats(struct zebra_vrf *zvrf, void *mroute); |
d62a17ae | 69 | extern int kernel_add_vtep(vni_t vni, struct interface *ifp, |
70 | struct in_addr *vtep_ip); | |
71 | extern int kernel_del_vtep(vni_t vni, struct interface *ifp, | |
72 | struct in_addr *vtep_ip); | |
73 | extern int kernel_add_mac(struct interface *ifp, vlanid_t vid, | |
74 | struct ethaddr *mac, struct in_addr vtep_ip, | |
a37f4598 | 75 | bool sticky); |
d62a17ae | 76 | extern int kernel_del_mac(struct interface *ifp, vlanid_t vid, |
d63c1b18 | 77 | struct ethaddr *mac, struct in_addr vtep_ip); |
d62a17ae | 78 | |
79 | extern int kernel_add_neigh(struct interface *ifp, struct ipaddr *ip, | |
68e33151 | 80 | struct ethaddr *mac, uint8_t flags); |
d62a17ae | 81 | extern int kernel_del_neigh(struct interface *ifp, struct ipaddr *ip); |
2232a77c | 82 | |
05f7f5db DS |
83 | /* |
84 | * Southbound Initialization routines to get initial starting | |
85 | * state. | |
86 | */ | |
87 | extern void interface_list(struct zebra_ns *zns); | |
88 | extern void kernel_init(struct zebra_ns *zns); | |
62b8bb7a | 89 | extern void kernel_terminate(struct zebra_ns *zns, bool complete); |
05f7f5db DS |
90 | extern void macfdb_read(struct zebra_ns *zns); |
91 | extern void macfdb_read_for_bridge(struct zebra_ns *zns, struct interface *ifp, | |
92 | struct interface *br_if); | |
67fb9374 CS |
93 | extern void macfdb_read_specific_mac(struct zebra_ns *zns, |
94 | struct interface *br_if, | |
95 | struct ethaddr *mac, vlanid_t vid); | |
05f7f5db DS |
96 | extern void neigh_read(struct zebra_ns *zns); |
97 | extern void neigh_read_for_vlan(struct zebra_ns *zns, struct interface *ifp); | |
67fb9374 CS |
98 | extern void neigh_read_specific_ip(struct ipaddr *ip, |
99 | struct interface *vlan_if); | |
05f7f5db DS |
100 | extern void route_read(struct zebra_ns *zns); |
101 | ||
718e3744 | 102 | #endif /* _ZEBRA_RT_H */ |