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
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.
27 /* OSPFv3 top level data structure */
33 /* static router id */
34 u_int32_t router_id_static;
37 struct timeval starttime;
40 struct list *area_list;
41 struct ospf6_area *backbone;
43 /* AS scope link state database */
44 struct ospf6_lsdb *lsdb;
45 struct ospf6_lsdb *lsdb_self;
47 struct ospf6_route_table *route_table;
48 struct ospf6_route_table *brouter_table;
50 struct ospf6_route_table *external_table;
51 struct route_table *external_id_table;
52 u_int32_t external_id;
54 /* redistribute route-map */
58 struct route_map *map;
59 } rmap[ZEBRA_ROUTE_MAX];
63 /* Configured flags */
65 #define OSPF6_LOG_ADJACENCY_CHANGES (1 << 0)
66 #define OSPF6_LOG_ADJACENCY_DETAIL (1 << 1)
69 unsigned int spf_delay; /* SPF delay time. */
70 unsigned int spf_holdtime; /* SPF hold time. */
71 unsigned int spf_max_holdtime; /* SPF maximum-holdtime */
72 unsigned int spf_hold_multiplier; /* Adaptive multiplier for hold time */
73 unsigned int spf_reason; /* reason bits while scheduling SPF */
75 struct timeval ts_spf; /* SPF calculation time stamp. */
76 struct timeval ts_spf_duration; /* Execution time of last SPF */
77 unsigned int last_spf_reason; /* Last SPF reason */
80 struct thread *t_spf_calc; /* SPF calculation timer. */
81 struct thread *t_ase_calc; /* ASE calculation timer. */
82 struct thread *maxage_remover;
84 u_int32_t ref_bandwidth;
86 /* Distance parameters */
88 u_char distance_intra;
89 u_char distance_inter;
90 u_char distance_external;
92 struct route_table *distance_table;
95 #define OSPF6_DISABLED 0x01
96 #define OSPF6_STUB_ROUTER 0x02
98 /* global pointer for OSPF top data structure */
99 extern struct ospf6 *ospf6;
102 extern void ospf6_top_init (void);
103 extern void ospf6_delete (struct ospf6 *o);
105 extern void ospf6_maxage_remove (struct ospf6 *o);
107 #endif /* OSPF6_TOP_H */