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
29 in_addr_t zebra_router_id
;
32 /* ospf6->config_flags */
34 OSPF6_LOG_ADJACENCY_CHANGES
= (1 << 0),
35 OSPF6_LOG_ADJACENCY_DETAIL
= (1 << 1),
38 /* OSPFv3 top level data structure */
40 /* The relevant vrf_id */
46 /* static router id */
47 in_addr_t router_id_static
;
49 struct in_addr router_id_zebra
;
52 struct timeval starttime
;
55 struct list
*area_list
;
56 struct ospf6_area
*backbone
;
58 /* AS scope link state database */
59 struct ospf6_lsdb
*lsdb
;
60 struct ospf6_lsdb
*lsdb_self
;
62 struct ospf6_route_table
*route_table
;
63 struct ospf6_route_table
*brouter_table
;
65 struct ospf6_route_table
*external_table
;
66 struct route_table
*external_id_table
;
69 /* redistribute route-map */
72 struct route_map
*map
;
73 } rmap
[ZEBRA_ROUTE_MAX
];
77 /* Configuration bitmask, refer to enum above */
80 /* LSA timer parameters */
81 unsigned int lsa_minarrival
; /* LSA minimum arrival in milliseconds. */
84 unsigned int spf_delay
; /* SPF delay time. */
85 unsigned int spf_holdtime
; /* SPF hold time. */
86 unsigned int spf_max_holdtime
; /* SPF maximum-holdtime */
88 spf_hold_multiplier
; /* Adaptive multiplier for hold time */
89 unsigned int spf_reason
; /* reason bits while scheduling SPF */
91 struct timeval ts_spf
; /* SPF calculation time stamp. */
92 struct timeval ts_spf_duration
; /* Execution time of last SPF */
93 unsigned int last_spf_reason
; /* Last SPF reason */
96 struct thread
*t_spf_calc
; /* SPF calculation timer. */
97 struct thread
*t_ase_calc
; /* ASE calculation timer. */
98 struct thread
*maxage_remover
;
99 struct thread
*t_distribute_update
; /* Distirbute update timer. */
101 uint32_t ref_bandwidth
;
103 /* Distance parameters */
104 uint8_t distance_all
;
105 uint8_t distance_intra
;
106 uint8_t distance_inter
;
107 uint8_t distance_external
;
109 struct route_table
*distance_table
;
111 /* Used during ospf instance going down send LSDB
112 * update to neighbors immediatly */
113 uint8_t inst_shutdown
;
117 DECLARE_QOBJ_TYPE(ospf6
)
119 #define OSPF6_DISABLED 0x01
120 #define OSPF6_STUB_ROUTER 0x02
122 /* global pointer for OSPF top data structure */
123 extern struct ospf6
*ospf6
;
124 extern struct ospf6_master
*om6
;
127 extern void ospf6_master_init(void);
128 extern void ospf6_top_init(void);
129 extern void ospf6_delete(struct ospf6
*o
);
130 extern void ospf6_router_id_update(void);
132 extern void ospf6_maxage_remove(struct ospf6
*o
);
134 #endif /* OSPF6_TOP_H */