]> git.proxmox.com Git - mirror_frr.git/blob - ospf6d/ospf6_area.h
cumulus: Add new daemons to daemons file
[mirror_frr.git] / ospf6d / ospf6_area.h
1 /*
2 * Copyright (C) 2003 Yasuhiro Ohara
3 *
4 * This file is part of GNU Zebra.
5 *
6 * GNU Zebra is free software; you can redistribute it and/or modify it
7 * under the terms of the GNU General Public License as published by the
8 * Free Software Foundation; either version 2, or (at your option) any
9 * later version.
10 *
11 * GNU Zebra is distributed in the hope that it will be useful, but
12 * WITHOUT ANY WARRANTY; without even the implied warranty of
13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
14 * General Public License for more details.
15 *
16 * You should have received a copy of the GNU General Public License
17 * along with GNU Zebra; see the file COPYING. If not, write to the
18 * Free Software Foundation, Inc., 59 Temple Place - Suite 330,
19 * Boston, MA 02111-1307, USA.
20 */
21
22 #ifndef OSPF_AREA_H
23 #define OSPF_AREA_H
24
25 #include "ospf6_top.h"
26
27 struct ospf6_area
28 {
29 /* Reference to Top data structure */
30 struct ospf6 *ospf6;
31
32 /* Area-ID */
33 u_int32_t area_id;
34
35 /* Area-ID string */
36 char name[16];
37
38 /* flag */
39 u_char flag;
40
41 /* OSPF Option */
42 u_char options[3];
43
44 /* Summary routes to be originated (includes Configured Address Ranges) */
45 struct ospf6_route_table *range_table;
46 struct ospf6_route_table *summary_prefix;
47 struct ospf6_route_table *summary_router;
48
49 /* Area type */
50 int no_summary;
51
52 /* OSPF interface list */
53 struct list *if_list;
54
55 struct ospf6_lsdb *lsdb;
56 struct ospf6_lsdb *lsdb_self;
57
58 struct ospf6_route_table *spf_table;
59 struct ospf6_route_table *route_table;
60
61 u_int32_t spf_calculation; /* SPF calculation count */
62
63 struct thread *thread_router_lsa;
64 struct thread *thread_intra_prefix_lsa;
65 u_int32_t router_lsa_size_limit;
66
67 /* Area announce list */
68 struct
69 {
70 char *name;
71 struct access_list *list;
72 } _export;
73 #define EXPORT_NAME(A) (A)->_export.name
74 #define EXPORT_LIST(A) (A)->_export.list
75
76 /* Area acceptance list */
77 struct
78 {
79 char *name;
80 struct access_list *list;
81 } import;
82 #define IMPORT_NAME(A) (A)->import.name
83 #define IMPORT_LIST(A) (A)->import.list
84
85 /* Type 3 LSA Area prefix-list */
86 struct
87 {
88 char *name;
89 struct prefix_list *list;
90 } plist_in;
91 #define PREFIX_NAME_IN(A) (A)->plist_in.name
92 #define PREFIX_LIST_IN(A) (A)->plist_in.list
93
94 struct
95 {
96 char *name;
97 struct prefix_list *list;
98 } plist_out;
99 #define PREFIX_NAME_OUT(A) (A)->plist_out.name
100 #define PREFIX_LIST_OUT(A) (A)->plist_out.list
101
102 /* Time stamps. */
103 struct timeval ts_spf; /* SPF calculation time stamp. */
104 };
105
106 #define OSPF6_AREA_ENABLE 0x01
107 #define OSPF6_AREA_ACTIVE 0x02
108 #define OSPF6_AREA_TRANSIT 0x04 /* TransitCapability */
109 #define OSPF6_AREA_STUB 0x08
110
111 #define IS_AREA_ENABLED(oa) (CHECK_FLAG ((oa)->flag, OSPF6_AREA_ENABLE))
112 #define IS_AREA_ACTIVE(oa) (CHECK_FLAG ((oa)->flag, OSPF6_AREA_ACTIVE))
113 #define IS_AREA_TRANSIT(oa) (CHECK_FLAG ((oa)->flag, OSPF6_AREA_TRANSIT))
114 #define IS_AREA_STUB(oa) (CHECK_FLAG ((oa)->flag, OSPF6_AREA_STUB))
115
116 /* prototypes */
117 extern int ospf6_area_cmp (void *va, void *vb);
118
119 extern struct ospf6_area *ospf6_area_create (u_int32_t, struct ospf6 *);
120 extern void ospf6_area_delete (struct ospf6_area *);
121 extern struct ospf6_area *ospf6_area_lookup (u_int32_t, struct ospf6 *);
122
123 extern void ospf6_area_enable (struct ospf6_area *);
124 extern void ospf6_area_disable (struct ospf6_area *);
125
126 extern void ospf6_area_show (struct vty *, struct ospf6_area *);
127
128 extern void ospf6_area_config_write (struct vty *vty);
129 extern void ospf6_area_init (void);
130
131 #endif /* OSPF_AREA_H */