]> git.proxmox.com Git - mirror_frr.git/blame - ospf6d/ospf6_area.h
debianpkg: Add missing XSBC-Original-Maintainer field (fixes merge error)
[mirror_frr.git] / ospf6d / ospf6_area.h
CommitLineData
718e3744 1/*
508e53e2 2 * Copyright (C) 2003 Yasuhiro Ohara
718e3744 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
ac4d0be5 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.
718e3744 20 */
21
22#ifndef OSPF_AREA_H
23#define OSPF_AREA_H
24
718e3744 25#include "ospf6_top.h"
26
ac4d0be5 27struct ospf6_area {
28 /* Reference to Top data structure */
29 struct ospf6 *ospf6;
718e3744 30
ac4d0be5 31 /* Area-ID */
32 u_int32_t area_id;
718e3744 33
ac4d0be5 34 /* Area-ID string */
35 char name[16];
718e3744 36
ac4d0be5 37 /* flag */
38 u_char flag;
718e3744 39
ac4d0be5 40 /* OSPF Option */
41 u_char options[3];
718e3744 42
ac4d0be5 43 /* Summary routes to be originated (includes Configured Address Ranges)
44 */
45 struct ospf6_route_table *range_table;
46 struct ospf6_route_table *summary_prefix;
47 struct ospf6_route_table *summary_router;
049207c3 48
ac4d0be5 49 /* Area type */
50 int no_summary;
ca1f4309 51
ac4d0be5 52 /* OSPF interface list */
53 struct list *if_list;
718e3744 54
ac4d0be5 55 struct ospf6_lsdb *lsdb;
56 struct ospf6_lsdb *lsdb_self;
6452df09 57
ac4d0be5 58 struct ospf6_route_table *spf_table;
59 struct ospf6_route_table *route_table;
718e3744 60
ac4d0be5 61 u_int32_t spf_calculation; /* SPF calculation count */
718e3744 62
ac4d0be5 63 struct thread *thread_router_lsa;
64 struct thread *thread_intra_prefix_lsa;
65 u_int32_t router_lsa_size_limit;
34956b31 66
ac4d0be5 67 /* Area announce list */
68 struct {
69 char *name;
70 struct access_list *list;
71 } _export;
dea04441
PJ
72#define EXPORT_NAME(A) (A)->_export.name
73#define EXPORT_LIST(A) (A)->_export.list
34956b31 74
ac4d0be5 75 /* Area acceptance list */
76 struct {
77 char *name;
78 struct access_list *list;
79 } import;
34956b31 80#define IMPORT_NAME(A) (A)->import.name
81#define IMPORT_LIST(A) (A)->import.list
82
ac4d0be5 83 /* Type 3 LSA Area prefix-list */
84 struct {
85 char *name;
86 struct prefix_list *list;
87 } plist_in;
34956b31 88#define PREFIX_NAME_IN(A) (A)->plist_in.name
89#define PREFIX_LIST_IN(A) (A)->plist_in.list
90
ac4d0be5 91 struct {
92 char *name;
93 struct prefix_list *list;
94 } plist_out;
34956b31 95#define PREFIX_NAME_OUT(A) (A)->plist_out.name
96#define PREFIX_LIST_OUT(A) (A)->plist_out.list
97
ac4d0be5 98 /* Time stamps. */
99 struct timeval ts_spf; /* SPF calculation time stamp. */
718e3744 100};
101
6452df09 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
106
6452df09 107#define IS_AREA_ENABLED(oa) (CHECK_FLAG ((oa)->flag, OSPF6_AREA_ENABLE))
108#define IS_AREA_ACTIVE(oa) (CHECK_FLAG ((oa)->flag, OSPF6_AREA_ACTIVE))
109#define IS_AREA_TRANSIT(oa) (CHECK_FLAG ((oa)->flag, OSPF6_AREA_TRANSIT))
110#define IS_AREA_STUB(oa) (CHECK_FLAG ((oa)->flag, OSPF6_AREA_STUB))
718e3744 111
112/* prototypes */
ac4d0be5 113extern int ospf6_area_cmp(void *va, void *vb);
6452df09 114
ac4d0be5 115extern struct ospf6_area *ospf6_area_create(u_int32_t, struct ospf6 *);
116extern void ospf6_area_delete(struct ospf6_area *);
117extern struct ospf6_area *ospf6_area_lookup(u_int32_t, struct ospf6 *);
508e53e2 118
ac4d0be5 119extern void ospf6_area_enable(struct ospf6_area *);
120extern void ospf6_area_disable(struct ospf6_area *);
718e3744 121
ac4d0be5 122extern void ospf6_area_show(struct vty *, struct ospf6_area *);
6452df09 123
ac4d0be5 124extern void ospf6_area_config_write(struct vty *vty);
125extern void ospf6_area_init(void);
718e3744 126
127#endif /* OSPF_AREA_H */