isis_route.h 2.3 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970
  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. * You should have received a copy of the GNU General Public License along
  21. * with this program; if not, write to the Free Software Foundation, Inc.,
  22. * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
  23. */
  24. #ifndef _ZEBRA_ISIS_ROUTE_H
  25. #define _ZEBRA_ISIS_ROUTE_H
  26. #ifdef HAVE_IPV6
  27. struct isis_nexthop6
  28. {
  29. ifindex_t ifindex;
  30. struct in6_addr ip6;
  31. struct in6_addr router_address6;
  32. unsigned int lock;
  33. };
  34. #endif /* HAVE_IPV6 */
  35. struct isis_nexthop
  36. {
  37. ifindex_t ifindex;
  38. struct in_addr ip;
  39. struct in_addr router_address;
  40. unsigned int lock;
  41. };
  42. struct isis_route_info
  43. {
  44. #define ISIS_ROUTE_FLAG_ACTIVE 0x01 /* active route for the prefix */
  45. #define ISIS_ROUTE_FLAG_ZEBRA_SYNCED 0x02 /* set when route synced to zebra */
  46. #define ISIS_ROUTE_FLAG_ZEBRA_RESYNC 0x04 /* set when route needs to sync */
  47. u_char flag;
  48. u_int32_t cost;
  49. u_int32_t depth;
  50. struct list *nexthops;
  51. #ifdef HAVE_IPV6
  52. struct list *nexthops6;
  53. #endif /* HAVE_IPV6 */
  54. };
  55. struct isis_route_info *isis_route_create (struct prefix *prefix,
  56. u_int32_t cost, u_int32_t depth,
  57. struct list *adjacencies,
  58. struct isis_area *area, int level);
  59. void isis_route_validate (struct isis_area *area);
  60. void isis_route_invalidate_table (struct isis_area *area,
  61. struct route_table *table);
  62. void isis_route_invalidate (struct isis_area *area);
  63. #endif /* _ZEBRA_ISIS_ROUTE_H */