]>
Commit | Line | Data |
---|---|---|
acddc0ed | 1 | // SPDX-License-Identifier: GPL-2.0-or-later |
718e3744 | 2 | /* |
508e53e2 | 3 | * Copyright (C) 2003 Yasuhiro Ohara |
718e3744 | 4 | */ |
5 | ||
6 | #ifndef OSPF6_ZEBRA_H | |
7 | #define OSPF6_ZEBRA_H | |
8 | ||
508e53e2 | 9 | #include "zclient.h" |
10 | ||
b19502d3 YR |
11 | #define DEFAULT_ROUTE ZEBRA_ROUTE_MAX |
12 | ||
508e53e2 | 13 | /* Debug option */ |
14 | extern unsigned char conf_debug_ospf6_zebra; | |
15 | #define OSPF6_DEBUG_ZEBRA_SEND 0x01 | |
16 | #define OSPF6_DEBUG_ZEBRA_RECV 0x02 | |
d62a17ae | 17 | #define OSPF6_DEBUG_ZEBRA_ON(level) (conf_debug_ospf6_zebra |= level) |
18 | #define OSPF6_DEBUG_ZEBRA_OFF(level) (conf_debug_ospf6_zebra &= ~(level)) | |
19 | #define IS_OSPF6_DEBUG_ZEBRA(e) (conf_debug_ospf6_zebra & OSPF6_DEBUG_ZEBRA_##e) | |
508e53e2 | 20 | |
baff583e | 21 | /* OSPF6 distance */ |
d62a17ae | 22 | struct ospf6_distance { |
23 | /* Distance value for the IP source prefix */ | |
d7c0a89a | 24 | uint8_t distance; |
baff583e | 25 | |
d62a17ae | 26 | /* Name of the access-list to be matched */ |
27 | char *access_list; | |
baff583e MZ |
28 | }; |
29 | ||
718e3744 | 30 | extern struct zclient *zclient; |
beadc736 | 31 | struct ospf6; |
718e3744 | 32 | |
beadc736 | 33 | extern void ospf6_zebra_route_update_add(struct ospf6_route *request, |
34 | struct ospf6 *ospf6); | |
35 | extern void ospf6_zebra_route_update_remove(struct ospf6_route *request, | |
36 | struct ospf6 *ospf6); | |
508e53e2 | 37 | |
c5d28568 K |
38 | extern void ospf6_zebra_redistribute(int, vrf_id_t vrf_id); |
39 | extern void ospf6_zebra_no_redistribute(int, vrf_id_t vrf_id); | |
40 | #define ospf6_zebra_is_redistribute(type, vrf_id) \ | |
41 | vrf_bitmap_check(zclient->redist[AFI_IP6][type], vrf_id) | |
cd9d0537 | 42 | extern void ospf6_zebra_init(struct event_loop *tm); |
6735622c | 43 | extern void ospf6_zebra_import_default_route(struct ospf6 *ospf6, bool unreg); |
beadc736 | 44 | extern void ospf6_zebra_add_discard(struct ospf6_route *request, |
45 | struct ospf6 *ospf6); | |
46 | extern void ospf6_zebra_delete_discard(struct ospf6_route *request, | |
47 | struct ospf6 *ospf6); | |
718e3744 | 48 | |
7932dd93 DS |
49 | extern void ospf6_distance_reset(struct ospf6 *ospf6); |
50 | extern uint8_t ospf6_distance_apply(struct prefix_ipv6 *p, | |
51 | struct ospf6_route * or, | |
52 | struct ospf6 *ospf6); | |
baff583e | 53 | |
71165098 RW |
54 | extern int ospf6_zebra_gr_enable(struct ospf6 *ospf6, uint32_t stale_time); |
55 | extern int ospf6_zebra_gr_disable(struct ospf6 *ospf6); | |
7932dd93 DS |
56 | extern int ospf6_distance_set(struct vty *vty, struct ospf6 *ospf6, |
57 | const char *distance_str, const char *ip_str, | |
58 | const char *access_list_str); | |
59 | extern int ospf6_distance_unset(struct vty *vty, struct ospf6 *ospf6, | |
60 | const char *distance_str, const char *ip_str, | |
61 | const char *access_list_str); | |
baff583e | 62 | |
d62a17ae | 63 | extern int config_write_ospf6_debug_zebra(struct vty *vty); |
64 | extern void install_element_ospf6_debug_zebra(void); | |
beadc736 | 65 | extern void ospf6_zebra_vrf_register(struct ospf6 *ospf6); |
66 | extern void ospf6_zebra_vrf_deregister(struct ospf6 *ospf6); | |
718e3744 | 67 | #endif /*OSPF6_ZEBRA_H*/ |