00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014 #ifndef NETLINK_NFNL_H_
00015 #define NETLINK_NFNL_H_
00016
00017 #include <netlink/netlink.h>
00018
00019 #ifdef __cplusplus
00020 extern "C" {
00021 #endif
00022
00023 #define NFNL_HDRLEN NLMSG_ALIGN(sizeof(struct nfgenmsg))
00024 #define NFNLMSG_TYPE(subsys, subtype) (((subsys) << 8) | (subtype))
00025
00026 extern int nfnl_connect(struct nl_handle *);
00027
00028 extern uint8_t nfnlmsg_subsys(struct nlmsghdr *);
00029 extern uint8_t nfnlmsg_subtype(struct nlmsghdr *);
00030 extern uint8_t nfnlmsg_family(struct nlmsghdr *);
00031 extern uint16_t nfnlmsg_res_id(struct nlmsghdr *);
00032
00033 extern int nfnl_send_simple(struct nl_handle *, uint8_t, uint8_t,
00034 int, uint8_t, uint16_t);
00035 extern struct nl_msg * nfnlmsg_alloc_simple(uint8_t, uint8_t, int,
00036 uint8_t, uint16_t);
00037 extern int nfnlmsg_put(struct nl_msg *, uint32_t, uint32_t,
00038 uint8_t, uint8_t, int, uint8_t, uint16_t);
00039
00040 #ifdef __cplusplus
00041 }
00042 #endif
00043
00044 #endif