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 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
27 /* OSPFv3 top level data structure */
32 /* static router id */
33 u_int32_t router_id_static
;
36 struct timeval starttime
;
39 struct list
*area_list
;
40 struct ospf6_area
*backbone
;
42 /* AS scope link state database */
43 struct ospf6_lsdb
*lsdb
;
44 struct ospf6_lsdb
*lsdb_self
;
46 struct ospf6_route_table
*route_table
;
47 struct ospf6_route_table
*brouter_table
;
49 struct ospf6_route_table
*external_table
;
50 struct route_table
*external_id_table
;
51 u_int32_t external_id
;
53 /* redistribute route-map */
56 struct route_map
*map
;
57 } rmap
[ZEBRA_ROUTE_MAX
];
61 /* Configured flags */
63 #define OSPF6_LOG_ADJACENCY_CHANGES (1 << 0)
64 #define OSPF6_LOG_ADJACENCY_DETAIL (1 << 1)
66 /* LSA timer parameters */
67 unsigned int lsa_minarrival
; /* LSA minimum arrival in milliseconds. */
70 unsigned int spf_delay
; /* SPF delay time. */
71 unsigned int spf_holdtime
; /* SPF hold time. */
72 unsigned int spf_max_holdtime
; /* SPF maximum-holdtime */
74 spf_hold_multiplier
; /* Adaptive multiplier for hold time */
75 unsigned int spf_reason
; /* reason bits while scheduling SPF */
77 struct timeval ts_spf
; /* SPF calculation time stamp. */
78 struct timeval ts_spf_duration
; /* Execution time of last SPF */
79 unsigned int last_spf_reason
; /* Last SPF reason */
82 struct thread
*t_spf_calc
; /* SPF calculation timer. */
83 struct thread
*t_ase_calc
; /* ASE calculation timer. */
84 struct thread
*maxage_remover
;
85 struct thread
*t_distribute_update
; /* Distirbute update timer. */
87 u_int32_t ref_bandwidth
;
89 /* Distance parameters */
91 u_char distance_intra
;
92 u_char distance_inter
;
93 u_char distance_external
;
95 struct route_table
*distance_table
;
97 /* Used during ospf instance going down send LSDB
98 * update to neighbors immediatly */
99 uint8_t inst_shutdown
;
103 DECLARE_QOBJ_TYPE(ospf6
)
105 #define OSPF6_DISABLED 0x01
106 #define OSPF6_STUB_ROUTER 0x02
108 /* global pointer for OSPF top data structure */
109 extern struct ospf6
*ospf6
;
112 extern void ospf6_top_init(void);
113 extern void ospf6_delete(struct ospf6
*o
);
115 extern void ospf6_maxage_remove(struct ospf6
*o
);
117 #endif /* OSPF6_TOP_H */