netfilter_ipv4.h 1.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748
  1. /* IPv4-specific defines for netfilter.
  2. * (C)1998 Rusty Russell -- This code is GPL.
  3. */
  4. #ifndef __LINUX_IP_NETFILTER_H
  5. #define __LINUX_IP_NETFILTER_H
  6. #include <uapi/linux/netfilter_ipv4.h>
  7. /* Extra routing may needed on local out, as the QUEUE target never returns
  8. * control to the table.
  9. */
  10. struct ip_rt_info {
  11. __be32 daddr;
  12. __be32 saddr;
  13. u_int8_t tos;
  14. u_int32_t mark;
  15. };
  16. int ip_route_me_harder(struct net *net, struct sk_buff *skb, unsigned addr_type);
  17. struct nf_queue_entry;
  18. #ifdef CONFIG_INET
  19. __sum16 nf_ip_checksum(struct sk_buff *skb, unsigned int hook,
  20. unsigned int dataoff, u_int8_t protocol);
  21. int nf_ip_route(struct net *net, struct dst_entry **dst, struct flowi *fl,
  22. bool strict);
  23. int nf_ip_reroute(struct sk_buff *skb, const struct nf_queue_entry *entry);
  24. #else
  25. static inline __sum16 nf_ip_checksum(struct sk_buff *skb, unsigned int hook,
  26. unsigned int dataoff, u_int8_t protocol)
  27. {
  28. return 0;
  29. }
  30. static inline int nf_ip_route(struct net *net, struct dst_entry **dst,
  31. struct flowi *fl, bool strict)
  32. {
  33. return -EOPNOTSUPP;
  34. }
  35. static inline int nf_ip_reroute(struct sk_buff *skb,
  36. const struct nf_queue_entry *entry)
  37. {
  38. return -EOPNOTSUPP;
  39. }
  40. #endif /* CONFIG_INET */
  41. #endif /*__LINUX_IP_NETFILTER_H*/