2 * Copyright (C) 2003 Yasuhiro Ohara
4 * This file is part of GNU Zebra.
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
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.
16 * You should have received a copy of the GNU General Public License along
17 * with this program; see the file COPYING; if not, write to the Free Software
18 * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
24 #include "ospf6_top.h"
27 /* Reference to Top data structure */
33 #define OSPF6_AREA_FMT_DOTTEDQUAD 1
34 #define OSPF6_AREA_FMT_DECIMAL 2
44 /* Summary routes to be originated (includes Configured Address Ranges)
46 struct ospf6_route_table
*range_table
;
47 struct ospf6_route_table
*summary_prefix
;
48 struct ospf6_route_table
*summary_router
;
53 /* OSPF interface list */
56 struct ospf6_lsdb
*lsdb
;
57 struct ospf6_lsdb
*lsdb_self
;
58 struct ospf6_lsdb
*temp_router_lsa_lsdb
;
60 struct ospf6_route_table
*spf_table
;
61 struct ospf6_route_table
*route_table
;
63 u_int32_t spf_calculation
; /* SPF calculation count */
65 struct thread
*thread_router_lsa
;
66 struct thread
*thread_intra_prefix_lsa
;
67 u_int32_t router_lsa_size_limit
;
69 /* Area announce list */
72 struct access_list
*list
;
74 #define EXPORT_NAME(A) (A)->_export.name
75 #define EXPORT_LIST(A) (A)->_export.list
77 /* Area acceptance list */
80 struct access_list
*list
;
82 #define IMPORT_NAME(A) (A)->import.name
83 #define IMPORT_LIST(A) (A)->import.list
85 /* Type 3 LSA Area prefix-list */
88 struct prefix_list
*list
;
90 #define PREFIX_NAME_IN(A) (A)->plist_in.name
91 #define PREFIX_LIST_IN(A) (A)->plist_in.list
95 struct prefix_list
*list
;
97 #define PREFIX_NAME_OUT(A) (A)->plist_out.name
98 #define PREFIX_LIST_OUT(A) (A)->plist_out.list
101 struct timeval ts_spf
; /* SPF calculation time stamp. */
103 uint32_t full_nbrs
; /* Fully adjacent neighbors. */
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
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))
117 extern int ospf6_area_cmp(void *va
, void *vb
);
119 extern struct ospf6_area
*ospf6_area_create(u_int32_t
, struct ospf6
*, int);
120 extern void ospf6_area_delete(struct ospf6_area
*);
121 extern struct ospf6_area
*ospf6_area_lookup(u_int32_t
, struct ospf6
*);
123 extern void ospf6_area_enable(struct ospf6_area
*);
124 extern void ospf6_area_disable(struct ospf6_area
*);
126 extern void ospf6_area_show(struct vty
*, struct ospf6_area
*);
128 extern void ospf6_area_plist_update(struct prefix_list
*plist
, int add
);
129 extern void ospf6_area_config_write(struct vty
*vty
);
130 extern void ospf6_area_init(void);
132 #endif /* OSPF_AREA_H */