This patch enables to include the conntrack information together with the packet that is sent to user-space via NFLOG, then a user-space program can acquire NATed information by this NFULA_CT attribute. Including the conntrack information is optional, you can set it via NFULNL_CFG_F_CONNTRACK flag with the NFULA_CFG_FLAGS attribute like NFQUEUE.
Showing the changes to include/uapi (1 of 3 files). Show all
Unified · Split
| @@ -51,6 +51,8 @@ enum nfulnl_attr_type { · 50 unmodified lines | ||
| 51 | 51 | NFULA_HWTYPE, /* hardware type */ |
| 52 | 52 | NFULA_HWHEADER, /* hardware header */ |
| 53 | 53 | NFULA_HWLEN, /* hardware header length */ |
| 54 | + NFULA_CT, /* nf_conntrack_netlink.h */ | |
| 55 | + NFULA_CT_INFO, /* enum ip_conntrack_info */ | |
| 54 | 56 | |
| 55 | 57 | __NFULA_MAX |
| 56 | 58 | }; |
| @@ -93,5 +95,6 @@ enum nfulnl_attr_config { · 36 unmodified lines | ||
| 93 | 95 | |
| 94 | 96 | #define NFULNL_CFG_F_SEQ 0x0001 |
| 95 | 97 | #define NFULNL_CFG_F_SEQ_GLOBAL 0x0002 |
| 98 | +#define NFULNL_CFG_F_CONNTRACK 0x0004 | |
| 96 | 99 | |
| 97 | 100 | #endif /* _NFNETLINK_LOG_H */ |