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