paul | 718e374 | 2002-12-13 20:15:29 +0000 | [diff] [blame] | 1 | /* |
hasso | 508e53e | 2004-05-18 18:57:06 +0000 | [diff] [blame] | 2 | * Copyright (C) 2003 Yasuhiro Ohara |
paul | 718e374 | 2002-12-13 20:15:29 +0000 | [diff] [blame] | 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 | |
| 25 | #include "routemap.h" |
| 26 | |
hasso | 508e53e | 2004-05-18 18:57:06 +0000 | [diff] [blame] | 27 | /* OSPFv3 top level data structure */ |
paul | 718e374 | 2002-12-13 20:15:29 +0000 | [diff] [blame] | 28 | struct ospf6 |
| 29 | { |
hasso | 508e53e | 2004-05-18 18:57:06 +0000 | [diff] [blame] | 30 | /* my router id */ |
| 31 | u_int32_t router_id; |
paul | 718e374 | 2002-12-13 20:15:29 +0000 | [diff] [blame] | 32 | |
hasso | c8a440e | 2004-10-11 17:02:40 +0000 | [diff] [blame] | 33 | /* static router id */ |
| 34 | u_int32_t router_id_static; |
| 35 | |
paul | 718e374 | 2002-12-13 20:15:29 +0000 | [diff] [blame] | 36 | /* start time */ |
| 37 | struct timeval starttime; |
| 38 | |
paul | 718e374 | 2002-12-13 20:15:29 +0000 | [diff] [blame] | 39 | /* list of areas */ |
hasso | 52dc7ee | 2004-09-23 19:18:23 +0000 | [diff] [blame] | 40 | struct list *area_list; |
Dinesh Dutt | 3810e06 | 2013-08-24 07:54:09 +0000 | [diff] [blame] | 41 | struct ospf6_area *backbone; |
paul | 718e374 | 2002-12-13 20:15:29 +0000 | [diff] [blame] | 42 | |
| 43 | /* AS scope link state database */ |
| 44 | struct ospf6_lsdb *lsdb; |
hasso | 6452df0 | 2004-08-15 05:52:07 +0000 | [diff] [blame] | 45 | struct ospf6_lsdb *lsdb_self; |
paul | 718e374 | 2002-12-13 20:15:29 +0000 | [diff] [blame] | 46 | |
hasso | 508e53e | 2004-05-18 18:57:06 +0000 | [diff] [blame] | 47 | struct ospf6_route_table *route_table; |
hasso | 049207c | 2004-08-04 20:02:13 +0000 | [diff] [blame] | 48 | struct ospf6_route_table *brouter_table; |
hasso | 508e53e | 2004-05-18 18:57:06 +0000 | [diff] [blame] | 49 | |
| 50 | struct ospf6_route_table *external_table; |
| 51 | struct route_table *external_id_table; |
| 52 | u_int32_t external_id; |
| 53 | |
paul | 718e374 | 2002-12-13 20:15:29 +0000 | [diff] [blame] | 54 | /* redistribute route-map */ |
| 55 | struct |
| 56 | { |
| 57 | char *name; |
| 58 | struct route_map *map; |
| 59 | } rmap[ZEBRA_ROUTE_MAX]; |
| 60 | |
hasso | 508e53e | 2004-05-18 18:57:06 +0000 | [diff] [blame] | 61 | u_char flag; |
paul | 718e374 | 2002-12-13 20:15:29 +0000 | [diff] [blame] | 62 | |
Dinesh Dutt | 3d35ca4 | 2013-08-26 03:40:16 +0000 | [diff] [blame^] | 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 | |
Dinesh Dutt | 3810e06 | 2013-08-24 07:54:09 +0000 | [diff] [blame] | 68 | /* SPF parameters */ |
| 69 | unsigned int spf_delay; /* SPF delay time. */ |
| 70 | unsigned int spf_holdtime; /* SPF hold time. */ |
| 71 | unsigned int spf_max_holdtime; /* SPF maximum-holdtime */ |
| 72 | unsigned int spf_hold_multiplier; /* Adaptive multiplier for hold time */ |
| 73 | |
| 74 | struct timeval ts_spf; /* SPF calculation time stamp. */ |
| 75 | struct timeval ts_spf_duration; /* Execution time of last SPF */ |
| 76 | |
| 77 | /* Threads */ |
| 78 | struct thread *t_spf_calc; /* SPF calculation timer. */ |
| 79 | struct thread *t_ase_calc; /* ASE calculation timer. */ |
paul | 718e374 | 2002-12-13 20:15:29 +0000 | [diff] [blame] | 80 | struct thread *maxage_remover; |
paul | 718e374 | 2002-12-13 20:15:29 +0000 | [diff] [blame] | 81 | }; |
hasso | 508e53e | 2004-05-18 18:57:06 +0000 | [diff] [blame] | 82 | |
| 83 | #define OSPF6_DISABLED 0x01 |
Dinesh Dutt | f41b4a0 | 2013-08-24 08:00:37 +0000 | [diff] [blame] | 84 | #define OSPF6_STUB_ROUTER 0x02 |
hasso | 508e53e | 2004-05-18 18:57:06 +0000 | [diff] [blame] | 85 | |
| 86 | /* global pointer for OSPF top data structure */ |
paul | 718e374 | 2002-12-13 20:15:29 +0000 | [diff] [blame] | 87 | extern struct ospf6 *ospf6; |
| 88 | |
| 89 | /* prototypes */ |
Paul Jakma | 6ac29a5 | 2008-08-15 13:45:30 +0100 | [diff] [blame] | 90 | extern void ospf6_top_init (void); |
Tom Goff | ae2254a | 2010-11-10 13:01:41 -0800 | [diff] [blame] | 91 | extern void ospf6_delete (struct ospf6 *o); |
paul | 718e374 | 2002-12-13 20:15:29 +0000 | [diff] [blame] | 92 | |
Paul Jakma | 6ac29a5 | 2008-08-15 13:45:30 +0100 | [diff] [blame] | 93 | extern void ospf6_maxage_remove (struct ospf6 *o); |
hasso | 508e53e | 2004-05-18 18:57:06 +0000 | [diff] [blame] | 94 | |
paul | 718e374 | 2002-12-13 20:15:29 +0000 | [diff] [blame] | 95 | #endif /* OSPF6_TOP_H */ |
| 96 | |
hasso | 508e53e | 2004-05-18 18:57:06 +0000 | [diff] [blame] | 97 | |