Skip to contentSkip to conversation

add extern "C" {..} to libnetfilter_conntrack headers?

DISCUSSION Phil Dibowitz 2 participants 2 messages Mar 14, 2007 netfilter

lore
Share & tools
lore
#0 lore raw

Is there a reason that there aren't extern "C" {} enclosures in the libnetfilter_conntrack header files?

My app is C++, and currently I put the libnetfilter #include's in an extern "C" {}, but this should probably be in the header files so any C++ app can easily use the library.

I can submit a patch if it's desired, but I thought I'd ask if there was a reason it wasn't there first.

Signature · 9 lines
Phil Dibowitz                             [email protected]
Open Source software and tech docs        Insanity Palace of Metallica
http://www.phildev.net/                   http://www.ipom.com/

"Never write it in C if you can do it in 'awk';
 Never do it in 'awk' if 'sed' can handle it;
 Never use 'sed' when 'tr' can do the job;
 Never invoke 'tr' when 'cat' is sufficient;
 Avoid using 'cat' whenever possible" -- Taylor's Laws of Programming
#1 lore raw
Quoted 2 lines · Phil Dibowitz

Is there a reason that there aren't extern "C" {} enclosures in the libnetfilter_conntrack header files?

Well, the only reason that I can find is that I think that low-level stuff should be written in C, however someone could come here and say that wants to write a graphical interface for conntrack in qt, which is not so low-level stuff.

If nobody objects here, send me the patch. I'd accept a similar patch for the other libnetfilter_* libraries. Thanks.

Signature · 1 line
The dawn of the fourth age of Linux firewalling is coming; a time of great struggle and heroic deeds -- J.Kadlecsik got inspired by J.Morris