]> git.proxmox.com Git - mirror_frr.git/blob - ospfd/ospf_abr.h
*: make consistent & update GPLv2 file headers
[mirror_frr.git] / ospfd / ospf_abr.h
1 /*
2 * OSPF ABR functions.
3 * Copyright (C) 1999 Alex Zinin
4 *
5 * This file is part of GNU Zebra.
6 *
7 * GNU Zebra is free software; you can redistribute it and/or modify it
8 * under the terms of the GNU General Public License as published by the
9 * Free Software Foundation; either version 2, or (at your option) any
10 * later version.
11 *
12 * GNU Zebra is distributed in the hope that it will be useful, but
13 * WITHOUT ANY WARRANTY; without even the implied warranty of
14 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
15 * 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; see the file COPYING; if not, write to the Free Software
19 * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
20 */
21
22 #ifndef _ZEBRA_OSPF_ABR_H
23 #define _ZEBRA_OSPF_ABR_H
24
25 #define OSPF_ABR_TASK_DELAY 7
26
27 #define OSPF_AREA_RANGE_ADVERTISE (1 << 0)
28 #define OSPF_AREA_RANGE_SUBSTITUTE (1 << 1)
29
30 /* Area range. */
31 struct ospf_area_range
32 {
33 /* Area range address. */
34 struct in_addr addr;
35
36 /* Area range masklen. */
37 u_char masklen;
38
39 /* Flags. */
40 u_char flags;
41
42 /* Number of more specific prefixes. */
43 int specifics;
44
45 /* Addr and masklen to substitute. */
46 struct in_addr subst_addr;
47 u_char subst_masklen;
48
49 /* Range cost. */
50 u_int32_t cost;
51
52 /* Configured range cost. */
53 u_int32_t cost_config;
54 };
55
56 /* Prototypes. */
57 extern struct ospf_area_range *ospf_area_range_lookup (struct ospf_area *,
58 struct prefix_ipv4 *);
59
60 extern struct ospf_area_range *ospf_some_area_range_match (struct prefix_ipv4
61 *);
62
63 extern struct ospf_area_range *ospf_area_range_lookup_next (struct ospf_area
64 *,
65 struct in_addr *,
66 int);
67
68 extern int ospf_area_range_set (struct ospf *, struct in_addr,
69 struct prefix_ipv4 *, int);
70 extern int ospf_area_range_cost_set (struct ospf *, struct in_addr,
71 struct prefix_ipv4 *, u_int32_t);
72 extern int ospf_area_range_unset (struct ospf *, struct in_addr,
73 struct prefix_ipv4 *);
74 extern int ospf_area_range_substitute_set (struct ospf *, struct in_addr,
75 struct prefix_ipv4 *,
76 struct prefix_ipv4 *);
77 extern int ospf_area_range_substitute_unset (struct ospf *, struct in_addr,
78 struct prefix_ipv4 *);
79 extern struct ospf_area_range *ospf_area_range_match_any (struct ospf *,
80 struct prefix_ipv4
81 *);
82 extern int ospf_area_range_active (struct ospf_area_range *);
83 extern int ospf_act_bb_connection (struct ospf *);
84
85 extern void ospf_check_abr_status (struct ospf *);
86 extern void ospf_abr_task (struct ospf *);
87 extern void ospf_schedule_abr_task (struct ospf *);
88
89 extern void ospf_abr_announce_network_to_area (struct prefix_ipv4 *,
90 u_int32_t,
91 struct ospf_area *);
92 #endif /* _ZEBRA_OSPF_ABR_H */