blob: 27eb18cddf9f41ca0dfc797a68415f95882ccf47 [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 OSPF6_TOP_H
23#define OSPF6_TOP_H
24
25#include "routemap.h"
26
hasso508e53e2004-05-18 18:57:06 +000027/* OSPFv3 top level data structure */
paul718e3742002-12-13 20:15:29 +000028struct ospf6
29{
hasso508e53e2004-05-18 18:57:06 +000030 /* my router id */
31 u_int32_t router_id;
paul718e3742002-12-13 20:15:29 +000032
hassoc8a440e2004-10-11 17:02:40 +000033 /* static router id */
34 u_int32_t router_id_static;
35
paul718e3742002-12-13 20:15:29 +000036 /* start time */
37 struct timeval starttime;
38
paul718e3742002-12-13 20:15:29 +000039 /* list of areas */
hasso52dc7ee2004-09-23 19:18:23 +000040 struct list *area_list;
Dinesh Dutt3810e062013-08-24 07:54:09 +000041 struct ospf6_area *backbone;
paul718e3742002-12-13 20:15:29 +000042
43 /* AS scope link state database */
44 struct ospf6_lsdb *lsdb;
hasso6452df02004-08-15 05:52:07 +000045 struct ospf6_lsdb *lsdb_self;
paul718e3742002-12-13 20:15:29 +000046
hasso508e53e2004-05-18 18:57:06 +000047 struct ospf6_route_table *route_table;
hasso049207c2004-08-04 20:02:13 +000048 struct ospf6_route_table *brouter_table;
hasso508e53e2004-05-18 18:57:06 +000049
50 struct ospf6_route_table *external_table;
51 struct route_table *external_id_table;
52 u_int32_t external_id;
53
paul718e3742002-12-13 20:15:29 +000054 /* redistribute route-map */
55 struct
56 {
57 char *name;
58 struct route_map *map;
59 } rmap[ZEBRA_ROUTE_MAX];
60
hasso508e53e2004-05-18 18:57:06 +000061 u_char flag;
paul718e3742002-12-13 20:15:29 +000062
Dinesh Dutt3810e062013-08-24 07:54:09 +000063 /* SPF parameters */
64 unsigned int spf_delay; /* SPF delay time. */
65 unsigned int spf_holdtime; /* SPF hold time. */
66 unsigned int spf_max_holdtime; /* SPF maximum-holdtime */
67 unsigned int spf_hold_multiplier; /* Adaptive multiplier for hold time */
68
69 struct timeval ts_spf; /* SPF calculation time stamp. */
70 struct timeval ts_spf_duration; /* Execution time of last SPF */
71
72 /* Threads */
73 struct thread *t_spf_calc; /* SPF calculation timer. */
74 struct thread *t_ase_calc; /* ASE calculation timer. */
paul718e3742002-12-13 20:15:29 +000075 struct thread *maxage_remover;
paul718e3742002-12-13 20:15:29 +000076};
hasso508e53e2004-05-18 18:57:06 +000077
78#define OSPF6_DISABLED 0x01
79
80/* global pointer for OSPF top data structure */
paul718e3742002-12-13 20:15:29 +000081extern struct ospf6 *ospf6;
82
83/* prototypes */
Paul Jakma6ac29a52008-08-15 13:45:30 +010084extern void ospf6_top_init (void);
Tom Goffae2254a2010-11-10 13:01:41 -080085extern void ospf6_delete (struct ospf6 *o);
paul718e3742002-12-13 20:15:29 +000086
Paul Jakma6ac29a52008-08-15 13:45:30 +010087extern void ospf6_maxage_remove (struct ospf6 *o);
hasso508e53e2004-05-18 18:57:06 +000088
paul718e3742002-12-13 20:15:29 +000089#endif /* OSPF6_TOP_H */
90
hasso508e53e2004-05-18 18:57:06 +000091