isis_redist.h 1.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960
  1. /*
  2. * IS-IS Rout(e)ing protocol - isis_redist.h
  3. *
  4. * Copyright (C) 2013-2015 Christian Franke <chris@opensourcerouting.org>
  5. *
  6. * This program 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 Free
  8. * Software Foundation; either version 2 of the License, or (at your option)
  9. * any later version.
  10. *
  11. * This program is distributed in the hope that it will be useful,but WITHOUT
  12. * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
  13. * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
  14. * more details.
  15. * You should have received a copy of the GNU General Public License along
  16. * with this program; if not, write to the Free Software Foundation, Inc.,
  17. * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
  18. */
  19. #ifndef ISIS_REDIST_H
  20. #define ISIS_REDIST_H
  21. #define REDIST_PROTOCOL_COUNT 2
  22. #define DEFAULT_ROUTE ZEBRA_ROUTE_MAX
  23. #define DEFAULT_ORIGINATE 1
  24. #define DEFAULT_ORIGINATE_ALWAYS 2
  25. struct isis_ext_info
  26. {
  27. int origin;
  28. uint32_t metric;
  29. u_char distance;
  30. };
  31. struct isis_redist
  32. {
  33. int redist;
  34. uint32_t metric;
  35. char *map_name;
  36. struct route_map *map;
  37. };
  38. struct isis_area;
  39. struct prefix;
  40. struct vty;
  41. struct route_table *get_ext_reach(struct isis_area *area,
  42. int family, int level);
  43. void isis_redist_add(int type, struct prefix *p,
  44. u_char distance, uint32_t metric);
  45. void isis_redist_delete(int type, struct prefix *p);
  46. int isis_redist_config_write(struct vty *vty, struct isis_area *area,
  47. int family);
  48. void isis_redist_init(void);
  49. void isis_redist_area_finish(struct isis_area *area);
  50. #endif