]>
Commit | Line | Data |
---|---|---|
718e3744 | 1 | /* |
508e53e2 | 2 | * Copyright (C) 2003 Yasuhiro Ohara |
718e3744 | 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 | * | |
896014f4 DL |
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 | |
718e3744 | 19 | */ |
20 | ||
21 | #ifndef OSPF6_TOP_H | |
22 | #define OSPF6_TOP_H | |
23 | ||
ae19c240 | 24 | #include "qobj.h" |
718e3744 | 25 | #include "routemap.h" |
26 | ||
78c6ba61 CS |
27 | struct ospf6_master { |
28 | ||
29 | uint32_t zebra_router_id; | |
30 | }; | |
31 | ||
508e53e2 | 32 | /* OSPFv3 top level data structure */ |
d62a17ae | 33 | struct ospf6 { |
34 | /* my router id */ | |
35 | u_int32_t router_id; | |
718e3744 | 36 | |
d62a17ae | 37 | /* static router id */ |
38 | u_int32_t router_id_static; | |
c8a440ec | 39 | |
d6927cf3 CS |
40 | struct in_addr router_id_zebra; |
41 | ||
d62a17ae | 42 | /* start time */ |
43 | struct timeval starttime; | |
718e3744 | 44 | |
d62a17ae | 45 | /* list of areas */ |
46 | struct list *area_list; | |
47 | struct ospf6_area *backbone; | |
718e3744 | 48 | |
d62a17ae | 49 | /* AS scope link state database */ |
50 | struct ospf6_lsdb *lsdb; | |
51 | struct ospf6_lsdb *lsdb_self; | |
718e3744 | 52 | |
d62a17ae | 53 | struct ospf6_route_table *route_table; |
54 | struct ospf6_route_table *brouter_table; | |
508e53e2 | 55 | |
d62a17ae | 56 | struct ospf6_route_table *external_table; |
57 | struct route_table *external_id_table; | |
58 | u_int32_t external_id; | |
508e53e2 | 59 | |
d62a17ae | 60 | /* redistribute route-map */ |
61 | struct { | |
62 | char *name; | |
63 | struct route_map *map; | |
64 | } rmap[ZEBRA_ROUTE_MAX]; | |
718e3744 | 65 | |
d62a17ae | 66 | u_char flag; |
718e3744 | 67 | |
d62a17ae | 68 | /* Configured flags */ |
69 | u_char config_flags; | |
3d35ca48 DD |
70 | #define OSPF6_LOG_ADJACENCY_CHANGES (1 << 0) |
71 | #define OSPF6_LOG_ADJACENCY_DETAIL (1 << 1) | |
72 | ||
d62a17ae | 73 | /* LSA timer parameters */ |
74 | unsigned int lsa_minarrival; /* LSA minimum arrival in milliseconds. */ | |
b6927875 | 75 | |
d62a17ae | 76 | /* SPF parameters */ |
77 | unsigned int spf_delay; /* SPF delay time. */ | |
78 | unsigned int spf_holdtime; /* SPF hold time. */ | |
79 | unsigned int spf_max_holdtime; /* SPF maximum-holdtime */ | |
80 | unsigned int | |
81 | spf_hold_multiplier; /* Adaptive multiplier for hold time */ | |
82 | unsigned int spf_reason; /* reason bits while scheduling SPF */ | |
3810e06e | 83 | |
d62a17ae | 84 | struct timeval ts_spf; /* SPF calculation time stamp. */ |
85 | struct timeval ts_spf_duration; /* Execution time of last SPF */ | |
86 | unsigned int last_spf_reason; /* Last SPF reason */ | |
3810e06e | 87 | |
d62a17ae | 88 | /* Threads */ |
89 | struct thread *t_spf_calc; /* SPF calculation timer. */ | |
90 | struct thread *t_ase_calc; /* ASE calculation timer. */ | |
91 | struct thread *maxage_remover; | |
856ae1eb | 92 | struct thread *t_distribute_update; /* Distirbute update timer. */ |
fd500689 | 93 | |
d62a17ae | 94 | u_int32_t ref_bandwidth; |
baff583e | 95 | |
d62a17ae | 96 | /* Distance parameters */ |
97 | u_char distance_all; | |
98 | u_char distance_intra; | |
99 | u_char distance_inter; | |
100 | u_char distance_external; | |
baff583e | 101 | |
d62a17ae | 102 | struct route_table *distance_table; |
ae19c240 | 103 | |
76249532 CS |
104 | /* Used during ospf instance going down send LSDB |
105 | * update to neighbors immediatly */ | |
106 | uint8_t inst_shutdown; | |
107 | ||
d62a17ae | 108 | QOBJ_FIELDS |
718e3744 | 109 | }; |
ae19c240 | 110 | DECLARE_QOBJ_TYPE(ospf6) |
718e3744 | 111 | |
508e53e2 | 112 | #define OSPF6_DISABLED 0x01 |
f41b4a02 | 113 | #define OSPF6_STUB_ROUTER 0x02 |
718e3744 | 114 | |
508e53e2 | 115 | /* global pointer for OSPF top data structure */ |
116 | extern struct ospf6 *ospf6; | |
78c6ba61 | 117 | extern struct ospf6_master *om6; |
718e3744 | 118 | |
508e53e2 | 119 | /* prototypes */ |
78c6ba61 | 120 | extern void ospf6_master_init(void); |
d62a17ae | 121 | extern void ospf6_top_init(void); |
122 | extern void ospf6_delete(struct ospf6 *o); | |
78c6ba61 | 123 | extern void ospf6_router_id_update(void); |
718e3744 | 124 | |
d62a17ae | 125 | extern void ospf6_maxage_remove(struct ospf6 *o); |
508e53e2 | 126 | |
718e3744 | 127 | #endif /* OSPF6_TOP_H */ |