]>
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"
32 #include "zebra/zebra_dplane.h"
38 #define RKERNEL_ROUTE(type) ((type) == ZEBRA_ROUTE_KERNEL)
40 #define RSYSTEM_ROUTE(type) \
41 ((RKERNEL_ROUTE(type)) || (type) == ZEBRA_ROUTE_CONNECT)
45 * Update or delete a route, nexthop, LSP, pseudowire, or vxlan MAC from the
46 * kernel, using info from a dataplane context.
48 extern enum zebra_dplane_result
kernel_route_update(
49 struct zebra_dplane_ctx
*ctx
);
51 extern enum zebra_dplane_result
52 kernel_nexthop_update(struct zebra_dplane_ctx
*ctx
);
54 extern enum zebra_dplane_result
kernel_lsp_update(
55 struct zebra_dplane_ctx
*ctx
);
57 enum zebra_dplane_result
kernel_pw_update(struct zebra_dplane_ctx
*ctx
);
59 enum zebra_dplane_result
kernel_address_update_ctx(
60 struct zebra_dplane_ctx
*ctx
);
62 enum zebra_dplane_result
kernel_mac_update_ctx(struct zebra_dplane_ctx
*ctx
);
64 enum zebra_dplane_result
kernel_neigh_update_ctx(struct zebra_dplane_ctx
*ctx
);
66 extern int kernel_neigh_update(int cmd
, int ifindex
, uint32_t addr
, char *lla
,
67 int llalen
, ns_id_t ns_id
);
68 extern int kernel_interface_set_master(struct interface
*master
,
69 struct interface
*slave
);
71 extern int mpls_kernel_init(void);
73 extern uint32_t kernel_get_speed(struct interface
*ifp
, int *error
);
74 extern int kernel_get_ipmr_sg_stats(struct zebra_vrf
*zvrf
, void *mroute
);
77 * Southbound Initialization routines to get initial starting
80 extern void interface_list(struct zebra_ns
*zns
);
81 extern void kernel_init(struct zebra_ns
*zns
);
82 extern void kernel_terminate(struct zebra_ns
*zns
, bool complete
);
83 extern void macfdb_read(struct zebra_ns
*zns
);
84 extern void macfdb_read_for_bridge(struct zebra_ns
*zns
, struct interface
*ifp
,
85 struct interface
*br_if
);
86 extern void macfdb_read_specific_mac(struct zebra_ns
*zns
,
87 struct interface
*br_if
,
88 struct ethaddr
*mac
, vlanid_t vid
);
89 extern void neigh_read(struct zebra_ns
*zns
);
90 extern void neigh_read_for_vlan(struct zebra_ns
*zns
, struct interface
*ifp
);
91 extern void neigh_read_specific_ip(struct ipaddr
*ip
,
92 struct interface
*vlan_if
);
93 extern void route_read(struct zebra_ns
*zns
);
99 #endif /* _ZEBRA_RT_H */