]> git.proxmox.com Git - mirror_frr.git/blame - ospf6d/ospf6_top.h
yang: fix circular chain of leafrefs
[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
858f9c08 29 in_addr_t zebra_router_id;
78c6ba61
CS
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
7df1f362
K
43 char *name; /* VRF name */
44
d62a17ae 45 /* my router id */
858f9c08 46 in_addr_t router_id;
718e3744 47
d62a17ae 48 /* static router id */
858f9c08 49 in_addr_t router_id_static;
c8a440ec 50
d6927cf3
CS
51 struct in_addr router_id_zebra;
52
d62a17ae 53 /* start time */
54 struct timeval starttime;
718e3744 55
d62a17ae 56 /* list of areas */
57 struct list *area_list;
58 struct ospf6_area *backbone;
718e3744 59
d62a17ae 60 /* AS scope link state database */
61 struct ospf6_lsdb *lsdb;
62 struct ospf6_lsdb *lsdb_self;
718e3744 63
d62a17ae 64 struct ospf6_route_table *route_table;
65 struct ospf6_route_table *brouter_table;
508e53e2 66
d62a17ae 67 struct ospf6_route_table *external_table;
68 struct route_table *external_id_table;
d7c0a89a 69 uint32_t external_id;
508e53e2 70
d62a17ae 71 /* redistribute route-map */
72 struct {
73 char *name;
74 struct route_map *map;
75 } rmap[ZEBRA_ROUTE_MAX];
718e3744 76
d7c0a89a 77 uint8_t flag;
718e3744 78
c572fbfe 79 /* Configuration bitmask, refer to enum above */
d7c0a89a 80 uint8_t config_flags;
3d35ca48 81
d62a17ae 82 /* LSA timer parameters */
83 unsigned int lsa_minarrival; /* LSA minimum arrival in milliseconds. */
b6927875 84
d62a17ae 85 /* SPF parameters */
86 unsigned int spf_delay; /* SPF delay time. */
87 unsigned int spf_holdtime; /* SPF hold time. */
88 unsigned int spf_max_holdtime; /* SPF maximum-holdtime */
89 unsigned int
90 spf_hold_multiplier; /* Adaptive multiplier for hold time */
91 unsigned int spf_reason; /* reason bits while scheduling SPF */
3810e06e 92
d62a17ae 93 struct timeval ts_spf; /* SPF calculation time stamp. */
94 struct timeval ts_spf_duration; /* Execution time of last SPF */
95 unsigned int last_spf_reason; /* Last SPF reason */
3810e06e 96
7df1f362 97 int fd;
d62a17ae 98 /* Threads */
99 struct thread *t_spf_calc; /* SPF calculation timer. */
100 struct thread *t_ase_calc; /* ASE calculation timer. */
101 struct thread *maxage_remover;
856ae1eb 102 struct thread *t_distribute_update; /* Distirbute update timer. */
7df1f362 103 struct thread *t_ospf6_receive; /* OSPF6 receive timer */
fd500689 104
d7c0a89a 105 uint32_t ref_bandwidth;
baff583e 106
d62a17ae 107 /* Distance parameters */
d7c0a89a
QY
108 uint8_t distance_all;
109 uint8_t distance_intra;
110 uint8_t distance_inter;
111 uint8_t distance_external;
baff583e 112
d62a17ae 113 struct route_table *distance_table;
ae19c240 114
76249532
CS
115 /* Used during ospf instance going down send LSDB
116 * update to neighbors immediatly */
117 uint8_t inst_shutdown;
118
d62a17ae 119 QOBJ_FIELDS
718e3744 120};
ae19c240 121DECLARE_QOBJ_TYPE(ospf6)
718e3744 122
508e53e2 123#define OSPF6_DISABLED 0x01
f41b4a02 124#define OSPF6_STUB_ROUTER 0x02
718e3744 125
508e53e2 126/* global pointer for OSPF top data structure */
127extern struct ospf6 *ospf6;
78c6ba61 128extern struct ospf6_master *om6;
718e3744 129
508e53e2 130/* prototypes */
78c6ba61 131extern void ospf6_master_init(void);
d62a17ae 132extern void ospf6_top_init(void);
133extern void ospf6_delete(struct ospf6 *o);
78c6ba61 134extern void ospf6_router_id_update(void);
718e3744 135
d62a17ae 136extern void ospf6_maxage_remove(struct ospf6 *o);
7df1f362 137extern void ospf6_instance_create(const char *name);
508e53e2 138
718e3744 139#endif /* OSPF6_TOP_H */