libnl
3.2.3
|
00001 /* 00002 * netlink/nfnl/nfnl.h Netfilter Netlink 00003 * 00004 * This library is free software; you can redistribute it and/or 00005 * modify it under the terms of the GNU Lesser General Public 00006 * License as published by the Free Software Foundation version 2.1 00007 * of the License. 00008 * 00009 * Copyright (c) 2003-2008 Thomas Graf <tgraf@suug.ch> 00010 * Copyright (c) 2007 Philip Craig <philipc@snapgear.com> 00011 * Copyright (c) 2007 Secure Computing Corporation 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_sock *); 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_sock *, 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