blob: 14d3eb9d6ce59273c9935dde66edc93354dc237b [file] [log] [blame]
paul718e3742002-12-13 20:15:29 +00001/*
hasso508e53e2004-05-18 18:57:06 +00002 * Copyright (C) 2003 Yasuhiro Ohara
paul718e3742002-12-13 20:15:29 +00003 *
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
paul718e3742002-12-13 20:15:29 +000025#include "ospf6_top.h"
26
27struct ospf6_area
28{
hasso508e53e2004-05-18 18:57:06 +000029 /* Reference to Top data structure */
30 struct ospf6 *ospf6;
paul718e3742002-12-13 20:15:29 +000031
hasso508e53e2004-05-18 18:57:06 +000032 /* Area-ID */
33 u_int32_t area_id;
paul718e3742002-12-13 20:15:29 +000034
hasso508e53e2004-05-18 18:57:06 +000035 /* Area-ID string */
36 char name[16];
paul718e3742002-12-13 20:15:29 +000037
hasso508e53e2004-05-18 18:57:06 +000038 /* flag */
39 u_char flag;
paul718e3742002-12-13 20:15:29 +000040
hasso508e53e2004-05-18 18:57:06 +000041 /* OSPF Option */
42 u_char options[3];
paul718e3742002-12-13 20:15:29 +000043
hasso508e53e2004-05-18 18:57:06 +000044 /* OSPF interface list */
45 list if_list;
paul718e3742002-12-13 20:15:29 +000046
hasso508e53e2004-05-18 18:57:06 +000047 struct ospf6_lsdb *lsdb;
48 struct ospf6_route_table *spf_table;
paul718e3742002-12-13 20:15:29 +000049 struct ospf6_route_table *route_table;
paul718e3742002-12-13 20:15:29 +000050
hasso508e53e2004-05-18 18:57:06 +000051 struct thread *thread_spf_calculation;
52 struct thread *thread_route_calculation;
paul718e3742002-12-13 20:15:29 +000053
54 struct thread *thread_router_lsa;
hasso508e53e2004-05-18 18:57:06 +000055 struct thread *thread_intra_prefix_lsa;
56 u_int32_t router_lsa_size_limit;
paul718e3742002-12-13 20:15:29 +000057};
58
hasso508e53e2004-05-18 18:57:06 +000059#define OSPF6_AREA_DISABLE 0x01
60#define OSPF6_AREA_STUB 0x02
paul718e3742002-12-13 20:15:29 +000061
62/* prototypes */
hasso508e53e2004-05-18 18:57:06 +000063int ospf6_area_cmp (void *va, void *vb);
paul718e3742002-12-13 20:15:29 +000064int ospf6_area_is_stub (struct ospf6_area *o6a);
hasso508e53e2004-05-18 18:57:06 +000065struct ospf6_area *ospf6_area_create (u_int32_t, struct ospf6 *);
paul718e3742002-12-13 20:15:29 +000066void ospf6_area_delete (struct ospf6_area *);
hasso508e53e2004-05-18 18:57:06 +000067struct ospf6_area *ospf6_area_lookup (u_int32_t, struct ospf6 *);
paul718e3742002-12-13 20:15:29 +000068
hasso508e53e2004-05-18 18:57:06 +000069void ospf6_area_enable (struct ospf6_area *);
70void ospf6_area_disable (struct ospf6_area *);
71
72void ospf6_area_show (struct vty *, struct ospf6_area *);
paul718e3742002-12-13 20:15:29 +000073void ospf6_area_init ();
74
75#endif /* OSPF_AREA_H */
76