]> git.proxmox.com Git - mirror_frr.git/blame - ospfd/ospf_abr.h
zebra, lib: fix the ZEBRA_INTERFACE_VRF_UPDATE zapi message
[mirror_frr.git] / ospfd / ospf_abr.h
CommitLineData
718e3744 1/*
2 * OSPF ABR functions.
3 * Copyright (C) 1999 Alex Zinin
4 *
5 * This file is part of GNU Zebra.
896014f4 6 *
718e3744 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.
896014f4 11 *
718e3744 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 *
896014f4
DL
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
718e3744 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. */
d62a17ae 31struct ospf_area_range {
32 /* Area range address. */
33 struct in_addr addr;
718e3744 34
d62a17ae 35 /* Area range masklen. */
d7c0a89a 36 uint8_t masklen;
718e3744 37
d62a17ae 38 /* Flags. */
d7c0a89a 39 uint8_t flags;
718e3744 40
d62a17ae 41 /* Number of more specific prefixes. */
42 int specifics;
718e3744 43
d62a17ae 44 /* Addr and masklen to substitute. */
45 struct in_addr subst_addr;
d7c0a89a 46 uint8_t subst_masklen;
718e3744 47
d62a17ae 48 /* Range cost. */
d7c0a89a 49 uint32_t cost;
718e3744 50
d62a17ae 51 /* Configured range cost. */
d7c0a89a 52 uint32_t cost_config;
718e3744 53};
54
55/* Prototypes. */
d62a17ae 56extern struct ospf_area_range *ospf_area_range_lookup(struct ospf_area *,
57 struct prefix_ipv4 *);
58
59extern struct ospf_area_range *ospf_some_area_range_match(struct prefix_ipv4 *);
60
61extern struct ospf_area_range *
62ospf_area_range_lookup_next(struct ospf_area *, struct in_addr *, int);
63
64extern int ospf_area_range_set(struct ospf *, struct in_addr,
65 struct prefix_ipv4 *, int);
66extern int ospf_area_range_cost_set(struct ospf *, struct in_addr,
d7c0a89a 67 struct prefix_ipv4 *, uint32_t);
d62a17ae 68extern int ospf_area_range_unset(struct ospf *, struct in_addr,
69 struct prefix_ipv4 *);
70extern int ospf_area_range_substitute_set(struct ospf *, struct in_addr,
71 struct prefix_ipv4 *,
72 struct prefix_ipv4 *);
73extern int ospf_area_range_substitute_unset(struct ospf *, struct in_addr,
74 struct prefix_ipv4 *);
75extern struct ospf_area_range *ospf_area_range_match_any(struct ospf *,
76 struct prefix_ipv4 *);
77extern int ospf_area_range_active(struct ospf_area_range *);
78extern int ospf_act_bb_connection(struct ospf *);
79
80extern void ospf_check_abr_status(struct ospf *);
81extern void ospf_abr_task(struct ospf *);
82extern void ospf_schedule_abr_task(struct ospf *);
83
d7c0a89a 84extern void ospf_abr_announce_network_to_area(struct prefix_ipv4 *, uint32_t,
d62a17ae 85 struct ospf_area *);
718e3744 86#endif /* _ZEBRA_OSPF_ABR_H */