2023-02-08 13:17:09 +01:00
|
|
|
// SPDX-License-Identifier: GPL-2.0-or-later
|
2002-12-13 21:15:29 +01:00
|
|
|
/*
|
2004-05-18 20:57:06 +02:00
|
|
|
* Copyright (C) 2003 Yasuhiro Ohara
|
2002-12-13 21:15:29 +01:00
|
|
|
*/
|
|
|
|
|
|
|
|
#ifndef OSPF6_ZEBRA_H
|
|
|
|
#define OSPF6_ZEBRA_H
|
|
|
|
|
2004-05-18 20:57:06 +02:00
|
|
|
#include "zclient.h"
|
|
|
|
|
2021-02-10 05:53:46 +01:00
|
|
|
#define DEFAULT_ROUTE ZEBRA_ROUTE_MAX
|
|
|
|
|
2004-05-18 20:57:06 +02:00
|
|
|
/* Debug option */
|
|
|
|
extern unsigned char conf_debug_ospf6_zebra;
|
|
|
|
#define OSPF6_DEBUG_ZEBRA_SEND 0x01
|
|
|
|
#define OSPF6_DEBUG_ZEBRA_RECV 0x02
|
|
|
|
#define OSPF6_DEBUG_ZEBRA_ON(level) (conf_debug_ospf6_zebra |= level)
|
|
|
|
#define OSPF6_DEBUG_ZEBRA_OFF(level) (conf_debug_ospf6_zebra &= ~(level))
|
|
|
|
#define IS_OSPF6_DEBUG_ZEBRA(e) (conf_debug_ospf6_zebra & OSPF6_DEBUG_ZEBRA_##e)
|
|
|
|
|
2014-03-05 09:13:43 +01:00
|
|
|
/* OSPF6 distance */
|
|
|
|
struct ospf6_distance {
|
|
|
|
/* Distance value for the IP source prefix */
|
2018-03-27 21:13:34 +02:00
|
|
|
uint8_t distance;
|
2014-03-05 09:13:43 +01:00
|
|
|
|
|
|
|
/* Name of the access-list to be matched */
|
|
|
|
char *access_list;
|
|
|
|
};
|
|
|
|
|
2002-12-13 21:15:29 +01:00
|
|
|
extern struct zclient *zclient;
|
2020-10-08 07:38:43 +02:00
|
|
|
struct ospf6;
|
2002-12-13 21:15:29 +01:00
|
|
|
|
2020-10-08 07:38:43 +02:00
|
|
|
extern void ospf6_zebra_route_update_add(struct ospf6_route *request,
|
|
|
|
struct ospf6 *ospf6);
|
|
|
|
extern void ospf6_zebra_route_update_remove(struct ospf6_route *request,
|
|
|
|
struct ospf6 *ospf6);
|
2004-05-18 20:57:06 +02:00
|
|
|
|
2020-09-01 10:31:49 +02:00
|
|
|
extern void ospf6_zebra_redistribute(int, vrf_id_t vrf_id);
|
|
|
|
extern void ospf6_zebra_no_redistribute(int, vrf_id_t vrf_id);
|
|
|
|
#define ospf6_zebra_is_redistribute(type, vrf_id) \
|
2023-04-19 14:13:18 +02:00
|
|
|
vrf_bitmap_check(&zclient->redist[AFI_IP6][type], vrf_id)
|
2023-03-07 20:14:41 +01:00
|
|
|
extern void ospf6_zebra_init(struct event_loop *tm);
|
2021-09-07 00:52:32 +02:00
|
|
|
extern void ospf6_zebra_import_default_route(struct ospf6 *ospf6, bool unreg);
|
2020-10-08 07:38:43 +02:00
|
|
|
extern void ospf6_zebra_add_discard(struct ospf6_route *request,
|
|
|
|
struct ospf6 *ospf6);
|
|
|
|
extern void ospf6_zebra_delete_discard(struct ospf6_route *request,
|
|
|
|
struct ospf6 *ospf6);
|
2002-12-13 21:15:29 +01:00
|
|
|
|
2021-09-09 22:42:52 +02:00
|
|
|
extern void ospf6_distance_reset(struct ospf6 *ospf6);
|
|
|
|
extern uint8_t ospf6_distance_apply(struct prefix_ipv6 *p,
|
|
|
|
struct ospf6_route * or,
|
|
|
|
struct ospf6 *ospf6);
|
2014-03-05 09:13:43 +01:00
|
|
|
|
2021-07-02 18:01:32 +02:00
|
|
|
extern int ospf6_zebra_gr_enable(struct ospf6 *ospf6, uint32_t stale_time);
|
|
|
|
extern int ospf6_zebra_gr_disable(struct ospf6 *ospf6);
|
2021-09-09 22:42:52 +02:00
|
|
|
extern int ospf6_distance_set(struct vty *vty, struct ospf6 *ospf6,
|
|
|
|
const char *distance_str, const char *ip_str,
|
|
|
|
const char *access_list_str);
|
|
|
|
extern int ospf6_distance_unset(struct vty *vty, struct ospf6 *ospf6,
|
|
|
|
const char *distance_str, const char *ip_str,
|
|
|
|
const char *access_list_str);
|
2014-03-05 09:13:43 +01:00
|
|
|
|
2008-08-15 14:45:30 +02:00
|
|
|
extern int config_write_ospf6_debug_zebra(struct vty *vty);
|
|
|
|
extern void install_element_ospf6_debug_zebra(void);
|
2020-10-08 07:38:43 +02:00
|
|
|
extern void ospf6_zebra_vrf_register(struct ospf6 *ospf6);
|
|
|
|
extern void ospf6_zebra_vrf_deregister(struct ospf6 *ospf6);
|
2002-12-13 21:15:29 +01:00
|
|
|
#endif /*OSPF6_ZEBRA_H*/
|