bgp_nexthop.h 1.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657
  1. /* BGP nexthop scan
  2. Copyright (C) 2000 Kunihiro Ishiguro
  3. This file is part of GNU Zebra.
  4. GNU Zebra is free software; you can redistribute it and/or modify it
  5. under the terms of the GNU General Public License as published by the
  6. Free Software Foundation; either version 2, or (at your option) any
  7. later version.
  8. GNU Zebra is distributed in the hope that it will be useful, but
  9. WITHOUT ANY WARRANTY; without even the implied warranty of
  10. MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
  11. General Public License for more details.
  12. You should have received a copy of the GNU General Public License
  13. along with GNU Zebra; see the file COPYING. If not, write to the Free
  14. Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
  15. 02111-1307, USA. */
  16. #ifndef _QUAGGA_BGP_NEXTHOP_H
  17. #define _QUAGGA_BGP_NEXTHOP_H
  18. #define BGP_SCAN_INTERVAL_DEFAULT 60
  19. #define BGP_IMPORT_INTERVAL_DEFAULT 15
  20. /* BGP nexthop cache value structure. */
  21. struct bgp_nexthop_cache
  22. {
  23. /* This nexthop exists in IGP. */
  24. u_char valid;
  25. /* Nexthop is changed. */
  26. u_char changed;
  27. /* Nexthop is changed. */
  28. u_char metricchanged;
  29. /* IGP route's metric. */
  30. u_int32_t metric;
  31. /* Nexthop number and nexthop linked list.*/
  32. u_char nexthop_num;
  33. struct nexthop *nexthop;
  34. };
  35. extern void bgp_scan_init (void);
  36. extern int bgp_nexthop_lookup (afi_t, struct peer *peer, struct bgp_info *,
  37. int *, int *);
  38. extern void bgp_connected_add (struct connected *c);
  39. extern void bgp_connected_delete (struct connected *c);
  40. extern int bgp_multiaccess_check_v4 (struct in_addr, char *);
  41. extern int bgp_config_write_scan_time (struct vty *);
  42. extern int bgp_nexthop_check_ebgp (afi_t, struct attr *);
  43. extern int bgp_nexthop_self (afi_t, struct attr *);
  44. #endif /* _QUAGGA_BGP_NEXTHOP_H */