]>
Commit | Line | Data |
---|---|---|
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 | * | |
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_SPF_H | |
23 | #define OSPF6_SPF_H | |
24 | ||
508e53e2 | 25 | /* Debug option */ |
26 | extern unsigned char conf_debug_ospf6_spf; | |
3b68735f | 27 | #define OSPF6_DEBUG_SPF_PROCESS 0x01 |
28 | #define OSPF6_DEBUG_SPF_TIME 0x02 | |
2680aa2b | 29 | #define OSPF6_DEBUG_SPF_DATABASE 0x04 |
508e53e2 | 30 | #define OSPF6_DEBUG_SPF_ON(level) \ |
31 | (conf_debug_ospf6_spf |= (level)) | |
32 | #define OSPF6_DEBUG_SPF_OFF(level) \ | |
33 | (conf_debug_ospf6_spf &= ~(level)) | |
34 | #define IS_OSPF6_DEBUG_SPF(level) \ | |
35 | (conf_debug_ospf6_spf & OSPF6_DEBUG_SPF_ ## level) | |
718e3744 | 36 | |
37 | /* Transit Vertex */ | |
38 | struct ospf6_vertex | |
39 | { | |
40 | /* type of this vertex */ | |
41 | u_int8_t type; | |
42 | ||
43 | /* Vertex Identifier */ | |
508e53e2 | 44 | struct prefix vertex_id; |
718e3744 | 45 | |
46 | /* Identifier String */ | |
508e53e2 | 47 | char name[128]; |
48 | ||
49 | /* Associated Area */ | |
50 | struct ospf6_area *area; | |
718e3744 | 51 | |
52 | /* Associated LSA */ | |
53 | struct ospf6_lsa *lsa; | |
54 | ||
508e53e2 | 55 | /* Distance from Root (i.e. Cost) */ |
56 | u_int32_t cost; | |
718e3744 | 57 | |
508e53e2 | 58 | /* Router hops to this node */ |
59 | u_char hops; | |
718e3744 | 60 | |
61 | /* nexthops to this node */ | |
508e53e2 | 62 | struct ospf6_nexthop nexthop[OSPF6_MULTI_PATH_LIMIT]; |
718e3744 | 63 | |
64 | /* capability bits */ | |
508e53e2 | 65 | u_char capability; |
718e3744 | 66 | |
67 | /* Optional capabilities */ | |
508e53e2 | 68 | u_char options[3]; |
69 | ||
70 | /* For tree display */ | |
71 | struct ospf6_vertex *parent; | |
52dc7ee6 | 72 | struct list *child_list; |
718e3744 | 73 | }; |
74 | ||
75 | #define OSPF6_VERTEX_TYPE_ROUTER 0x01 | |
76 | #define OSPF6_VERTEX_TYPE_NETWORK 0x02 | |
508e53e2 | 77 | #define VERTEX_IS_TYPE(t, v) \ |
78 | ((v)->type == OSPF6_VERTEX_TYPE_ ## t ? 1 : 0) | |
718e3744 | 79 | |
6ac29a51 PJ |
80 | extern void ospf6_spf_table_finish (struct ospf6_route_table *result_table); |
81 | extern void ospf6_spf_calculation (u_int32_t router_id, | |
82 | struct ospf6_route_table *result_table, | |
83 | struct ospf6_area *oa); | |
84 | extern void ospf6_spf_schedule (struct ospf6_area *oa); | |
85 | ||
86 | extern void ospf6_spf_display_subtree (struct vty *vty, const char *prefix, | |
87 | int rest, struct ospf6_vertex *v); | |
88 | ||
89 | extern int config_write_ospf6_debug_spf (struct vty *vty); | |
90 | extern void install_element_ospf6_debug_spf (void); | |
91 | extern void ospf6_spf_init (void); | |
718e3744 | 92 | |
93 | #endif /* OSPF6_SPF_H */ | |
94 |