libxtc.h 724 B

123456789101112131415161718192021222324252627282930313233
  1. #ifndef _LIBXTC_H
  2. #define _LIBXTC_H
  3. /* Library which manipulates filtering rules. */
  4. #include <libiptc/ipt_kernel_headers.h>
  5. #include <linux/netfilter/x_tables.h>
  6. #ifdef __cplusplus
  7. extern "C" {
  8. #endif
  9. #ifndef XT_MIN_ALIGN
  10. /* xt_entry has pointers and u_int64_t's in it, so if you align to
  11. it, you'll also align to any crazy matches and targets someone
  12. might write */
  13. #define XT_MIN_ALIGN (__alignof__(struct xt_entry))
  14. #endif
  15. #ifndef XT_ALIGN
  16. #define XT_ALIGN(s) (((s) + ((XT_MIN_ALIGN)-1)) & ~((XT_MIN_ALIGN)-1))
  17. #endif
  18. #define XTC_LABEL_ACCEPT "ACCEPT"
  19. #define XTC_LABEL_DROP "DROP"
  20. #define XTC_LABEL_QUEUE "QUEUE"
  21. #define XTC_LABEL_RETURN "RETURN"
  22. #ifdef __cplusplus
  23. }
  24. #endif
  25. #endif /* _LIBXTC_H */