summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorluigi <luigi@FreeBSD.org>2010-03-08 11:27:39 +0000
committerluigi <luigi@FreeBSD.org>2010-03-08 11:27:39 +0000
commit91eb56543a0f105b83c1338a43be93a744ef9a14 (patch)
tree7ab9b11d7edec5b0835c99f5bcf444a23a7ae8c8
parent4cac8d2a86b87f5ec3b05bd376901ebfb5069707 (diff)
downloadFreeBSD-src-91eb56543a0f105b83c1338a43be93a744ef9a14.zip
FreeBSD-src-91eb56543a0f105b83c1338a43be93a744ef9a14.tar.gz
cosmetic changes and C++ compatibility
-rw-r--r--sys/netinet/ipfw/test/dn_test.h18
1 files changed, 18 insertions, 0 deletions
diff --git a/sys/netinet/ipfw/test/dn_test.h b/sys/netinet/ipfw/test/dn_test.h
index 38ab94b..4e079bc 100644
--- a/sys/netinet/ipfw/test/dn_test.h
+++ b/sys/netinet/ipfw/test/dn_test.h
@@ -6,6 +6,11 @@
#ifndef _DN_TEST_H
#define _DN_TEST_H
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
#include <inttypes.h>
#include <stdio.h>
#include <stdlib.h>
@@ -24,7 +29,9 @@ extern int debug;
if (debug > lev) D(fmt, ## args); } while (0)
+#ifndef offsetof
#define offsetof(t,m) (int)((&((t *)0L)->m))
+#endif
#include <mylist.h>
@@ -45,6 +52,7 @@ enum {
struct dn_id {
int type, subtype, len, id;
};
+
struct dn_fs {
int par[4]; /* flowset parameters */
@@ -65,8 +73,10 @@ struct dn_fs {
*/
int cur;
};
+
struct dn_sch {
};
+
struct dn_flow {
struct dn_id oid;
int length;
@@ -76,6 +86,7 @@ struct dn_flow {
uint32_t flow_id;
struct list_head h; /* used by the generator */
};
+
struct dn_link {
};
@@ -98,12 +109,15 @@ struct ipfw_flow_id {
};
typedef void * module_t;
+
struct _md_t {
const char *name;
int (*f)(module_t, int, void *);
void *p;
};
+
typedef struct _md_t moduledata_t;
+
#define DECLARE_MODULE(name, b, c, d) \
moduledata_t *_g_##name = & b
#define MODULE_DEPEND(a, b, c, d, e)
@@ -154,4 +168,8 @@ mq_append(struct mq *q, struct mbuf *m)
m->m_nextpkt = NULL;
}
+#ifdef __cplusplus
+}
+#endif
+
#endif /* _DN_TEST_H */
OpenPOWER on IntegriCloud