build: Add QuaggaId to README.NetBSD
[jleu-quagga.git] / ospf6d / ospf6_area.h
blobc7c5ee35881ceaa8e0229093d52cdbff86748e65
1 /*
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
9 * later version.
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
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.
22 #ifndef OSPF_AREA_H
23 #define OSPF_AREA_H
25 #include "ospf6_top.h"
27 struct ospf6_area
29 /* Reference to Top data structure */
30 struct ospf6 *ospf6;
32 /* Area-ID */
33 u_int32_t area_id;
35 /* Area-ID string */
36 char name[16];
38 /* flag */
39 u_char flag;
41 /* OSPF Option */
42 u_char options[3];
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;
49 /* OSPF interface list */
50 struct list *if_list;
52 struct ospf6_lsdb *lsdb;
53 struct ospf6_lsdb *lsdb_self;
55 struct ospf6_route_table *spf_table;
56 struct ospf6_route_table *route_table;
58 struct thread *thread_spf_calculation;
59 struct thread *thread_route_calculation;
61 struct thread *thread_router_lsa;
62 struct thread *thread_intra_prefix_lsa;
63 u_int32_t router_lsa_size_limit;
65 /* Area announce list */
66 struct
68 char *name;
69 struct access_list *list;
70 } _export;
71 #define EXPORT_NAME(A) (A)->_export.name
72 #define EXPORT_LIST(A) (A)->_export.list
74 /* Area acceptance list */
75 struct
77 char *name;
78 struct access_list *list;
79 } import;
80 #define IMPORT_NAME(A) (A)->import.name
81 #define IMPORT_LIST(A) (A)->import.list
83 /* Type 3 LSA Area prefix-list */
84 struct
86 char *name;
87 struct prefix_list *list;
88 } plist_in;
89 #define PREFIX_NAME_IN(A) (A)->plist_in.name
90 #define PREFIX_LIST_IN(A) (A)->plist_in.list
92 struct
94 char *name;
95 struct prefix_list *list;
96 } plist_out;
97 #define PREFIX_NAME_OUT(A) (A)->plist_out.name
98 #define PREFIX_LIST_OUT(A) (A)->plist_out.list
102 #define OSPF6_AREA_ENABLE 0x01
103 #define OSPF6_AREA_ACTIVE 0x02
104 #define OSPF6_AREA_TRANSIT 0x04 /* TransitCapability */
105 #define OSPF6_AREA_STUB 0x08
107 #define BACKBONE_AREA_ID (htonl (0))
108 #define IS_AREA_BACKBONE(oa) ((oa)->area_id == BACKBONE_AREA_ID)
109 #define IS_AREA_ENABLED(oa) (CHECK_FLAG ((oa)->flag, OSPF6_AREA_ENABLE))
110 #define IS_AREA_ACTIVE(oa) (CHECK_FLAG ((oa)->flag, OSPF6_AREA_ACTIVE))
111 #define IS_AREA_TRANSIT(oa) (CHECK_FLAG ((oa)->flag, OSPF6_AREA_TRANSIT))
112 #define IS_AREA_STUB(oa) (CHECK_FLAG ((oa)->flag, OSPF6_AREA_STUB))
114 /* prototypes */
115 extern int ospf6_area_cmp (void *va, void *vb);
117 extern struct ospf6_area *ospf6_area_create (u_int32_t, struct ospf6 *);
118 extern void ospf6_area_delete (struct ospf6_area *);
119 extern struct ospf6_area *ospf6_area_lookup (u_int32_t, struct ospf6 *);
121 extern void ospf6_area_enable (struct ospf6_area *);
122 extern void ospf6_area_disable (struct ospf6_area *);
124 extern void ospf6_area_show (struct vty *, struct ospf6_area *);
126 extern void ospf6_area_config_write (struct vty *vty);
127 extern void ospf6_area_init (void);
129 #endif /* OSPF_AREA_H */