blob: 4c687563a103daeb61733c7f18f72e86ebbb4af4 [file] [log] [blame]
paul718e3742002-12-13 20:15:29 +00001/*
2 * OSPFv3 Top Level Data Structure
3 * Copyright (C) 1999 Yasuhiro Ohara
4 *
5 * This file is part of GNU Zebra.
6 *
7 * GNU Zebra is free software; you can redistribute it and/or modify it
8 * under the terms of the GNU General Public License as published by the
9 * Free Software Foundation; either version 2, or (at your option) any
10 * later version.
11 *
12 * GNU Zebra is distributed in the hope that it will be useful, but
13 * WITHOUT ANY WARRANTY; without even the implied warranty of
14 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
15 * General Public License for more details.
16 *
17 * You should have received a copy of the GNU General Public License
18 * along with GNU Zebra; see the file COPYING. If not, write to the
19 * Free Software Foundation, Inc., 59 Temple Place - Suite 330,
20 * Boston, MA 02111-1307, USA.
21 */
22
23#ifndef OSPF6_TOP_H
24#define OSPF6_TOP_H
25
26#include "routemap.h"
27
28/* ospfv3 top level data structure */
29struct ospf6
30{
31 /* process id */
32 u_long process_id;
33
34 /* start time */
35 struct timeval starttime;
36
37 /* ospf version must be 3 */
38 unsigned char version;
39
40 /* my router id */
41 u_int32_t router_id;
42
43 /* list of areas */
44 list area_list;
45
46 /* AS scope link state database */
47 struct ospf6_lsdb *lsdb;
48
49 /* redistribute route-map */
50 struct
51 {
52 char *name;
53 struct route_map *map;
54 } rmap[ZEBRA_ROUTE_MAX];
55
56 struct thread *t_route_calculation;
57 u_int stat_route_calculation_execed;
58
59 struct ospf6_route_table *route_table;
60 struct ospf6_route_table *topology_table;
61 struct ospf6_route_table *external_table;
62
63 void (*foreach_area) (struct ospf6 *, void *arg, int val,
64 void (*func) (void *, int, void *));
65 void (*foreach_if) (struct ospf6 *, void *arg, int val,
66 void (*func) (void *, int, void *));
67 void (*foreach_nei) (struct ospf6 *, void *arg, int val,
68 void (*func) (void *, int, void *));
69
70 struct thread *maxage_remover;
71
72 list nexthop_list;
73};
74
75extern struct ospf6 *ospf6;
76
77/* prototypes */
78int
79ospf6_top_count_neighbor_in_state (u_char state, struct ospf6 *o6);
80
81void
82ospf6_top_schedule_maxage_remover (void *arg, int val, struct ospf6 *o6);
83
84void ospf6_show (struct vty *);
85void ospf6_statistics_show (struct vty *vty, struct ospf6 *o6);
86
87struct ospf6 *ospf6_start ();
88void ospf6_stop ();
89
90void ospf6_delete (struct ospf6 *);
91int ospf6_is_asbr (struct ospf6 *);
92
93void ospf6_top_init ();
94
95#endif /* OSPF6_TOP_H */
96