Re: libnetfilter_conntrack.so and C++

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi,

Le lundi 25 septembre 2006 à 10:51 +0200, denis stauffer a écrit :
> Hi everybody,
> 
> I'm trying to develop a C++ programm wich uses
> libnetfilter_conntrack.so library. I've encountered a problem when
> linking the library : the called funtions in libnetfilter_contrack are
> not recognized.
> If some one has succeeded to use the libnetfilter_conntrack library
> with g++, please can you gve me some information about how to do it.
> 
> Thank's in advance,
> Denis

Coud you try the following patch ?

BR,
-- 
Éric Leblond, eleblond@xxxxxx
Téléphone : 01 44 89 46 39, Fax : 01 44 89 45 01
INL, http://www.inl.fr
Index: include/libnetfilter_conntrack/libnetfilter_conntrack.h
===================================================================
--- include/libnetfilter_conntrack/libnetfilter_conntrack.h	(revision 6670)
+++ include/libnetfilter_conntrack/libnetfilter_conntrack.h	(working copy)
@@ -8,6 +8,18 @@
 #ifndef _LIBNETFILTER_CONNTRACK_H_
 #define _LIBNETFILTER_CONNTRACK_H_
 
+
+/* Disable inline keyword when compiling in strict ANSI conformance */
+#if defined(__STRICT_ANSI__) && !defined(__cplusplus)
+#  define inline
+#endif
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+
+
 #include <netinet/in.h>
 #include <libnfnetlink/linux_nfnetlink.h>
 #include <libnfnetlink/libnfnetlink.h>
@@ -332,6 +344,8 @@
 extern void nfct_build_tuple(struct nfnlhdr *req, int size, 
 			     struct nfct_tuple *t, int type);
 
+#ifdef __cplusplus
+}
+#endif
 
-
 #endif	/* _LIBNETFILTER_CONNTRACK_H_ */

Attachment: signature.asc
Description: Ceci est une partie de message =?ISO-8859-1?Q?num=E9riquement?= =?ISO-8859-1?Q?_sign=E9e?=


[Index of Archives]     [Linux Netfilter Development]     [Linux Kernel Networking Development]     [Netem]     [Berkeley Packet Filter]     [Linux Kernel Development]     [Advanced Routing & Traffice Control]     [Bugtraq]

  Powered by Linux