]>
Commit | Line | Data |
---|---|---|
acddc0ed | 1 | // SPDX-License-Identifier: GPL-2.0-or-later |
ad500b22 K |
2 | /* |
3 | * OSPFv3 Not So Stubby Area implementation. | |
4 | * | |
5 | * Copyright (C) 2021 Kaushik Nath | |
6 | * Copyright (C) 2021 Soman K.S | |
ad500b22 K |
7 | */ |
8 | ||
9 | #ifndef OSPF6_NSSA_H | |
10 | #define OSPF6_NSSA_H | |
11 | ||
12 | #define OSPF6_OPTION_NP 0x08 | |
13 | #define OSPF6_LS_INFINITY 0xffffff | |
14 | ||
15 | #define OSPF6_OPT_N (1 << 3) /* Handling Type-7 LSA Capability */ | |
16 | ||
17 | #define OSPF6_DEBUG_NSSA 0x09 | |
18 | /* Debug option */ | |
19 | extern unsigned char config_debug_ospf6_nssa; | |
20 | ||
21 | #define OSPF6_DEBUG_NSSA_ON() (config_debug_ospf6_nssa = 1) | |
22 | #define OSPF6_DEBUG_NSSA_OFF() (config_debug_ospf6_nssa = 0) | |
23 | #define IS_OSPF6_DEBUG_NSSA config_debug_ospf6_nssa | |
24 | ||
25 | #define CHECK_LSA_TYPE_1_TO_5_OR_7(type) \ | |
26 | ((type == OSPF6_ROUTER_LSA_MIN_SIZE) \ | |
27 | || (type == OSPF6_NETWORK_LSA_MIN_SIZE) \ | |
28 | || (type == OSPF6_LINK_LSA_MIN_SIZE) \ | |
29 | || (type == OSPF6_INTRA_PREFIX_LSA_MIN_SIZE) \ | |
30 | || (type == OSPF6_AS_NSSA_LSA)) | |
31 | ||
32 | #define OSPF6_LSA_APPROVED 0x08 | |
33 | #define OSPF6_LSA_LOCAL_XLT 0x40 | |
34 | ||
f3e93dc5 | 35 | #define OSPF6_ABR_TASK_DELAY 5 |
ad500b22 K |
36 | |
37 | int ospf6_area_nssa_no_summary_set(struct ospf6 *ospf6, struct in_addr area_id); | |
38 | int ospf6_area_nssa_unset(struct ospf6 *ospf6, struct ospf6_area *area); | |
39 | int ospf6_area_nssa_set(struct ospf6 *ospf6, struct ospf6_area *area); | |
40 | ||
41 | extern void ospf6_nssa_lsa_flush(struct ospf6 *ospf6, struct prefix_ipv6 *p); | |
7932dd93 DS |
42 | extern struct ospf6_lsa *ospf6_translated_nssa_refresh(struct ospf6_area *oa, |
43 | struct ospf6_lsa *type7, | |
44 | struct ospf6_lsa *type5); | |
ad500b22 K |
45 | |
46 | extern void ospf6_asbr_nssa_redist_task(struct ospf6 *ospf6); | |
47 | ||
48 | extern void ospf6_schedule_abr_task(struct ospf6 *ospf6); | |
0c293b92 | 49 | extern void ospf6_area_nssa_update(struct ospf6_area *area); |
ad500b22 K |
50 | void ospf6_asbr_prefix_readvertise(struct ospf6 *ospf6); |
51 | extern void ospf6_nssa_lsa_originate(struct ospf6_route *route, | |
6735622c | 52 | struct ospf6_area *area, bool p_bit); |
ad500b22 | 53 | extern void install_element_ospf6_debug_nssa(void); |
6735622c | 54 | extern void ospf6_abr_nssa_type_7_defaults(struct ospf6 *osof6); |
ad500b22 K |
55 | int ospf6_redistribute_check(struct ospf6 *ospf6, struct ospf6_route *route, |
56 | int type); | |
ad500b22 K |
57 | extern void ospf6_abr_check_translate_nssa(struct ospf6_area *area, |
58 | struct ospf6_lsa *lsa); | |
59 | extern void ospf6_abr_nssa_check_status(struct ospf6 *ospf6); | |
60 | extern void config_write_ospf6_debug_nssa(struct vty *vty); | |
61 | #endif /* OSPF6_NSSA_H */ |