* [libnetfilter_queue PATCH 2/4] Convert kernel to userspace types
@ 2015-05-16 12:33 Felix Janda
0 siblings, 0 replies; only message in thread
From: Felix Janda @ 2015-05-16 12:33 UTC (permalink / raw)
To: netfilter-devel
Signed-off-by: Felix Janda <felix.janda@posteo.de>
---
include/libnetfilter_queue/linux_nfnetlink_queue.h | 52 +++++++++++-----------
1 file changed, 26 insertions(+), 26 deletions(-)
diff --git a/include/libnetfilter_queue/linux_nfnetlink_queue.h b/include/libnetfilter_queue/linux_nfnetlink_queue.h
index 5b6ae95..71cc599 100644
--- a/include/libnetfilter_queue/linux_nfnetlink_queue.h
+++ b/include/libnetfilter_queue/linux_nfnetlink_queue.h
@@ -18,49 +18,49 @@ enum nfqnl_msg_types {
};
struct nfqnl_msg_packet_hdr {
- __be32 packet_id; /* unique ID of packet in queue */
- __be16 hw_protocol; /* hw protocol (network order) */
- __u8 hook; /* netfilter hook */
+ uint32_t packet_id; /* unique ID of packet in queue */
+ uint16_t hw_protocol; /* hw protocol (network order) */
+ uint8_t hook; /* netfilter hook */
} __attribute__ ((packed));
struct nfqnl_msg_packet_hw {
- __be16 hw_addrlen;
- __u16 _pad;
- __u8 hw_addr[8];
+ uint16_t hw_addrlen;
+ uint16_t _pad;
+ uint8_t hw_addr[8];
};
struct nfqnl_msg_packet_timestamp {
- __aligned_be64 sec;
- __aligned_be64 usec;
+ aligned_u64 sec;
+ aligned_u64 usec;
};
enum nfqnl_attr_type {
NFQA_UNSPEC,
NFQA_PACKET_HDR,
NFQA_VERDICT_HDR, /* nfqnl_msg_verdict_hrd */
- NFQA_MARK, /* __u32 nfmark */
+ NFQA_MARK, /* uint32_t nfmark */
NFQA_TIMESTAMP, /* nfqnl_msg_packet_timestamp */
- NFQA_IFINDEX_INDEV, /* __u32 ifindex */
- NFQA_IFINDEX_OUTDEV, /* __u32 ifindex */
- NFQA_IFINDEX_PHYSINDEV, /* __u32 ifindex */
- NFQA_IFINDEX_PHYSOUTDEV, /* __u32 ifindex */
+ NFQA_IFINDEX_INDEV, /* uint32_t ifindex */
+ NFQA_IFINDEX_OUTDEV, /* uint32_t ifindex */
+ NFQA_IFINDEX_PHYSINDEV, /* uint32_t ifindex */
+ NFQA_IFINDEX_PHYSOUTDEV, /* uint32_t ifindex */
NFQA_HWADDR, /* nfqnl_msg_packet_hw */
NFQA_PAYLOAD, /* opaque data payload */
NFQA_CT, /* nf_conntrack_netlink.h */
NFQA_CT_INFO, /* enum ip_conntrack_info */
- NFQA_CAP_LEN, /* __u32 length of captured packet */
- NFQA_SKB_INFO, /* __u32 skb meta information */
+ NFQA_CAP_LEN, /* uint32_t length of captured packet */
+ NFQA_SKB_INFO, /* uint32_t skb meta information */
NFQA_EXP, /* nf_conntrack_netlink.h */
- NFQA_UID, /* __u32 sk uid */
- NFQA_GID, /* __u32 sk gid */
+ NFQA_UID, /* uint32_t sk uid */
+ NFQA_GID, /* uint32_t sk gid */
__NFQA_MAX
};
#define NFQA_MAX (__NFQA_MAX - 1)
struct nfqnl_msg_verdict_hdr {
- __be32 verdict;
- __be32 id;
+ uint32_t verdict;
+ uint32_t id;
};
@@ -73,9 +73,9 @@ enum nfqnl_msg_config_cmds {
};
struct nfqnl_msg_config_cmd {
- __u8 command; /* nfqnl_msg_config_cmds */
- __u8 _pad;
- __be16 pf; /* AF_xxx for PF_[UN]BIND */
+ uint8_t command; /* nfqnl_msg_config_cmds */
+ uint8_t _pad;
+ uint16_t pf; /* AF_xxx for PF_[UN]BIND */
};
enum nfqnl_config_mode {
@@ -85,8 +85,8 @@ enum nfqnl_config_mode {
};
struct nfqnl_msg_config_params {
- __be32 copy_range;
- __u8 copy_mode; /* enum nfqnl_config_mode */
+ uint32_t copy_range;
+ uint8_t copy_mode; /* enum nfqnl_config_mode */
} __attribute__ ((packed));
@@ -94,9 +94,9 @@ enum nfqnl_attr_config {
NFQA_CFG_UNSPEC,
NFQA_CFG_CMD, /* nfqnl_msg_config_cmd */
NFQA_CFG_PARAMS, /* nfqnl_msg_config_params */
- NFQA_CFG_QUEUE_MAXLEN, /* __u32 */
+ NFQA_CFG_QUEUE_MAXLEN, /* uint32_t */
NFQA_CFG_MASK, /* identify which flags to change */
- NFQA_CFG_FLAGS, /* value of these flags (__u32) */
+ NFQA_CFG_FLAGS, /* value of these flags (uint32_t) */
__NFQA_CFG_MAX
};
#define NFQA_CFG_MAX (__NFQA_CFG_MAX-1)
--
2.3.6
^ permalink raw reply related [flat|nested] only message in thread
only message in thread, other threads:[~2015-05-16 12:34 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-05-16 12:33 [libnetfilter_queue PATCH 2/4] Convert kernel to userspace types Felix Janda
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.