]> git.proxmox.com Git - mirror_frr.git/blob - ospf6d/ospf6_top.h
Merge branch 'stable/3.0'
[mirror_frr.git] / ospf6d / ospf6_top.h
1 /*
2 * Copyright (C) 2003 Yasuhiro Ohara
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 along
17 * with this program; see the file COPYING; if not, write to the Free Software
18 * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
19 */
20
21 #ifndef OSPF6_TOP_H
22 #define OSPF6_TOP_H
23
24 #include "qobj.h"
25 #include "routemap.h"
26
27 /* OSPFv3 top level data structure */
28 struct ospf6
29 {
30 /* my router id */
31 u_int32_t router_id;
32
33 /* static router id */
34 u_int32_t router_id_static;
35
36 /* start time */
37 struct timeval starttime;
38
39 /* list of areas */
40 struct list *area_list;
41 struct ospf6_area *backbone;
42
43 /* AS scope link state database */
44 struct ospf6_lsdb *lsdb;
45 struct ospf6_lsdb *lsdb_self;
46
47 struct ospf6_route_table *route_table;
48 struct ospf6_route_table *brouter_table;
49
50 struct ospf6_route_table *external_table;
51 struct route_table *external_id_table;
52 u_int32_t external_id;
53
54 /* redistribute route-map */
55 struct
56 {
57 char *name;
58 struct route_map *map;
59 } rmap[ZEBRA_ROUTE_MAX];
60
61 u_char flag;
62
63 /* Configured flags */
64 u_char config_flags;
65 #define OSPF6_LOG_ADJACENCY_CHANGES (1 << 0)
66 #define OSPF6_LOG_ADJACENCY_DETAIL (1 << 1)
67
68 /* LSA timer parameters */
69 unsigned int lsa_minarrival; /* LSA minimum arrival in milliseconds. */
70
71 /* SPF parameters */
72 unsigned int spf_delay; /* SPF delay time. */
73 unsigned int spf_holdtime; /* SPF hold time. */
74 unsigned int spf_max_holdtime; /* SPF maximum-holdtime */
75 unsigned int spf_hold_multiplier; /* Adaptive multiplier for hold time */
76 unsigned int spf_reason; /* reason bits while scheduling SPF */
77
78 struct timeval ts_spf; /* SPF calculation time stamp. */
79 struct timeval ts_spf_duration; /* Execution time of last SPF */
80 unsigned int last_spf_reason; /* Last SPF reason */
81
82 /* Threads */
83 struct thread *t_spf_calc; /* SPF calculation timer. */
84 struct thread *t_ase_calc; /* ASE calculation timer. */
85 struct thread *maxage_remover;
86
87 u_int32_t ref_bandwidth;
88
89 /* Distance parameters */
90 u_char distance_all;
91 u_char distance_intra;
92 u_char distance_inter;
93 u_char distance_external;
94
95 struct route_table *distance_table;
96
97 QOBJ_FIELDS
98 };
99 DECLARE_QOBJ_TYPE(ospf6)
100
101 #define OSPF6_DISABLED 0x01
102 #define OSPF6_STUB_ROUTER 0x02
103
104 /* global pointer for OSPF top data structure */
105 extern struct ospf6 *ospf6;
106
107 /* prototypes */
108 extern void ospf6_top_init (void);
109 extern void ospf6_delete (struct ospf6 *o);
110
111 extern void ospf6_maxage_remove (struct ospf6 *o);
112
113 #endif /* OSPF6_TOP_H */
114
115