]> git.proxmox.com Git - mirror_frr.git/blob - ospf6d/ospf6_zebra.h
Merge pull request #12310 from kuldeepkash/pim_v6
[mirror_frr.git] / ospf6d / ospf6_zebra.h
1 // SPDX-License-Identifier: GPL-2.0-or-later
2 /*
3 * Copyright (C) 2003 Yasuhiro Ohara
4 */
5
6 #ifndef OSPF6_ZEBRA_H
7 #define OSPF6_ZEBRA_H
8
9 #include "zclient.h"
10
11 #define DEFAULT_ROUTE ZEBRA_ROUTE_MAX
12
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
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)
20
21 /* OSPF6 distance */
22 struct ospf6_distance {
23 /* Distance value for the IP source prefix */
24 uint8_t distance;
25
26 /* Name of the access-list to be matched */
27 char *access_list;
28 };
29
30 extern struct zclient *zclient;
31 struct ospf6;
32
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);
37
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)
42 extern void ospf6_zebra_init(struct thread_master *tm);
43 extern void ospf6_zebra_import_default_route(struct ospf6 *ospf6, bool unreg);
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);
48
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);
53
54 extern int ospf6_zebra_gr_enable(struct ospf6 *ospf6, uint32_t stale_time);
55 extern int ospf6_zebra_gr_disable(struct ospf6 *ospf6);
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);
62
63 extern int config_write_ospf6_debug_zebra(struct vty *vty);
64 extern void install_element_ospf6_debug_zebra(void);
65 extern void ospf6_zebra_vrf_register(struct ospf6 *ospf6);
66 extern void ospf6_zebra_vrf_deregister(struct ospf6 *ospf6);
67 #endif /*OSPF6_ZEBRA_H*/