]>
Commit | Line | Data |
---|---|---|
eb5d44eb | 1 | /* |
2 | * IS-IS Rout(e)ing protocol - isis_route.h | |
3 | * | |
4 | * Copyright (C) 2001,2002 Sampo Saaristo | |
d62a17ae | 5 | * Tampere University of Technology |
eb5d44eb | 6 | * Institute of Communications Engineering |
7 | * | |
8 | * based on ../ospf6d/ospf6_route.[ch] | |
9 | * by Yasuhiro Ohara | |
10 | * | |
d62a17ae | 11 | * This program is free software; you can redistribute it and/or modify it |
12 | * under the terms of the GNU General Public Licenseas published by the Free | |
13 | * Software Foundation; either version 2 of the License, or (at your option) | |
eb5d44eb | 14 | * any later version. |
15 | * | |
d62a17ae | 16 | * This program is distributed in the hope that it will be useful,but WITHOUT |
17 | * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or | |
18 | * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for | |
eb5d44eb | 19 | * more details. |
896014f4 DL |
20 | * |
21 | * You should have received a copy of the GNU General Public License along | |
22 | * with this program; see the file COPYING; if not, write to the Free Software | |
23 | * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA | |
eb5d44eb | 24 | */ |
25 | #ifndef _ZEBRA_ISIS_ROUTE_H | |
26 | #define _ZEBRA_ISIS_ROUTE_H | |
27 | ||
d62a17ae | 28 | struct isis_nexthop6 { |
29 | ifindex_t ifindex; | |
30 | struct in6_addr ip6; | |
31 | struct in6_addr router_address6; | |
32 | unsigned int lock; | |
eb5d44eb | 33 | }; |
eb5d44eb | 34 | |
d62a17ae | 35 | struct isis_nexthop { |
36 | ifindex_t ifindex; | |
37 | struct in_addr ip; | |
38 | struct in_addr router_address; | |
39 | unsigned int lock; | |
eb5d44eb | 40 | }; |
41 | ||
d62a17ae | 42 | struct isis_route_info { |
3f045a08 JB |
43 | #define ISIS_ROUTE_FLAG_ACTIVE 0x01 /* active route for the prefix */ |
44 | #define ISIS_ROUTE_FLAG_ZEBRA_SYNCED 0x02 /* set when route synced to zebra */ | |
45 | #define ISIS_ROUTE_FLAG_ZEBRA_RESYNC 0x04 /* set when route needs to sync */ | |
d7c0a89a QY |
46 | uint8_t flag; |
47 | uint32_t cost; | |
48 | uint32_t depth; | |
d62a17ae | 49 | struct list *nexthops; |
50 | struct list *nexthops6; | |
eb5d44eb | 51 | }; |
52 | ||
321c1bbb CF |
53 | struct isis_route_info *isis_route_create(struct prefix *prefix, |
54 | struct prefix_ipv6 *src_p, | |
55 | uint32_t cost, | |
d7c0a89a | 56 | uint32_t depth, |
d62a17ae | 57 | struct list *adjacencies, |
3dace42d CF |
58 | struct isis_area *area, |
59 | struct route_table *table); | |
eb5d44eb | 60 | |
3dace42d CF |
61 | /* Walk the given table and install new routes to zebra and remove old ones. |
62 | * route status is tracked using ISIS_ROUTE_FLAG_ACTIVE */ | |
63 | void isis_route_verify_table(struct isis_area *area, | |
64 | struct route_table *table); | |
65 | ||
66 | /* Same as isis_route_verify_table, but merge L1 and L2 routes before */ | |
67 | void isis_route_verify_merge(struct isis_area *area, | |
68 | struct route_table *level1_table, | |
69 | struct route_table *level2_table); | |
70 | ||
71 | /* Unset ISIS_ROUTE_FLAG_ACTIVE on all routes. Used before running spf. */ | |
d62a17ae | 72 | void isis_route_invalidate_table(struct isis_area *area, |
73 | struct route_table *table); | |
eb5d44eb | 74 | |
75 | #endif /* _ZEBRA_ISIS_ROUTE_H */ |