summaryrefslogtreecommitdiffstats
path: root/sys/netinet/sctp_os_bsd.h
diff options
context:
space:
mode:
authorrrs <rrs@FreeBSD.org>2009-09-17 15:11:12 +0000
committerrrs <rrs@FreeBSD.org>2009-09-17 15:11:12 +0000
commit141877184752e3e13e04478a2f644eb3c8cf861e (patch)
tree52be655f936e0f762f039d0cc41cc139c0244591 /sys/netinet/sctp_os_bsd.h
parentcd09e6e7af78c8fe28c01998631e299688c81400 (diff)
downloadFreeBSD-src-141877184752e3e13e04478a2f644eb3c8cf861e.zip
FreeBSD-src-141877184752e3e13e04478a2f644eb3c8cf861e.tar.gz
Support for VNET in SCTP (hopefully)
Diffstat (limited to 'sys/netinet/sctp_os_bsd.h')
-rw-r--r--sys/netinet/sctp_os_bsd.h25
1 files changed, 9 insertions, 16 deletions
diff --git a/sys/netinet/sctp_os_bsd.h b/sys/netinet/sctp_os_bsd.h
index d018790..f97145f 100644
--- a/sys/netinet/sctp_os_bsd.h
+++ b/sys/netinet/sctp_os_bsd.h
@@ -78,9 +78,7 @@ __FBSDID("$FreeBSD$");
#include <netinet/ip_icmp.h>
#include <netinet/icmp_var.h>
-#ifdef VIMAGE
-#error "SCTP is not yet compatible with VIMAGE."
-#endif
+#include <net/vnet.h>
#ifdef IPSEC
#include <netipsec/ipsec.h>
@@ -137,25 +135,20 @@ MALLOC_DECLARE(SCTP_M_SOCKOPT);
#define SCTP_CTR6 CTR6
#endif
-#define SCTP_BASE_INFO(__m) system_base_info.sctppcbinfo.__m
-#define SCTP_BASE_STATS system_base_info.sctpstat
-#define SCTP_BASE_STAT(__m) system_base_info.sctpstat.__m
-#define SCTP_BASE_SYSCTL(__m) system_base_info.sctpsysctl.__m
-#define SCTP_BASE_VAR(__m) system_base_info.__m
-
/*
* Macros to expand out globals defined by various modules
* to either a real global or a virtualized instance of one,
* depending on whether VIMAGE is defined.
*/
-/* first define modules that supply us information */
-#define MOD_NET net
-#define MOD_INET inet
-#define MOD_INET6 inet6
-#define MOD_IPSEC ipsec
-
/* then define the macro(s) that hook into the vimage macros */
-#define MODULE_GLOBAL(__MODULE, __SYMBOL) V_ ## __SYMBOL
+#define MODULE_GLOBAL(__SYMBOL) V_ ## __SYMBOL
+
+#define V_system_base_info VNET_NAME(system_base_info)
+#define SCTP_BASE_INFO(__m) V_system_base_info.sctppcbinfo.__m
+#define SCTP_BASE_STATS V_system_base_info.sctpstat
+#define SCTP_BASE_STAT(__m) V_system_base_info.sctpstat.__m
+#define SCTP_BASE_SYSCTL(__m) V_system_base_info.sctpsysctl.__m
+#define SCTP_BASE_VAR(__m) V_system_base_info.__m
/*
*
OpenPOWER on IntegriCloud