You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

103 lines
3.1 KiB

  1. From 614d8b6cfb969c6102ef320de22b1eb199efce2a Mon Sep 17 00:00:00 2001
  2. From: Felix Janda <felix.janda@posteo.de>
  3. Date: Sat, 16 May 2015 13:37:53 +0200
  4. Subject: include: Sync with current kernel headers
  5. Signed-off-by: Felix Janda <felix.janda@posteo.de>
  6. Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
  7. ---
  8. include/libnetfilter_log/linux_nfnetlink_log.h | 51 +++++++++++++-------------
  9. 1 file changed, 25 insertions(+), 26 deletions(-)
  10. --- a/include/libnetfilter_log/linux_nfnetlink_log.h
  11. +++ b/include/libnetfilter_log/linux_nfnetlink_log.h
  12. @@ -20,33 +20,31 @@ enum nfulnl_msg_types {
  13. };
  14. struct nfulnl_msg_packet_hdr {
  15. - u_int16_t hw_protocol; /* hw protocol (network order) */
  16. - u_int8_t hook; /* netfilter hook */
  17. - u_int8_t _pad;
  18. -} __attribute__ ((packed));
  19. + __be16 hw_protocol; /* hw protocol (network order) */
  20. + __u8 hook; /* netfilter hook */
  21. + __u8 _pad;
  22. +};
  23. struct nfulnl_msg_packet_hw {
  24. - u_int16_t hw_addrlen;
  25. - u_int16_t _pad;
  26. - u_int8_t hw_addr[8];
  27. -} __attribute__ ((packed));
  28. + __be16 hw_addrlen;
  29. + __u16 _pad;
  30. + __u8 hw_addr[8];
  31. +};
  32. struct nfulnl_msg_packet_timestamp {
  33. - aligned_u64 sec;
  34. - aligned_u64 usec;
  35. -} __attribute__ ((packed));
  36. -
  37. -#define NFULNL_PREFIXLEN 30 /* just like old log target */
  38. + __aligned_be64 sec;
  39. + __aligned_be64 usec;
  40. +};
  41. enum nfulnl_attr_type {
  42. NFULA_UNSPEC,
  43. NFULA_PACKET_HDR,
  44. - NFULA_MARK, /* u_int32_t nfmark */
  45. + NFULA_MARK, /* __u32 nfmark */
  46. NFULA_TIMESTAMP, /* nfulnl_msg_packet_timestamp */
  47. - NFULA_IFINDEX_INDEV, /* u_int32_t ifindex */
  48. - NFULA_IFINDEX_OUTDEV, /* u_int32_t ifindex */
  49. - NFULA_IFINDEX_PHYSINDEV, /* u_int32_t ifindex */
  50. - NFULA_IFINDEX_PHYSOUTDEV, /* u_int32_t ifindex */
  51. + NFULA_IFINDEX_INDEV, /* __u32 ifindex */
  52. + NFULA_IFINDEX_OUTDEV, /* __u32 ifindex */
  53. + NFULA_IFINDEX_PHYSINDEV, /* __u32 ifindex */
  54. + NFULA_IFINDEX_PHYSOUTDEV, /* __u32 ifindex */
  55. NFULA_HWADDR, /* nfulnl_msg_packet_hw */
  56. NFULA_PAYLOAD, /* opaque data payload */
  57. NFULA_PREFIX, /* string prefix */
  58. @@ -71,23 +69,23 @@ enum nfulnl_msg_config_cmds {
  59. };
  60. struct nfulnl_msg_config_cmd {
  61. - u_int8_t command; /* nfulnl_msg_config_cmds */
  62. + __u8 command; /* nfulnl_msg_config_cmds */
  63. } __attribute__ ((packed));
  64. struct nfulnl_msg_config_mode {
  65. - u_int32_t copy_range;
  66. - u_int8_t copy_mode;
  67. - u_int8_t _pad;
  68. + __be32 copy_range;
  69. + __u8 copy_mode;
  70. + __u8 _pad;
  71. } __attribute__ ((packed));
  72. enum nfulnl_attr_config {
  73. NFULA_CFG_UNSPEC,
  74. NFULA_CFG_CMD, /* nfulnl_msg_config_cmd */
  75. NFULA_CFG_MODE, /* nfulnl_msg_config_mode */
  76. - NFULA_CFG_NLBUFSIZ, /* u_int32_t buffer size */
  77. - NFULA_CFG_TIMEOUT, /* u_int32_t in 1/100 s */
  78. - NFULA_CFG_QTHRESH, /* u_int32_t */
  79. - NFULA_CFG_FLAGS, /* u_int16_t */
  80. + NFULA_CFG_NLBUFSIZ, /* __u32 buffer size */
  81. + NFULA_CFG_TIMEOUT, /* __u32 in 1/100 s */
  82. + NFULA_CFG_QTHRESH, /* __u32 */
  83. + NFULA_CFG_FLAGS, /* __u16 */
  84. __NFULA_CFG_MAX
  85. };
  86. #define NFULA_CFG_MAX (__NFULA_CFG_MAX -1)
  87. @@ -95,6 +93,7 @@ enum nfulnl_attr_config {
  88. #define NFULNL_COPY_NONE 0x00
  89. #define NFULNL_COPY_META 0x01
  90. #define NFULNL_COPY_PACKET 0x02
  91. +/* 0xff is reserved, don't use it for new copy modes. */
  92. #define NFULNL_CFG_F_SEQ 0x0001
  93. #define NFULNL_CFG_F_SEQ_GLOBAL 0x0002