pim_static.h 1.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748
  1. /*
  2. PIM for Quagga: add the ability to configure multicast static routes
  3. Copyright (C) 2014 Nathan Bahr, ATCorp
  4. This program is free software; you can redistribute it and/or modify
  5. it under the terms of the GNU General Public License as published by
  6. the Free Software Foundation; either version 2 of the License, or
  7. (at your option) any later version.
  8. This program 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 this program; see the file COPYING; if not, write to the
  14. Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston,
  15. MA 02110-1301 USA
  16. $QuaggaId: $Format:%an, %ai, %h$ $
  17. */
  18. #ifndef PIM_STATIC_H_
  19. #define PIM_STATIC_H_
  20. #include <zebra.h>
  21. #include "pim_mroute.h"
  22. #include "if.h"
  23. struct static_route {
  24. /* Each static route is unique by these pair of addresses */
  25. struct in_addr group;
  26. struct in_addr source;
  27. unsigned int iif;
  28. unsigned char oif_ttls[MAXVIFS];
  29. int oif_count;
  30. struct mfcctl mc;
  31. time_t creation[MAXVIFS];
  32. };
  33. void pim_static_route_free(struct static_route *s_route);
  34. int pim_static_add(struct interface *iif, struct interface *oif, struct in_addr group, struct in_addr source);
  35. int pim_static_del(struct interface *iif, struct interface *oif, struct in_addr group, struct in_addr source);
  36. int pim_static_write_mroute (struct vty *vty, struct interface *ifp);
  37. #endif /* PIM_STATIC_H_ */