From 91eb56543a0f105b83c1338a43be93a744ef9a14 Mon Sep 17 00:00:00 2001 From: luigi Date: Mon, 8 Mar 2010 11:27:39 +0000 Subject: cosmetic changes and C++ compatibility --- sys/netinet/ipfw/test/dn_test.h | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) (limited to 'sys/netinet') 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 #include #include @@ -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 @@ -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 */ -- cgit v1.1