/src/frr/ospfd/ospf_abr.h
Line  | Count  | Source  | 
1  |  | // SPDX-License-Identifier: GPL-2.0-or-later  | 
2  |  | /*  | 
3  |  |  * OSPF ABR functions.  | 
4  |  |  * Copyright (C) 1999 Alex Zinin  | 
5  |  |  */  | 
6  |  |  | 
7  |  | #ifndef _ZEBRA_OSPF_ABR_H  | 
8  |  | #define _ZEBRA_OSPF_ABR_H  | 
9  |  |  | 
10  |  | #define OSPF_ABR_TASK_DELAY   5  | 
11  |  | #define OSPF_ABR_DNA_TIMER 10  | 
12  |  | /* Delay in announceing Non-DNA routers  | 
13  |  |  * so that LSAs are completely synced  | 
14  |  |  * before generating indication LSAs.  | 
15  |  |  */  | 
16  |  |  | 
17  | 0  | #define OSPF_AREA_RANGE_ADVERTISE (1 << 0)  | 
18  |  | #define OSPF_AREA_RANGE_SUBSTITUTE  (1 << 1)  | 
19  |  | #define OSPF_AREA_RANGE_NSSA    (1 << 2)  | 
20  |  |  | 
21  |  | /* Area range. */  | 
22  |  | struct ospf_area_range { | 
23  |  |   /* Area range address. */  | 
24  |  |   struct in_addr addr;  | 
25  |  |  | 
26  |  |   /* Area range masklen. */  | 
27  |  |   uint8_t masklen;  | 
28  |  |  | 
29  |  |   /* Flags. */  | 
30  |  |   uint8_t flags;  | 
31  |  |  | 
32  |  |   /* Number of more specific prefixes. */  | 
33  |  |   int specifics;  | 
34  |  |  | 
35  |  |   /* Addr and masklen to substitute. */  | 
36  |  |   struct in_addr subst_addr;  | 
37  |  |   uint8_t subst_masklen;  | 
38  |  |  | 
39  |  |   /* Range cost. */  | 
40  |  |   uint32_t cost;  | 
41  |  |  | 
42  |  |   /* Configured range cost. */  | 
43  |  |   uint32_t cost_config;  | 
44  |  | };  | 
45  |  |  | 
46  |  | /* Prototypes. */  | 
47  |  | extern struct ospf_area_range *ospf_area_range_lookup(struct ospf_area *,  | 
48  |  |                   struct route_table *,  | 
49  |  |                   struct prefix_ipv4 *);  | 
50  |  | extern struct ospf_area_range *  | 
51  |  | ospf_area_range_lookup_next(struct ospf_area *, struct in_addr *, int);  | 
52  |  |  | 
53  |  | extern int ospf_area_range_set(struct ospf *, struct ospf_area *,  | 
54  |  |              struct route_table *, struct prefix_ipv4 *, int,  | 
55  |  |              bool);  | 
56  |  | extern int ospf_area_range_cost_set(struct ospf *, struct ospf_area *,  | 
57  |  |             struct route_table *, struct prefix_ipv4 *,  | 
58  |  |             uint32_t);  | 
59  |  | extern int ospf_area_range_unset(struct ospf *, struct ospf_area *,  | 
60  |  |          struct route_table *, struct prefix_ipv4 *);  | 
61  |  | extern int ospf_area_range_substitute_set(struct ospf *, struct ospf_area *,  | 
62  |  |             struct prefix_ipv4 *,  | 
63  |  |             struct prefix_ipv4 *);  | 
64  |  | extern int ospf_area_range_substitute_unset(struct ospf *, struct ospf_area *,  | 
65  |  |               struct prefix_ipv4 *);  | 
66  |  | extern struct ospf_area_range *ospf_area_range_match_any(struct ospf *,  | 
67  |  |                struct prefix_ipv4 *);  | 
68  |  | extern int ospf_area_range_active(struct ospf_area_range *);  | 
69  |  | extern int ospf_act_bb_connection(struct ospf *);  | 
70  |  |  | 
71  |  | extern void ospf_check_abr_status(struct ospf *);  | 
72  |  | extern void ospf_abr_task(struct ospf *);  | 
73  |  | extern void ospf_abr_nssa_task(struct ospf *ospf);  | 
74  |  | extern void ospf_schedule_abr_task(struct ospf *);  | 
75  |  |  | 
76  |  | extern void ospf_abr_announce_network_to_area(struct prefix_ipv4 *, uint32_t,  | 
77  |  |                 struct ospf_area *);  | 
78  |  | extern void ospf_abr_nssa_type7_defaults(struct ospf *ospf);  | 
79  |  | extern void ospf_abr_nssa_check_status(struct ospf *ospf);  | 
80  |  | extern void ospf_abr_generate_indication_lsa(struct ospf *ospf,  | 
81  |  |                const struct ospf_area *area);  | 
82  |  | extern void ospf_flush_indication_lsas(struct ospf *ospf);  | 
83  |  | extern void ospf_generate_indication_lsa(struct ospf *ospf,  | 
84  |  |            struct ospf_area *area);  | 
85  |  | extern bool ospf_check_fr_enabled_all(struct ospf *ospf);  | 
86  |  | extern void ospf_recv_indication_lsa_flush(struct ospf_lsa *lsa);  | 
87  |  |  | 
88  |  | /** @brief Static inline functions.  | 
89  |  |  *  @param Area pointer.  | 
90  |  |  *  @return area Flood Reduction status.  | 
91  |  |  */  | 
92  |  | static inline bool ospf_check_area_fr_enabled(const struct ospf_area *area)  | 
93  | 0  | { | 
94  | 0  |   return area->fr_info.enabled ? true : false;  | 
95  | 0  | } Unexecuted instantiation: ospf_interface.c:ospf_check_area_fr_enabled Unexecuted instantiation: ospf_lsa.c:ospf_check_area_fr_enabled Unexecuted instantiation: ospf_nsm.c:ospf_check_area_fr_enabled Unexecuted instantiation: ospf_packet.c:ospf_check_area_fr_enabled Unexecuted instantiation: ospf_spf.c:ospf_check_area_fr_enabled Unexecuted instantiation: ospf_vty.c:ospf_check_area_fr_enabled Unexecuted instantiation: ospf_zebra.c:ospf_check_area_fr_enabled Unexecuted instantiation: ospfd.c:ospf_check_area_fr_enabled Unexecuted instantiation: ospf_abr.c:ospf_check_area_fr_enabled Unexecuted instantiation: ospf_flood.c:ospf_check_area_fr_enabled Unexecuted instantiation: ospf_gr.c:ospf_check_area_fr_enabled Unexecuted instantiation: ospf_ia.c:ospf_check_area_fr_enabled Unexecuted instantiation: ospf_ism.c:ospf_check_area_fr_enabled  | 
96  |  | #endif /* _ZEBRA_OSPF_ABR_H */  |