Skip to contentSkip to conversation

Using kernel ip_tables headers in C++

DISCUSSION Philipp Kerling 1 participant 1 message Mar 15, 2015 netfilter

lore
Share & tools
lore
#0 lore raw

Good day,

the current iptables headers do not allow the inclusion in C++ code because of some pointer arithmetic issues in include/linux/netfilter_ipv4/ip_tables.h and include/linux/netfilter_ipv6/ip6_tables.h. Now there is a patch available already at
https://marc.info/?l=netfilter-devel&m=134906873228460 that was submitted two years ago. What is the current state on this? IMHO, it should be trivial to apply and does not have any downsides or side-effects. It's only a "clarification" of what the current code does in C mode anyway. But it would make C++ developers very happy. GCC is nice enough to only output warnings, but CLang isn't. It just bails out with "error: arithmetic on a pointer to void".

Regards
Philipp Kerling