aboutsummaryrefslogtreecommitdiff
path: root/sys/netinet/sctp_os_bsd.h
diff options
context:
space:
mode:
authorRandall Stewart <rrs@FreeBSD.org>2009-09-17 15:11:12 +0000
committerRandall Stewart <rrs@FreeBSD.org>2009-09-17 15:11:12 +0000
commit482444b4a58e000cd61107152cd4d5cc58b8a4e5 (patch)
tree52be655f936e0f762f039d0cc41cc139c0244591 /sys/netinet/sctp_os_bsd.h
parent3282c517135804f59220f64cc5806f06a483d2e4 (diff)
downloadsrc-482444b4a58e000cd61107152cd4d5cc58b8a4e5.tar.gz
src-482444b4a58e000cd61107152cd4d5cc58b8a4e5.zip
Support for VNET in SCTP (hopefully)
Notes
Notes: svn path=/head/; revision=197288
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 d01879081bd0..f97145f89248 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
/*
*