]>
git.proxmox.com Git - mirror_frr.git/blob - zebra/rt.h
2 * kernel routing table update prototype.
3 * Copyright (C) 1998 Kunihiro Ishiguro
5 * This file is part of GNU Zebra.
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
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.
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
29 #include "zebra/rib.h"
30 #include "zebra/zebra_ns.h"
31 #include "zebra/zebra_mpls.h"
36 * Flags being SET/UNSET do not belong in the South Bound
37 * Interface. This Setting belongs at the calling level
38 * because we can and will have multiple different interfaces
39 * and we will have potentially multiple different
40 * modules/filters to call. As such Setting/Unsetting
41 * success failure should be handled by the caller.
59 * Install/delete the specified prefix p from the kernel
61 * old = NULL, new = pointer - Install new
62 * old = pointer, new = pointer - Route replace Old w/ New
63 * old = pointer, new = NULL, - Route Delete
65 * Please note not all kernels support route replace
66 * semantics so we will end up with a delete than
69 extern enum dp_req_result
kernel_route_rib(struct route_node
*rn
,
70 const struct prefix
*p
,
71 const struct prefix
*src_p
,
72 struct route_entry
*old
,
73 struct route_entry
*new);
76 * So route install/failure may not be immediately known
77 * so let's separate it out and allow the result to
80 extern void kernel_route_rib_pass_fail(struct route_node
*rn
,
81 const struct prefix
*p
,
82 struct route_entry
*re
,
85 extern int kernel_address_add_ipv4(struct interface
*, struct connected
*);
86 extern int kernel_address_delete_ipv4(struct interface
*, struct connected
*);
87 extern int kernel_address_add_ipv6(struct interface
*, struct connected
*);
88 extern int kernel_address_delete_ipv6(struct interface
*, struct connected
*);
89 extern int kernel_neigh_update(int cmd
, int ifindex
, uint32_t addr
, char *lla
,
90 int llalen
, ns_id_t ns_id
);
91 extern int kernel_interface_set_master(struct interface
*master
,
92 struct interface
*slave
);
94 extern enum dp_req_result
kernel_add_lsp(zebra_lsp_t
*lsp
);
95 extern enum dp_req_result
kernel_upd_lsp(zebra_lsp_t
*lsp
);
96 extern enum dp_req_result
kernel_del_lsp(zebra_lsp_t
*lsp
);
99 * Add the ability to pass back up the lsp install/delete
102 * This functions goal is similiar to kernel_route_rib_pass_fail
103 * in that we are separating out the mechanics for
104 * the install/failure to set/unset flags and to notify
107 extern void kernel_lsp_pass_fail(zebra_lsp_t
*lsp
, enum dp_results res
);
109 extern int mpls_kernel_init(void);
111 extern uint32_t kernel_get_speed(struct interface
*ifp
);
112 extern int kernel_get_ipmr_sg_stats(struct zebra_vrf
*zvrf
, void *mroute
);
113 extern int kernel_add_vtep(vni_t vni
, struct interface
*ifp
,
114 struct in_addr
*vtep_ip
);
115 extern int kernel_del_vtep(vni_t vni
, struct interface
*ifp
,
116 struct in_addr
*vtep_ip
);
117 extern int kernel_add_mac(struct interface
*ifp
, vlanid_t vid
,
118 struct ethaddr
*mac
, struct in_addr vtep_ip
,
120 extern int kernel_del_mac(struct interface
*ifp
, vlanid_t vid
,
121 struct ethaddr
*mac
, struct in_addr vtep_ip
);
123 extern int kernel_add_neigh(struct interface
*ifp
, struct ipaddr
*ip
,
124 struct ethaddr
*mac
, uint8_t flags
);
125 extern int kernel_del_neigh(struct interface
*ifp
, struct ipaddr
*ip
);
128 * Southbound Initialization routines to get initial starting
131 extern void interface_list(struct zebra_ns
*zns
);
132 extern void kernel_init(struct zebra_ns
*zns
);
133 extern void kernel_terminate(struct zebra_ns
*zns
);
134 extern void macfdb_read(struct zebra_ns
*zns
);
135 extern void macfdb_read_for_bridge(struct zebra_ns
*zns
, struct interface
*ifp
,
136 struct interface
*br_if
);
137 extern void neigh_read(struct zebra_ns
*zns
);
138 extern void neigh_read_for_vlan(struct zebra_ns
*zns
, struct interface
*ifp
);
139 extern void route_read(struct zebra_ns
*zns
);
141 #endif /* _ZEBRA_RT_H */