]>
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 | * | |
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. | |
20 | */ | |
21 | ||
22 | #ifndef OSPF6_TOP_H | |
23 | #define OSPF6_TOP_H | |
24 | ||
ae19c240 | 25 | #include "qobj.h" |
718e3744 | 26 | #include "routemap.h" |
27 | ||
508e53e2 | 28 | /* OSPFv3 top level data structure */ |
718e3744 | 29 | struct ospf6 |
30 | { | |
508e53e2 | 31 | /* my router id */ |
32 | u_int32_t router_id; | |
718e3744 | 33 | |
c8a440ec | 34 | /* static router id */ |
35 | u_int32_t router_id_static; | |
36 | ||
718e3744 | 37 | /* start time */ |
38 | struct timeval starttime; | |
39 | ||
718e3744 | 40 | /* list of areas */ |
52dc7ee6 | 41 | struct list *area_list; |
3810e06e | 42 | struct ospf6_area *backbone; |
718e3744 | 43 | |
44 | /* AS scope link state database */ | |
45 | struct ospf6_lsdb *lsdb; | |
6452df09 | 46 | struct ospf6_lsdb *lsdb_self; |
718e3744 | 47 | |
508e53e2 | 48 | struct ospf6_route_table *route_table; |
049207c3 | 49 | struct ospf6_route_table *brouter_table; |
508e53e2 | 50 | |
51 | struct ospf6_route_table *external_table; | |
52 | struct route_table *external_id_table; | |
53 | u_int32_t external_id; | |
54 | ||
718e3744 | 55 | /* redistribute route-map */ |
56 | struct | |
57 | { | |
58 | char *name; | |
59 | struct route_map *map; | |
60 | } rmap[ZEBRA_ROUTE_MAX]; | |
61 | ||
508e53e2 | 62 | u_char flag; |
718e3744 | 63 | |
3d35ca48 DD |
64 | /* Configured flags */ |
65 | u_char config_flags; | |
66 | #define OSPF6_LOG_ADJACENCY_CHANGES (1 << 0) | |
67 | #define OSPF6_LOG_ADJACENCY_DETAIL (1 << 1) | |
68 | ||
b6927875 DS |
69 | /* LSA timer parameters */ |
70 | unsigned int lsa_minarrival; /* LSA minimum arrival in milliseconds. */ | |
71 | ||
3810e06e DD |
72 | /* SPF parameters */ |
73 | unsigned int spf_delay; /* SPF delay time. */ | |
74 | unsigned int spf_holdtime; /* SPF hold time. */ | |
75 | unsigned int spf_max_holdtime; /* SPF maximum-holdtime */ | |
76 | unsigned int spf_hold_multiplier; /* Adaptive multiplier for hold time */ | |
a0edf674 | 77 | unsigned int spf_reason; /* reason bits while scheduling SPF */ |
3810e06e DD |
78 | |
79 | struct timeval ts_spf; /* SPF calculation time stamp. */ | |
80 | struct timeval ts_spf_duration; /* Execution time of last SPF */ | |
a0edf674 | 81 | unsigned int last_spf_reason; /* Last SPF reason */ |
3810e06e DD |
82 | |
83 | /* Threads */ | |
84 | struct thread *t_spf_calc; /* SPF calculation timer. */ | |
85 | struct thread *t_ase_calc; /* ASE calculation timer. */ | |
718e3744 | 86 | struct thread *maxage_remover; |
fd500689 VB |
87 | |
88 | u_int32_t ref_bandwidth; | |
baff583e MZ |
89 | |
90 | /* Distance parameters */ | |
91 | u_char distance_all; | |
92 | u_char distance_intra; | |
93 | u_char distance_inter; | |
94 | u_char distance_external; | |
95 | ||
96 | struct route_table *distance_table; | |
ae19c240 DL |
97 | |
98 | QOBJ_FIELDS | |
718e3744 | 99 | }; |
ae19c240 | 100 | DECLARE_QOBJ_TYPE(ospf6) |
718e3744 | 101 | |
508e53e2 | 102 | #define OSPF6_DISABLED 0x01 |
f41b4a02 | 103 | #define OSPF6_STUB_ROUTER 0x02 |
718e3744 | 104 | |
508e53e2 | 105 | /* global pointer for OSPF top data structure */ |
106 | extern struct ospf6 *ospf6; | |
718e3744 | 107 | |
508e53e2 | 108 | /* prototypes */ |
6ac29a51 | 109 | extern void ospf6_top_init (void); |
ae2254aa | 110 | extern void ospf6_delete (struct ospf6 *o); |
718e3744 | 111 | |
6ac29a51 | 112 | extern void ospf6_maxage_remove (struct ospf6 *o); |
508e53e2 | 113 | |
718e3744 | 114 | #endif /* OSPF6_TOP_H */ |
115 | ||
508e53e2 | 116 |