]> git.proxmox.com Git - mirror_frr.git/blob - zebra/redistribute.h
Merge pull request #13646 from donaldsharp/logically_illogical
[mirror_frr.git] / zebra / redistribute.h
1 // SPDX-License-Identifier: GPL-2.0-or-later
2 /*
3 * Redistribution Handler
4 * Copyright (C) 1999 Kunihiro Ishiguro
5 */
6
7 #ifndef _ZEBRA_REDISTRIBUTE_H
8 #define _ZEBRA_REDISTRIBUTE_H
9
10 #include "table.h"
11 #include "vty.h"
12 #include "vrf.h"
13
14 #include "zebra/zserv.h"
15 #include "zebra/rib.h"
16
17 #ifdef __cplusplus
18 extern "C" {
19 #endif
20
21 /* ZAPI command handlers */
22 extern void zebra_redistribute_add(ZAPI_HANDLER_ARGS);
23 extern void zebra_redistribute_delete(ZAPI_HANDLER_ARGS);
24 extern void zebra_redistribute_default_add(ZAPI_HANDLER_ARGS);
25 extern void zebra_redistribute_default_delete(ZAPI_HANDLER_ARGS);
26 /* ----------------- */
27
28 extern void redistribute_update(const struct route_node *rn,
29 const struct route_entry *re,
30 const struct route_entry *prev_re);
31 /*
32 * During a route delete, where 'new_re' is NULL, redist a delete to all
33 * clients registered for the type of 'old_re'.
34 * During a route update, redist a delete to any clients who will not see
35 * an update when the new route is installed. There are cases when a client
36 * may have seen a redist for 'old_re', but will not see
37 * the redist for 'new_re'.
38 */
39 void redistribute_delete(const struct route_node *rn,
40 const struct route_entry *old_re,
41 const struct route_entry *new_re);
42
43 extern void zebra_interface_up_update(struct interface *ifp);
44 extern void zebra_interface_down_update(struct interface *ifp);
45
46 extern void zebra_interface_add_update(struct interface *ifp);
47 extern void zebra_interface_delete_update(struct interface *ifp);
48
49 extern void zebra_interface_address_add_update(struct interface *ifp,
50 struct connected *c);
51 extern void zebra_interface_address_delete_update(struct interface *ifp,
52 struct connected *c);
53 extern void zebra_interface_parameters_update(struct interface *ifp);
54 extern void zebra_interface_vrf_update_del(struct interface *ifp,
55 vrf_id_t new_vrf_id);
56 extern void zebra_interface_vrf_update_add(struct interface *ifp,
57 vrf_id_t old_vrf_id);
58
59 extern int zebra_import_table(afi_t afi, vrf_id_t vrf_id,
60 uint32_t table_id, uint32_t distance,
61 const char *rmap_name, int add);
62
63 extern int zebra_add_import_table_entry(struct zebra_vrf *zvrf,
64 struct route_node *rn,
65 struct route_entry *re,
66 const char *rmap_name);
67 extern int zebra_del_import_table_entry(struct zebra_vrf *zvrf,
68 struct route_node *rn,
69 struct route_entry *re);
70 extern int is_zebra_import_table_enabled(afi_t, vrf_id_t vrf_id,
71 uint32_t table_id);
72
73 extern int zebra_import_table_config(struct vty *, vrf_id_t vrf_id);
74
75 extern void zebra_import_table_rm_update(const char *rmap);
76
77 #ifdef __cplusplus
78 }
79 #endif
80
81 #endif /* _ZEBRA_REDISTRIBUTE_H */