]> git.proxmox.com Git - mirror_frr.git/blob - ospf6d/ospf6_area.h
Initial revision
[mirror_frr.git] / ospf6d / ospf6_area.h
1 /*
2 * OSPF6 Area Data Structure
3 * Copyright (C) 1999 Yasuhiro Ohara
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
18 * along with GNU Zebra; see the file COPYING. If not, write to the
19 * Free Software Foundation, Inc., 59 Temple Place - Suite 330,
20 * Boston, MA 02111-1307, USA.
21 */
22
23 #ifndef OSPF_AREA_H
24 #define OSPF_AREA_H
25
26 /* This file defines area parameters and data structures. */
27
28 #define OSPF6_AREA_RANGE_ADVERTISE 0
29 #define OSPF6_AREA_RANGE_NOT_ADVERTISE 1
30
31 #include "ospf6_spf.h"
32 #include "ospf6_top.h"
33
34 struct ospf6_area
35 {
36 char str[16];
37
38 struct ospf6 *ospf6; /* back pointer */
39 u_int32_t area_id;
40 u_char options[3]; /* OSPF Option including ExternalCapability */
41
42 list if_list; /* OSPF interface to this area */
43
44 struct ospf6_lsdb *lsdb;
45
46 struct thread *spf_calc;
47 struct thread *route_calc;
48 int stat_spf_execed;
49 int stat_route_execed;
50
51 struct route_table *table; /* new route table */
52
53 struct prefix_ipv6 area_range;
54 struct ospf6_spftree *spf_tree;
55
56 struct ospf6_route_table *route_table;
57 struct ospf6_route_table *table_topology;
58
59 void (*foreach_if) (struct ospf6_area *, void *, int,
60 void (*func) (void *, int, void *));
61 void (*foreach_nei) (struct ospf6_area *, void *, int,
62 void (*func) (void *, int, void *));
63
64 struct thread *maxage_remover;
65
66 struct thread *thread_router_lsa;
67 };
68
69
70 /* prototypes */
71
72 int
73 ospf6_area_count_neighbor_in_state (u_char state, struct ospf6_area *o6a);
74
75 void
76 ospf6_area_schedule_maxage_remover (void *arg, int val, void *obj);
77
78 int ospf6_area_is_stub (struct ospf6_area *o6a);
79 int ospf6_area_is_transit (struct ospf6_area *o6a);
80 struct ospf6_area *ospf6_area_lookup (u_int32_t, struct ospf6 *);
81 struct ospf6_area *ospf6_area_create (u_int32_t);
82 void ospf6_area_delete (struct ospf6_area *);
83 void ospf6_area_show (struct vty *, struct ospf6_area *);
84 void
85 ospf6_area_statistics_show (struct vty *vty, struct ospf6_area *o6a);
86
87 void ospf6_area_init ();
88
89 #endif /* OSPF_AREA_H */
90