Debian Codegraph @

include/netlink/netfilter/nfnl.h

raw
1 /* SPDX-License-Identifier: LGPL-2.1-only */
2 /*
3 * Copyright (c) 2003-2008 Thomas Graf <[email protected]>
4 * Copyright (c) 2007 Philip Craig <[email protected]>
5 * Copyright (c) 2007 Secure Computing Corporation
6 */
7
8 #ifndef NETLINK_NFNL_H_
9 #define NETLINK_NFNL_H_
10
11 #include <netlink/netlink.h>
12
13 #ifdef __cplusplus
14 extern "C" {
15 #endif
16
17 #define NFNL_HDRLEN NLMSG_ALIGN(sizeof(struct nfgenmsg))
18 #define NFNLMSG_TYPE(subsys, subtype) (((subsys) << 8) | (subtype))
19
20 extern int nfnl_connect(struct nl_sock *);
21
22 extern uint8_t nfnlmsg_subsys(struct nlmsghdr *);
23 extern uint8_t nfnlmsg_subtype(struct nlmsghdr *);
24 extern uint8_t nfnlmsg_family(struct nlmsghdr *);
25 extern uint16_t nfnlmsg_res_id(struct nlmsghdr *);
26
27 extern int nfnl_send_simple(struct nl_sock *, uint8_t, uint8_t,
28 int, uint8_t, uint16_t);
29 extern struct nl_msg * nfnlmsg_alloc_simple(uint8_t, uint8_t, int,
30 uint8_t, uint16_t);
31 extern int nfnlmsg_put(struct nl_msg *, uint32_t, uint32_t,
32 uint8_t, uint8_t, int, uint8_t, uint16_t);
33
34 #ifdef __cplusplus
35 }
36 #endif
37
38 #endif