svn commit: r201424 - user/kmacy/releng_8_rump/lib/libunet
Kip Macy
kmacy at FreeBSD.org
Sun Jan 3 10:52:25 UTC 2010
Author: kmacy
Date: Sun Jan 3 10:52:24 2010
New Revision: 201424
URL: http://svn.freebsd.org/changeset/base/201424
Log:
further grinding away of missing symbols
Added:
user/kmacy/releng_8_rump/lib/libunet/opt_bpf.h (contents, props changed)
user/kmacy/releng_8_rump/lib/libunet/opt_netgraph.h (contents, props changed)
user/kmacy/releng_8_rump/lib/libunet/unet_compat.c (contents, props changed)
user/kmacy/releng_8_rump/lib/libunet/unet_glue.c (contents, props changed)
Modified:
user/kmacy/releng_8_rump/lib/libunet/Makefile
Modified: user/kmacy/releng_8_rump/lib/libunet/Makefile
==============================================================================
--- user/kmacy/releng_8_rump/lib/libunet/Makefile Sun Jan 3 09:52:36 2010 (r201423)
+++ user/kmacy/releng_8_rump/lib/libunet/Makefile Sun Jan 3 10:52:24 2010 (r201424)
@@ -13,6 +13,7 @@ UNET_KERN_COMMON_OBJS += \
kern_subr.o \
subr_eventhandler.o \
subr_sbuf.o \
+ uipc_accf.o \
uipc_mbuf.o \
uipc_mbuf2.o \
uipc_domain.o \
@@ -20,6 +21,7 @@ UNET_KERN_COMMON_OBJS += \
uipc_socket.o
UNET_NET_COMMON_OBJS += \
+ bpf.o \
if.o \
if_clone.o \
if_dead.o \
@@ -65,6 +67,7 @@ UNET_NETINET_COMMON_OBJS += \
udp_usrreq.o
UNET_LIBKERN_COMMON_OBJS = \
+ arc4random.o \
bcmp.o \
inet_aton.o \
inet_ntoa.o \
@@ -78,15 +81,18 @@ UNET_LIBKERN_COMMON_OBJS = \
strtoul.o
UNET_GLUE_COMMON_OBJS = \
- unet_init.o \
- unet_uipc_syscalls.o
+ unet_compat.o \
+ unet_glue.o
+# unet_init.o \
+# unet_uipc_syscalls.o
UNET_COMMON_OBJS = \
${UNET_KERN_COMMON_OBJS} \
${UNET_LIBKERN_COMMON_OBJS} \
${UNET_NET_COMMON_OBJS} \
- ${UNET_NETINET_COMMON_OBJS}
+ ${UNET_NETINET_COMMON_OBJS} \
+ ${UNET_GLUE_COMMON_OBJS}
UNET_COMMON_SRCS= ${UNET_COMMON_OBJS:C/.o$/.c/}
Added: user/kmacy/releng_8_rump/lib/libunet/opt_bpf.h
==============================================================================
Added: user/kmacy/releng_8_rump/lib/libunet/opt_netgraph.h
==============================================================================
Added: user/kmacy/releng_8_rump/lib/libunet/unet_compat.c
==============================================================================
--- /dev/null 00:00:00 1970 (empty, because file is newly added)
+++ user/kmacy/releng_8_rump/lib/libunet/unet_compat.c Sun Jan 3 10:52:24 2010 (r201424)
@@ -0,0 +1,44 @@
+#undef _KERNEL
+#define _WANT_UCRED
+#include <stdlib.h>
+#include <sys/types.h>
+#include <sys/refcount.h>
+#include <sys/ucred.h>
+
+struct malloc_type;
+
+void *
+unet_malloc(unsigned long size, struct malloc_type *type, int flags)
+{
+
+ return (malloc(size));
+}
+
+void
+unet_free(void *addr, struct malloc_type *type)
+{
+
+ free(addr);
+}
+
+/*
+ * Claim another reference to a ucred structure.
+ */
+struct ucred *
+crhold(struct ucred *cr)
+{
+
+ refcount_acquire(&cr->cr_ref);
+ return (cr);
+}
+
+/*
+ * Free a cred structure. Throws away space when ref count gets to 0.
+ */
+void
+crfree(struct ucred *cr)
+{
+ if (refcount_release(&cr->cr_ref)) {
+ free(cr);
+ }
+}
Added: user/kmacy/releng_8_rump/lib/libunet/unet_glue.c
==============================================================================
--- /dev/null 00:00:00 1970 (empty, because file is newly added)
+++ user/kmacy/releng_8_rump/lib/libunet/unet_glue.c Sun Jan 3 10:52:24 2010 (r201424)
@@ -0,0 +1,86 @@
+#include <sys/cdefs.h>
+
+#include <sys/param.h>
+#include <sys/types.h>
+#include <sys/kernel.h>
+#include <sys/refcount.h>
+#include <sys/systm.h>
+#include <sys/jail.h>
+#include <sys/priv.h>
+
+int
+prison_if(struct ucred *cred, struct sockaddr *sa)
+{
+
+ return (0);
+}
+
+int
+prison_check_af(struct ucred *cred, int af)
+{
+
+ return (0);
+}
+
+int
+prison_check_ip4(struct ucred *cred, struct in_addr *ia)
+{
+
+ return (0);
+}
+
+
+int
+prison_equal_ip4(struct prison *pr1, struct prison *pr2)
+{
+
+ return (1);
+}
+
+/*
+ * See if a prison has the specific flag set.
+ */
+int
+prison_flag(struct ucred *cred, unsigned flag)
+{
+
+ /* This is an atomic read, so no locking is necessary. */
+ return (flag & PR_HOST);
+}
+
+int
+prison_get_ip4(struct ucred *cred, struct in_addr *ia)
+{
+
+ return (0);
+}
+
+int
+prison_local_ip4(struct ucred *cred, struct in_addr *ia)
+{
+
+ return (0);
+}
+
+int
+prison_remote_ip4(struct ucred *cred, struct in_addr *ia)
+{
+
+ return (0);
+}
+
+int
+priv_check(struct thread *td, int priv)
+{
+
+ return (0);
+}
+
+int
+priv_check_cred(struct ucred *cred, int priv, int flags)
+{
+
+ return (0);
+}
+
+
More information about the svn-src-user
mailing list