Grab the lock before reading uid/gid related structure, this will
[ipfw.git] / dummynet / missing.h
index b15d84a..c6bb4f3 100644 (file)
@@ -346,8 +346,10 @@ struct sysctl_req;
  * sysctl are mapped into /sys/module/ipfw_mod parameters
  */
 #define CTLFLAG_RD             1
+#define CTLFLAG_RDTUN          1
 #define CTLFLAG_RW             2
 #define CTLFLAG_SECURE3                0 // unsupported
+#define CTLFLAG_VNET    0      /* unsupported */
 
 #ifdef _WIN32
 #define module_param_named(_name, _var, _ty, _perm)
@@ -359,6 +361,7 @@ struct sysctl_req;
 #endif /* __linux__ */
 
 #define SYSCTL_DECL(_1)
+#define SYSCTL_OID(_1, _2, _3, _4, _5, _6, _7, _8)
 #define SYSCTL_NODE(_1, _2, _3, _4, _5, _6)
 #define _SYSCTL_BASE(_name, _var, _ty, _perm)          \
        module_param_named(_name, *(_var), _ty,         \
@@ -382,6 +385,8 @@ struct sysctl_req;
 int sysctl_handle_int(SYSCTL_HANDLER_ARGS);
 int sysctl_handle_long(SYSCTL_HANDLER_ARGS); 
 
+#define TUNABLE_INT(_name, _ptr)
+
 void ether_demux(struct ifnet *ifp, struct mbuf *m);
 
 int ether_output_frame(struct ifnet *ifp, struct mbuf *m);
@@ -422,4 +427,36 @@ linux_lookup(const int proto, const __be32 saddr, const __be16 sport,
        const __be32 daddr, const __be16 dport,
        struct sk_buff *skb, int dir, struct ip_fw_ugid *ugp);
 
+/* vnet wrappers, in vnet.h and ip_var.h */
+#define curvnet                 NULL
+#define        CURVNET_SET(_v)
+#define        CURVNET_RESTORE()
+#define VNET_ASSERT(condition)
+
+#define VNET_NAME(n)            n
+#define VNET_DECLARE(t, n)      extern t n
+#define VNET_DEFINE(t, n)       t n
+#define _VNET_PTR(b, n)         &VNET_NAME(n)
+/*
+ * Virtualized global variable accessor macros.
+ */
+#define VNET_VNET_PTR(vnet, n)          (&(n))
+#define VNET_VNET(vnet, n)              (n)
+
+#define VNET_PTR(n)             (&(n))
+#define VNET(n)                 (n)
+
+VNET_DECLARE(struct ip_fw_chain, layer3_chain);
+
+#define        V_fw_enable             VNET(fw_enable)
+#define        V_fw_one_pass           VNET(fw_one_pass)
+#define V_ip_fw_chk_ptr         VNET(ip_fw_chk_ptr)
+#define V_ip_fw_ctl_ptr         VNET(ip_fw_ctl_ptr)
+#define V_layer3_chain         VNET(layer3_chain)
+#define        V_tcbinfo               VNET(tcbinfo)
+#define        V_udbinfo               VNET(udbinfo)
+
+#define SYSCTL_VNET_PROC       SYSCTL_PROC
+#define SYSCTL_VNET_INT                SYSCTL_INT
+
 #endif /* !_MISSING_H_ */