pim_oil.h 1.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354
  1. /*
  2. PIM for Quagga
  3. Copyright (C) 2008 Everton da Silva Marques
  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_OIL_H
  19. #define PIM_OIL_H
  20. #include "pim_mroute.h"
  21. #define PIM_OIF_FLAG_PROTO_IGMP (1 << 0) /* bitmask 1 */
  22. #define PIM_OIF_FLAG_PROTO_PIM (1 << 1) /* bitmask 2 */
  23. #define PIM_OIF_FLAG_PROTO_ANY (3) /* bitmask (1 | 2) */
  24. /*
  25. qpim_channel_oil_list holds a list of struct channel_oil.
  26. Each channel_oil.oil is used to control an (S,G) entry in the Kernel
  27. Multicast Forwarding Cache.
  28. */
  29. struct channel_oil {
  30. struct mfcctl oil;
  31. int oil_size;
  32. int oil_ref_count;
  33. time_t oif_creation[MAXVIFS];
  34. uint32_t oif_flags[MAXVIFS];
  35. };
  36. void pim_channel_oil_free(struct channel_oil *c_oil);
  37. struct channel_oil *pim_channel_oil_add(struct in_addr group_addr,
  38. struct in_addr source_addr,
  39. int input_vif_index);
  40. void pim_channel_oil_del(struct channel_oil *c_oil);
  41. #endif /* PIM_OIL_H */