]>
Commit | Line | Data |
---|---|---|
ad500b22 K |
1 | /* |
2 | * OSPFv3 Not So Stubby Area implementation. | |
3 | * | |
4 | * Copyright (C) 2021 Kaushik Nath | |
5 | * Copyright (C) 2021 Soman K.S | |
6 | * | |
7 | * This program is free software; you can redistribute it and/or modify | |
8 | * it under the terms of the GNU General Public License as published by | |
9 | * the Free Software Foundation; either version 2 of the License, or | |
10 | * (at your option) any later version. | |
11 | * | |
12 | * This program is distributed in the hope that it will be useful, | |
13 | * but WITHOUT ANY WARRANTY; without even the implied warranty of | |
14 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | |
15 | * GNU General Public License for more details. | |
16 | * | |
17 | * You should have received a copy of the GNU General Public License along | |
18 | * with this program; if not, write to the Free Software Foundation, Inc., | |
19 | * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. | |
20 | */ | |
21 | ||
22 | #ifndef OSPF6_NSSA_H | |
23 | #define OSPF6_NSSA_H | |
24 | ||
25 | #define OSPF6_OPTION_NP 0x08 | |
26 | #define OSPF6_LS_INFINITY 0xffffff | |
27 | ||
28 | #define OSPF6_OPT_N (1 << 3) /* Handling Type-7 LSA Capability */ | |
29 | ||
30 | #define OSPF6_DEBUG_NSSA 0x09 | |
31 | /* Debug option */ | |
32 | extern unsigned char config_debug_ospf6_nssa; | |
33 | ||
34 | #define OSPF6_DEBUG_NSSA_ON() (config_debug_ospf6_nssa = 1) | |
35 | #define OSPF6_DEBUG_NSSA_OFF() (config_debug_ospf6_nssa = 0) | |
36 | #define IS_OSPF6_DEBUG_NSSA config_debug_ospf6_nssa | |
37 | ||
38 | #define CHECK_LSA_TYPE_1_TO_5_OR_7(type) \ | |
39 | ((type == OSPF6_ROUTER_LSA_MIN_SIZE) \ | |
40 | || (type == OSPF6_NETWORK_LSA_MIN_SIZE) \ | |
41 | || (type == OSPF6_LINK_LSA_MIN_SIZE) \ | |
42 | || (type == OSPF6_INTRA_PREFIX_LSA_MIN_SIZE) \ | |
43 | || (type == OSPF6_AS_NSSA_LSA)) | |
44 | ||
45 | #define OSPF6_LSA_APPROVED 0x08 | |
46 | #define OSPF6_LSA_LOCAL_XLT 0x40 | |
47 | ||
48 | #define OSPF6_ABR_TASK_DELAY 7 | |
49 | ||
50 | int ospf6_area_nssa_no_summary_set(struct ospf6 *ospf6, struct in_addr area_id); | |
51 | int ospf6_area_nssa_unset(struct ospf6 *ospf6, struct ospf6_area *area); | |
52 | int ospf6_area_nssa_set(struct ospf6 *ospf6, struct ospf6_area *area); | |
53 | ||
54 | extern void ospf6_nssa_lsa_flush(struct ospf6 *ospf6, struct prefix_ipv6 *p); | |
55 | extern struct ospf6_lsa *ospf6_translated_nssa_refresh(struct ospf6_area *, | |
56 | struct ospf6_lsa *, | |
57 | struct ospf6_lsa *); | |
58 | extern struct ospf6_lsa *ospf6_translated_nssa_originate(struct ospf6_area *, | |
59 | struct ospf6_lsa *); | |
60 | ||
61 | extern void ospf6_asbr_nssa_redist_task(struct ospf6 *ospf6); | |
62 | ||
63 | extern void ospf6_schedule_abr_task(struct ospf6 *ospf6); | |
64 | void ospf6_asbr_prefix_readvertise(struct ospf6 *ospf6); | |
65 | extern void ospf6_nssa_lsa_originate(struct ospf6_route *route, | |
66 | struct ospf6_area *area); | |
67 | extern void install_element_ospf6_debug_nssa(void); | |
68 | int ospf6_redistribute_check(struct ospf6 *ospf6, struct ospf6_route *route, | |
69 | int type); | |
70 | extern int ospf6_abr_translate_nssa(struct ospf6_area *area, | |
71 | struct ospf6_lsa *lsa); | |
72 | extern void ospf6_abr_check_translate_nssa(struct ospf6_area *area, | |
73 | struct ospf6_lsa *lsa); | |
74 | extern void ospf6_abr_nssa_check_status(struct ospf6 *ospf6); | |
75 | extern void config_write_ospf6_debug_nssa(struct vty *vty); | |
76 | #endif /* OSPF6_NSSA_H */ |