2 * netlink/nfnl/nfnl.h Netfilter Netlink
4 * This library is free software; you can redistribute it and/or
5 * modify it under the terms of the GNU Lesser General Public
6 * License as published by the Free Software Foundation version 2.1
9 * Copyright (c) 2003-2008 Thomas Graf <tgraf@suug.ch>
10 * Copyright (c) 2007 Philip Craig <philipc@snapgear.com>
11 * Copyright (c) 2007 Secure Computing Corporation
14 #ifndef NETLINK_NFNL_H_
15 #define NETLINK_NFNL_H_
17 #include <netlink/netlink.h>
23 #define NFNL_HDRLEN NLMSG_ALIGN(sizeof(struct nfgenmsg))
24 #define NFNLMSG_TYPE(subsys, subtype) (((subsys) << 8) | (subtype))
26 extern int nfnl_connect(struct nl_sock *);
28 extern uint8_t nfnlmsg_subsys(struct nlmsghdr *);
29 extern uint8_t nfnlmsg_subtype(struct nlmsghdr *);
30 extern uint8_t nfnlmsg_family(struct nlmsghdr *);
31 extern uint16_t nfnlmsg_res_id(struct nlmsghdr *);
33 extern int nfnl_send_simple(struct nl_sock *, uint8_t, uint8_t,
34 int, uint8_t, uint16_t);
35 extern struct nl_msg * nfnlmsg_alloc_simple(uint8_t, uint8_t, int,
37 extern int nfnlmsg_put(struct nl_msg *, uint32_t, uint32_t,
38 uint8_t, uint8_t, int, uint8_t, uint16_t);