]>
Commit | Line | Data |
---|---|---|
acddc0ed | 1 | // SPDX-License-Identifier: GPL-2.0-or-later |
718e3744 | 2 | /* |
3 | * Redistribution Handler | |
4 | * Copyright (C) 1999 Kunihiro Ishiguro | |
718e3744 | 5 | */ |
6 | ||
7 | #ifndef _ZEBRA_REDISTRIBUTE_H | |
8 | #define _ZEBRA_REDISTRIBUTE_H | |
9 | ||
10 | #include "table.h" | |
7a4bb9c5 | 11 | #include "vty.h" |
12f6fb97 | 12 | #include "vrf.h" |
718e3744 | 13 | |
bf094f69 QY |
14 | #include "zebra/zserv.h" |
15 | #include "zebra/rib.h" | |
16 | ||
51e94aa7 EDP |
17 | #ifdef __cplusplus |
18 | extern "C" { | |
19 | #endif | |
20 | ||
1002497a | 21 | /* ZAPI command handlers */ |
89f4e507 QY |
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); | |
1002497a | 26 | /* ----------------- */ |
718e3744 | 27 | |
ee78ed68 | 28 | extern void redistribute_update(const struct route_node *rn, |
40f321c0 MS |
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 | */ | |
b3a9fca1 | 39 | void redistribute_delete(const struct route_node *rn, |
40f321c0 MS |
40 | const struct route_entry *old_re, |
41 | const struct route_entry *new_re); | |
718e3744 | 42 | |
a1742ba8 DS |
43 | extern void zebra_interface_up_update(struct interface *ifp); |
44 | extern void zebra_interface_down_update(struct interface *ifp); | |
718e3744 | 45 | |
a1742ba8 DS |
46 | extern void zebra_interface_add_update(struct interface *ifp); |
47 | extern void zebra_interface_delete_update(struct interface *ifp); | |
718e3744 | 48 | |
a1742ba8 DS |
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, | |
d62a17ae | 52 | struct connected *c); |
a1742ba8 DS |
53 | extern void zebra_interface_parameters_update(struct interface *ifp); |
54 | extern void zebra_interface_vrf_update_del(struct interface *ifp, | |
d62a17ae | 55 | vrf_id_t new_vrf_id); |
a1742ba8 | 56 | extern void zebra_interface_vrf_update_add(struct interface *ifp, |
d62a17ae | 57 | vrf_id_t old_vrf_id); |
8902474b | 58 | |
fe257ae7 DS |
59 | extern int zebra_import_table(afi_t afi, vrf_id_t vrf_id, |
60 | uint32_t table_id, uint32_t distance, | |
d62a17ae | 61 | const char *rmap_name, int add); |
7a4bb9c5 | 62 | |
fe257ae7 DS |
63 | extern int zebra_add_import_table_entry(struct zebra_vrf *zvrf, |
64 | struct route_node *rn, | |
d62a17ae | 65 | struct route_entry *re, |
66 | const char *rmap_name); | |
fe257ae7 DS |
67 | extern int zebra_del_import_table_entry(struct zebra_vrf *zvrf, |
68 | struct route_node *rn, | |
d62a17ae | 69 | struct route_entry *re); |
fe257ae7 DS |
70 | extern int is_zebra_import_table_enabled(afi_t, vrf_id_t vrf_id, |
71 | uint32_t table_id); | |
7a4bb9c5 | 72 | |
fe257ae7 | 73 | extern int zebra_import_table_config(struct vty *, vrf_id_t vrf_id); |
7a4bb9c5 | 74 | |
d5b8c216 | 75 | extern void zebra_import_table_rm_update(const char *rmap); |
51e94aa7 EDP |
76 | |
77 | #ifdef __cplusplus | |
78 | } | |
79 | #endif | |
80 | ||
718e3744 | 81 | #endif /* _ZEBRA_REDISTRIBUTE_H */ |