From: Phil Dibowitz <phil@ipom.com>
To: netfilter-devel@lists.netfilter.org
Subject: [PATCH] libnetfilter_conntrack: add extern C's to public headers
Date: Mon, 19 Mar 2007 23:07:52 -0700 [thread overview]
Message-ID: <45FF7A38.8090907@ipom.com> (raw)
[-- Attachment #1.1: Type: text/plain, Size: 742 bytes --]
The attached patch adds:
extern "C" {...}
to all of the public headers in libnetfilter_conntrack's public headers. It
is, of course, #ifdef __cplusplus'd.
This will make it more straight forward for C++ developers to use
libnetfilter_conntrack in their applications.
--
Phil Dibowitz phil@ipom.com
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
[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #1.2: libnetfilter_conntrack-0.0.50_extern_c.patch --]
[-- Type: text/x-patch; name="libnetfilter_conntrack-0.0.50_extern_c.patch", Size: 5072 bytes --]
--- libnetfilter_conntrack-0.0.50/include/libnetfilter_conntrack/libnetfilter_conntrack.h.orig 2007-03-19 22:44:24.000000000 -0700
+++ libnetfilter_conntrack-0.0.50/include/libnetfilter_conntrack/libnetfilter_conntrack.h 2007-03-19 23:04:09.000000000 -0700
@@ -13,6 +13,10 @@
#include <libnfnetlink/libnfnetlink.h>
#include <libnetfilter_conntrack/linux_nfnetlink_conntrack.h>
+#ifdef __cplusplus
+extern "C" {
+#endif
+
enum {
CONNTRACK = NFNL_SUBSYS_CTNETLINK,
EXPECT = NFNL_SUBSYS_CTNETLINK_EXP
@@ -549,4 +553,8 @@
void *req,
unsigned int size);
+#ifdef __cplusplus
+}
+#endif
+
#endif /* _LIBNETFILTER_CONNTRACK_H_ */
--- libnetfilter_conntrack-0.0.50/include/libnetfilter_conntrack/libnetfilter_conntrack_icmp.h.orig 2007-03-19 22:47:42.000000000 -0700
+++ libnetfilter_conntrack-0.0.50/include/libnetfilter_conntrack/libnetfilter_conntrack_icmp.h 2007-03-19 22:48:06.000000000 -0700
@@ -8,6 +8,10 @@
#ifndef _LIBNETFILTER_CONNTRACK_ICMP_H_
#define _LIBNETFILTER_CONNTRACK_ICMP_H_
+#ifdef __cplusplus
+extern "C" {
+#endif
+
enum icmp_flags {
ICMP_TYPE_BIT = 0,
ICMP_TYPE = (1 << ICMP_TYPE_BIT),
@@ -19,4 +23,8 @@
ICMP_ID = (1 << ICMP_ID_BIT)
};
+#ifdef __cplusplus
+}
+#endif
+
#endif
--- libnetfilter_conntrack-0.0.50/include/libnetfilter_conntrack/libnetfilter_conntrack_ipv4.h.orig 2007-03-19 22:48:16.000000000 -0700
+++ libnetfilter_conntrack-0.0.50/include/libnetfilter_conntrack/libnetfilter_conntrack_ipv4.h 2007-03-19 22:49:51.000000000 -0700
@@ -8,6 +8,10 @@
#ifndef _LIBNETFILTER_CONNTRACK_IPV4_H_
#define _LIBNETFILTER_CONNTRACK_IPV4_H_
+#ifdef __cplusplus
+extern "C" {
+#endif
+
enum ipv4_flags {
IPV4_ORIG_SRC_BIT = 0,
IPV4_ORIG_SRC = (1 << IPV4_ORIG_SRC_BIT),
@@ -26,4 +30,8 @@
IPV4_REPL = (IPV4_REPL_SRC | IPV4_REPL_DST)
};
+#ifdef __cplusplus
+}
+#endif
+
#endif
--- libnetfilter_conntrack-0.0.50/include/libnetfilter_conntrack/libnetfilter_conntrack_ipv6.h.orig 2007-03-19 22:49:57.000000000 -0700
+++ libnetfilter_conntrack-0.0.50/include/libnetfilter_conntrack/libnetfilter_conntrack_ipv6.h 2007-03-19 22:50:44.000000000 -0700
@@ -8,6 +8,10 @@
#ifndef _LIBNETFILTER_CONNTRACK_IPV6_H_
#define _LIBNETFILTER_CONNTRACK_IPV6_H_
+#ifdef __cplusplus
+extern "C" {
+#endif
+
enum ipv6_flags {
IPV6_ORIG_SRC_BIT = 0,
IPV6_ORIG_SRC = (1 << IPV6_ORIG_SRC_BIT),
@@ -26,4 +30,8 @@
IPV6_REPL = (IPV6_REPL_SRC | IPV6_REPL_DST)
};
+#ifdef __cplusplus
+}
+#endif
+
#endif
--- libnetfilter_conntrack-0.0.50/include/libnetfilter_conntrack/libnetfilter_conntrack_sctp.h.orig 2007-03-19 22:50:52.000000000 -0700
+++ libnetfilter_conntrack-0.0.50/include/libnetfilter_conntrack/libnetfilter_conntrack_sctp.h 2007-03-19 22:51:28.000000000 -0700
@@ -8,6 +8,10 @@
#ifndef _LIBNETFILTER_CONNTRACK_SCTP_H_
#define _LIBNETFILTER_CONNTRACK_SCTP_H_
+#ifdef __cplusplus
+extern "C" {
+#endif
+
enum sctp_flags {
SCTP_ORIG_SPORT_BIT = 0,
SCTP_ORIG_SPORT = (1 << SCTP_ORIG_SPORT_BIT),
@@ -37,4 +41,8 @@
SCTP_EXPTUPLE_DPORT = (1 << SCTP_EXPTUPLE_DPORT_BIT)
};
+#ifdef __cplusplus
+}
+#endif
+
#endif
--- libnetfilter_conntrack-0.0.50/include/libnetfilter_conntrack/libnetfilter_conntrack_tcp.h.orig 2007-03-19 22:51:33.000000000 -0700
+++ libnetfilter_conntrack-0.0.50/include/libnetfilter_conntrack/libnetfilter_conntrack_tcp.h 2007-03-19 22:52:08.000000000 -0700
@@ -8,6 +8,10 @@
#ifndef _LIBNETFILTER_CONNTRACK_TCP_H_
#define _LIBNETFILTER_CONNTRACK_TCP_H_
+#ifdef __cplusplus
+extern "C" {
+#endif
+
enum tcp_state {
TCP_CONNTRACK_NONE,
TCP_CONNTRACK_SYN_SENT,
@@ -52,4 +56,8 @@
TCP_EXPTUPLE_DPORT = (1 << TCP_EXPTUPLE_DPORT_BIT)
};
+#ifdef __cplusplus
+}
+#endif
+
#endif
--- libnetfilter_conntrack-0.0.50/include/libnetfilter_conntrack/libnetfilter_conntrack_udp.h.orig 2007-03-19 22:52:15.000000000 -0700
+++ libnetfilter_conntrack-0.0.50/include/libnetfilter_conntrack/libnetfilter_conntrack_udp.h 2007-03-19 22:52:51.000000000 -0700
@@ -8,6 +8,10 @@
#ifndef _LIBNETFILTER_CONNTRACK_UDP_H_
#define _LIBNETFILTER_CONNTRACK_UDP_H_
+#ifdef __cplusplus
+extern "C" {
+#endif
+
enum udp_flags {
UDP_ORIG_SPORT_BIT = 0,
UDP_ORIG_SPORT = (1 << UDP_ORIG_SPORT_BIT),
@@ -34,4 +38,8 @@
UDP_EXPTUPLE_DPORT = (1 << UDP_EXPTUPLE_DPORT_BIT)
};
+#ifdef __cplusplus
+}
+#endif
+
#endif
--- libnetfilter_conntrack-0.0.50/include/libnetfilter_conntrack/linux_nfnetlink_conntrack.h.orig 2007-03-19 22:53:08.000000000 -0700
+++ libnetfilter_conntrack-0.0.50/include/libnetfilter_conntrack/linux_nfnetlink_conntrack.h 2007-03-19 22:53:30.000000000 -0700
@@ -2,6 +2,10 @@
#define _IPCONNTRACK_NETLINK_H
#include <libnfnetlink/linux_nfnetlink.h>
+#ifdef __cplusplus
+extern "C" {
+#endif
+
enum cntl_msg_types {
IPCTNL_MSG_CT_NEW,
IPCTNL_MSG_CT_GET,
@@ -134,4 +138,8 @@
};
#define CTA_HELP_MAX (__CTA_HELP_MAX - 1)
+#ifdef __cplusplus
+}
+#endif
+
#endif /* _IPCONNTRACK_NETLINK_H */
[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 252 bytes --]
next reply other threads:[~2007-03-20 6:07 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-03-20 6:07 Phil Dibowitz [this message]
2007-03-29 5:55 ` [PATCH] libnetfilter_conntrack: add extern C's to public headers Phil Dibowitz
2007-03-29 22:05 ` Pablo Neira Ayuso
2007-03-29 22:12 ` Phil Dibowitz
2007-03-29 22:35 ` Pablo Neira Ayuso
2007-03-29 23:11 ` Phil Dibowitz
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=45FF7A38.8090907@ipom.com \
--to=phil@ipom.com \
--cc=netfilter-devel@lists.netfilter.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.