bgp_zebra.h 2.2 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253
  1. /* zebra connection and redistribute fucntions.
  2. Copyright (C) 1999 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
  14. Free Software Foundation, Inc., 59 Temple Place - Suite 330,
  15. Boston, MA 02111-1307, USA. */
  16. #ifndef _QUAGGA_BGP_ZEBRA_H
  17. #define _QUAGGA_BGP_ZEBRA_H
  18. #define BGP_NEXTHOP_BUF_SIZE (8 * sizeof (struct in_addr *))
  19. #define BGP_IFINDICES_BUF_SIZE (8 * sizeof (unsigned int))
  20. extern struct stream *bgp_nexthop_buf;
  21. extern struct in_addr router_id_zebra;
  22. extern struct stream *bgp_ifindices_buf;
  23. extern void bgp_zebra_init (struct thread_master *master);
  24. extern void bgp_zebra_destroy (void);
  25. extern int bgp_if_update_all (void);
  26. extern int bgp_config_write_maxpaths (struct vty *, struct bgp *, afi_t,
  27. safi_t, int *);
  28. extern int bgp_config_write_redistribute (struct vty *, struct bgp *, afi_t, safi_t,
  29. int *);
  30. extern void bgp_zebra_announce (struct prefix *, struct bgp_info *, struct bgp *, safi_t);
  31. extern void bgp_zebra_withdraw (struct prefix *, struct bgp_info *, safi_t);
  32. extern int bgp_redistribute_set (struct bgp *, afi_t, int);
  33. extern int bgp_redistribute_rmap_set (struct bgp *, afi_t, int, const char *);
  34. extern int bgp_redistribute_metric_set (struct bgp *, afi_t, int, u_int32_t);
  35. extern int bgp_redistribute_unset (struct bgp *, afi_t, int);
  36. extern struct interface *if_lookup_by_ipv4 (struct in_addr *);
  37. extern struct interface *if_lookup_by_ipv4_exact (struct in_addr *);
  38. extern struct interface *if_lookup_by_ipv6 (struct in6_addr *);
  39. extern struct interface *if_lookup_by_ipv6_exact (struct in6_addr *);
  40. extern int bgp_zebra_num_connects(void);
  41. #endif /* _QUAGGA_BGP_ZEBRA_H */