]> git.proxmox.com Git - mirror_frr.git/blame - ospf6d/ospf6_top.h
Merge pull request #5785 from ton31337/fix/replace_gtsm_hops_to_readable_macros
[mirror_frr.git] / ospf6d / ospf6_top.h
CommitLineData
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
27struct ospf6_master {
28
29 uint32_t zebra_router_id;
30};
31
c572fbfe
DL
32/* ospf6->config_flags */
33enum {
34 OSPF6_LOG_ADJACENCY_CHANGES = (1 << 0),
35 OSPF6_LOG_ADJACENCY_DETAIL = (1 << 1),
36};
37
508e53e2 38/* OSPFv3 top level data structure */
d62a17ae 39struct ospf6 {
cf319495
DS
40 /* The relevant vrf_id */
41 vrf_id_t vrf_id;
42
d62a17ae 43 /* my router id */
d7c0a89a 44 uint32_t router_id;
718e3744 45
d62a17ae 46 /* static router id */
d7c0a89a 47 uint32_t router_id_static;
c8a440ec 48
d6927cf3
CS
49 struct in_addr router_id_zebra;
50
d62a17ae 51 /* start time */
52 struct timeval starttime;
718e3744 53
d62a17ae 54 /* list of areas */
55 struct list *area_list;
56 struct ospf6_area *backbone;
718e3744 57
d62a17ae 58 /* AS scope link state database */
59 struct ospf6_lsdb *lsdb;
60 struct ospf6_lsdb *lsdb_self;
718e3744 61
d62a17ae 62 struct ospf6_route_table *route_table;
63 struct ospf6_route_table *brouter_table;
508e53e2 64
d62a17ae 65 struct ospf6_route_table *external_table;
66 struct route_table *external_id_table;
d7c0a89a 67 uint32_t external_id;
508e53e2 68
d62a17ae 69 /* redistribute route-map */
70 struct {
71 char *name;
72 struct route_map *map;
73 } rmap[ZEBRA_ROUTE_MAX];
718e3744 74
d7c0a89a 75 uint8_t flag;
718e3744 76
c572fbfe 77 /* Configuration bitmask, refer to enum above */
d7c0a89a 78 uint8_t config_flags;
3d35ca48 79
d62a17ae 80 /* LSA timer parameters */
81 unsigned int lsa_minarrival; /* LSA minimum arrival in milliseconds. */
b6927875 82
d62a17ae 83 /* SPF parameters */
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 */
87 unsigned int
88 spf_hold_multiplier; /* Adaptive multiplier for hold time */
89 unsigned int spf_reason; /* reason bits while scheduling SPF */
3810e06e 90
d62a17ae 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 */
3810e06e 94
d62a17ae 95 /* Threads */
96 struct thread *t_spf_calc; /* SPF calculation timer. */
97 struct thread *t_ase_calc; /* ASE calculation timer. */
98 struct thread *maxage_remover;
856ae1eb 99 struct thread *t_distribute_update; /* Distirbute update timer. */
fd500689 100
d7c0a89a 101 uint32_t ref_bandwidth;
baff583e 102
d62a17ae 103 /* Distance parameters */
d7c0a89a
QY
104 uint8_t distance_all;
105 uint8_t distance_intra;
106 uint8_t distance_inter;
107 uint8_t distance_external;
baff583e 108
d62a17ae 109 struct route_table *distance_table;
ae19c240 110
76249532
CS
111 /* Used during ospf instance going down send LSDB
112 * update to neighbors immediatly */
113 uint8_t inst_shutdown;
114
d62a17ae 115 QOBJ_FIELDS
718e3744 116};
ae19c240 117DECLARE_QOBJ_TYPE(ospf6)
718e3744 118
508e53e2 119#define OSPF6_DISABLED 0x01
f41b4a02 120#define OSPF6_STUB_ROUTER 0x02
718e3744 121
508e53e2 122/* global pointer for OSPF top data structure */
123extern struct ospf6 *ospf6;
78c6ba61 124extern struct ospf6_master *om6;
718e3744 125
508e53e2 126/* prototypes */
78c6ba61 127extern void ospf6_master_init(void);
d62a17ae 128extern void ospf6_top_init(void);
129extern void ospf6_delete(struct ospf6 *o);
78c6ba61 130extern void ospf6_router_id_update(void);
718e3744 131
d62a17ae 132extern void ospf6_maxage_remove(struct ospf6 *o);
508e53e2 133
718e3744 134#endif /* OSPF6_TOP_H */