nf_internals.h 1.3 KB

12345678910111213141516171819202122232425262728293031323334353637
  1. /* SPDX-License-Identifier: GPL-2.0 */
  2. #ifndef _NF_INTERNALS_H
  3. #define _NF_INTERNALS_H
  4. #include <linux/list.h>
  5. #include <linux/skbuff.h>
  6. #include <linux/netdevice.h>
  7. /* nf_conntrack_netlink.c: applied on tuple filters */
  8. #define CTA_FILTER_F_CTA_IP_SRC (1 << 0)
  9. #define CTA_FILTER_F_CTA_IP_DST (1 << 1)
  10. #define CTA_FILTER_F_CTA_TUPLE_ZONE (1 << 2)
  11. #define CTA_FILTER_F_CTA_PROTO_NUM (1 << 3)
  12. #define CTA_FILTER_F_CTA_PROTO_SRC_PORT (1 << 4)
  13. #define CTA_FILTER_F_CTA_PROTO_DST_PORT (1 << 5)
  14. #define CTA_FILTER_F_CTA_PROTO_ICMP_TYPE (1 << 6)
  15. #define CTA_FILTER_F_CTA_PROTO_ICMP_CODE (1 << 7)
  16. #define CTA_FILTER_F_CTA_PROTO_ICMP_ID (1 << 8)
  17. #define CTA_FILTER_F_CTA_PROTO_ICMPV6_TYPE (1 << 9)
  18. #define CTA_FILTER_F_CTA_PROTO_ICMPV6_CODE (1 << 10)
  19. #define CTA_FILTER_F_CTA_PROTO_ICMPV6_ID (1 << 11)
  20. #define CTA_FILTER_F_MAX (1 << 12)
  21. #define CTA_FILTER_F_ALL (CTA_FILTER_F_MAX-1)
  22. #define CTA_FILTER_FLAG(ctattr) CTA_FILTER_F_ ## ctattr
  23. /* nf_queue.c */
  24. void nf_queue_nf_hook_drop(struct net *net);
  25. /* nf_log.c */
  26. int __init netfilter_log_init(void);
  27. /* core.c */
  28. void nf_hook_entries_delete_raw(struct nf_hook_entries __rcu **pp,
  29. const struct nf_hook_ops *reg);
  30. int nf_hook_entries_insert_raw(struct nf_hook_entries __rcu **pp,
  31. const struct nf_hook_ops *reg);
  32. #endif