pim.h 641 B

1234567891011121314151617181920212223242526272829303132
  1. #ifndef __LINUX_PIM_H
  2. #define __LINUX_PIM_H
  3. #include <asm/byteorder.h>
  4. /* Message types - V1 */
  5. #define PIM_V1_VERSION cpu_to_be32(0x10000000)
  6. #define PIM_V1_REGISTER 1
  7. /* Message types - V2 */
  8. #define PIM_VERSION 2
  9. #define PIM_REGISTER 1
  10. #define PIM_NULL_REGISTER cpu_to_be32(0x40000000)
  11. static inline bool ipmr_pimsm_enabled(void)
  12. {
  13. return IS_BUILTIN(CONFIG_IP_PIMSM_V1) || IS_BUILTIN(CONFIG_IP_PIMSM_V2);
  14. }
  15. /* PIMv2 register message header layout (ietf-draft-idmr-pimvsm-v2-00.ps */
  16. struct pimreghdr
  17. {
  18. __u8 type;
  19. __u8 reserved;
  20. __be16 csum;
  21. __be32 flags;
  22. };
  23. struct sk_buff;
  24. extern int pim_rcv_v1(struct sk_buff *);
  25. #endif