jardin | eb5d44e | 2003-12-23 08:09:43 +0000 | [diff] [blame] | 1 | /* |
| 2 | * IS-IS Rout(e)ing protocol - isis_route.h |
| 3 | * |
| 4 | * Copyright (C) 2001,2002 Sampo Saaristo |
| 5 | * Tampere University of Technology |
| 6 | * Institute of Communications Engineering |
| 7 | * |
| 8 | * based on ../ospf6d/ospf6_route.[ch] |
| 9 | * by Yasuhiro Ohara |
| 10 | * |
| 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) |
| 14 | * any later version. |
| 15 | * |
| 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 |
| 19 | * more details. |
| 20 | |
| 21 | * You should have received a copy of the GNU General Public License along |
| 22 | * with this program; if not, write to the Free Software Foundation, Inc., |
| 23 | * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. |
| 24 | */ |
| 25 | #ifndef _ZEBRA_ISIS_ROUTE_H |
| 26 | #define _ZEBRA_ISIS_ROUTE_H |
| 27 | |
| 28 | #ifdef HAVE_IPV6 |
hasso | f390d2c | 2004-09-10 20:48:21 +0000 | [diff] [blame] | 29 | struct isis_nexthop6 |
| 30 | { |
Paul Jakma | 9099f9b | 2016-01-18 10:12:10 +0000 | [diff] [blame] | 31 | ifindex_t ifindex; |
jardin | eb5d44e | 2003-12-23 08:09:43 +0000 | [diff] [blame] | 32 | struct in6_addr ip6; |
Subbaiah Venkata | e38e0df | 2012-03-27 23:48:05 -0700 | [diff] [blame] | 33 | struct in6_addr router_address6; |
jardin | eb5d44e | 2003-12-23 08:09:43 +0000 | [diff] [blame] | 34 | unsigned int lock; |
| 35 | }; |
| 36 | #endif /* HAVE_IPV6 */ |
| 37 | |
hasso | f390d2c | 2004-09-10 20:48:21 +0000 | [diff] [blame] | 38 | struct isis_nexthop |
| 39 | { |
Paul Jakma | 9099f9b | 2016-01-18 10:12:10 +0000 | [diff] [blame] | 40 | ifindex_t ifindex; |
jardin | eb5d44e | 2003-12-23 08:09:43 +0000 | [diff] [blame] | 41 | struct in_addr ip; |
Subbaiah Venkata | e38e0df | 2012-03-27 23:48:05 -0700 | [diff] [blame] | 42 | struct in_addr router_address; |
jardin | eb5d44e | 2003-12-23 08:09:43 +0000 | [diff] [blame] | 43 | unsigned int lock; |
| 44 | }; |
| 45 | |
hasso | f390d2c | 2004-09-10 20:48:21 +0000 | [diff] [blame] | 46 | struct isis_route_info |
| 47 | { |
Josh Bailey | 3f045a0 | 2012-03-24 08:35:20 -0700 | [diff] [blame] | 48 | #define ISIS_ROUTE_FLAG_ACTIVE 0x01 /* active route for the prefix */ |
| 49 | #define ISIS_ROUTE_FLAG_ZEBRA_SYNCED 0x02 /* set when route synced to zebra */ |
| 50 | #define ISIS_ROUTE_FLAG_ZEBRA_RESYNC 0x04 /* set when route needs to sync */ |
hasso | f390d2c | 2004-09-10 20:48:21 +0000 | [diff] [blame] | 51 | u_char flag; |
jardin | eb5d44e | 2003-12-23 08:09:43 +0000 | [diff] [blame] | 52 | u_int32_t cost; |
| 53 | u_int32_t depth; |
| 54 | struct list *nexthops; |
| 55 | #ifdef HAVE_IPV6 |
| 56 | struct list *nexthops6; |
hasso | f390d2c | 2004-09-10 20:48:21 +0000 | [diff] [blame] | 57 | #endif /* HAVE_IPV6 */ |
jardin | eb5d44e | 2003-12-23 08:09:43 +0000 | [diff] [blame] | 58 | }; |
| 59 | |
hasso | f390d2c | 2004-09-10 20:48:21 +0000 | [diff] [blame] | 60 | struct isis_route_info *isis_route_create (struct prefix *prefix, |
| 61 | u_int32_t cost, u_int32_t depth, |
| 62 | struct list *adjacencies, |
hasso | fac1f7c | 2005-09-26 18:26:26 +0000 | [diff] [blame] | 63 | struct isis_area *area, int level); |
jardin | eb5d44e | 2003-12-23 08:09:43 +0000 | [diff] [blame] | 64 | |
Josh Bailey | 3f045a0 | 2012-03-24 08:35:20 -0700 | [diff] [blame] | 65 | void isis_route_validate (struct isis_area *area); |
| 66 | void isis_route_invalidate_table (struct isis_area *area, |
| 67 | struct route_table *table); |
| 68 | void isis_route_invalidate (struct isis_area *area); |
jardin | eb5d44e | 2003-12-23 08:09:43 +0000 | [diff] [blame] | 69 | |
| 70 | #endif /* _ZEBRA_ISIS_ROUTE_H */ |