summaryrefslogtreecommitdiff
path: root/usr/src/lib/libxnet
diff options
context:
space:
mode:
Diffstat (limited to 'usr/src/lib/libxnet')
-rw-r--r--usr/src/lib/libxnet/Makefile50
-rw-r--r--usr/src/lib/libxnet/Makefile.com63
-rw-r--r--usr/src/lib/libxnet/amd64/Makefile35
-rw-r--r--usr/src/lib/libxnet/common/data.c39
-rw-r--r--usr/src/lib/libxnet/common/llib-lxnet44
-rw-r--r--usr/src/lib/libxnet/common/mapfile-vers141
-rw-r--r--usr/src/lib/libxnet/i386/Makefile32
-rw-r--r--usr/src/lib/libxnet/sparc/Makefile32
-rw-r--r--usr/src/lib/libxnet/sparcv9/Makefile35
9 files changed, 471 insertions, 0 deletions
diff --git a/usr/src/lib/libxnet/Makefile b/usr/src/lib/libxnet/Makefile
new file mode 100644
index 0000000000..f663bdff96
--- /dev/null
+++ b/usr/src/lib/libxnet/Makefile
@@ -0,0 +1,50 @@
+#
+# CDDL HEADER START
+#
+# The contents of this file are subject to the terms of the
+# Common Development and Distribution License, Version 1.0 only
+# (the "License"). You may not use this file except in compliance
+# with the License.
+#
+# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
+# or http://www.opensolaris.org/os/licensing.
+# See the License for the specific language governing permissions
+# and limitations under the License.
+#
+# When distributing Covered Code, include this CDDL HEADER in each
+# file and include the License file at usr/src/OPENSOLARIS.LICENSE.
+# If applicable, add the following below this CDDL HEADER, with the
+# fields enclosed by brackets "[]" replaced with your own identifying
+# information: Portions Copyright [yyyy] [name of copyright owner]
+#
+# CDDL HEADER END
+#
+#
+# Copyright 2003 Sun Microsystems, Inc. All rights reserved.
+# Use is subject to license terms.
+#
+# ident "%Z%%M% %I% %E% SMI"
+#
+# lib/libxnet/Makefile
+
+include ../Makefile.lib
+
+SUBDIRS= $(MACH) $(BUILD64) $(MACH64)
+
+all := TARGET= all
+clean := TARGET= clean
+clobber := TARGET= clobber
+delete := TARGET= delete
+install := TARGET= install
+lint := TARGET= lint
+_msg := TARGET= _msg
+package := TARGET= package
+
+.KEEP_STATE:
+
+all clean clobber delete install lint package: $(SUBDIRS)
+
+$(MACH) $(MACH64): FRC
+ @cd $@; pwd; $(MAKE) $(TARGET)
+
+FRC:
diff --git a/usr/src/lib/libxnet/Makefile.com b/usr/src/lib/libxnet/Makefile.com
new file mode 100644
index 0000000000..145e3320cd
--- /dev/null
+++ b/usr/src/lib/libxnet/Makefile.com
@@ -0,0 +1,63 @@
+#
+# CDDL HEADER START
+#
+# The contents of this file are subject to the terms of the
+# Common Development and Distribution License, Version 1.0 only
+# (the "License"). You may not use this file except in compliance
+# with the License.
+#
+# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
+# or http://www.opensolaris.org/os/licensing.
+# See the License for the specific language governing permissions
+# and limitations under the License.
+#
+# When distributing Covered Code, include this CDDL HEADER in each
+# file and include the License file at usr/src/OPENSOLARIS.LICENSE.
+# If applicable, add the following below this CDDL HEADER, with the
+# fields enclosed by brackets "[]" replaced with your own identifying
+# information: Portions Copyright [yyyy] [name of copyright owner]
+#
+# CDDL HEADER END
+#
+#
+# Copyright 2004 Sun Microsystems, Inc. All rights reserved.
+# Use is subject to license terms.
+#
+# ident "%Z%%M% %I% %E% SMI"
+#
+
+LIBRARY= libxnet.a
+VERS= .1
+OBJECTS= data.o
+
+include ../../Makefile.lib
+
+# install this library in the root filesystem
+include ../../Makefile.rootfs
+
+MAPFILES= ../common/mapfile-vers $(MAPFILE-FLTR)
+MAPOPTS= $(MAPFILES:%=-M%)
+
+SRCDIR= ../common
+LIBS= $(DYNLIB) $(LINTLIB)
+
+C99LMODE = -Xc99=%none
+$(LINTLIB):= SRCS = $(SRCDIR)/$(LINTSRC)
+
+CFLAGS += $(CCVERBOSE)
+DYNFLAGS += $(ZLOADFLTR) $(MAPOPTS)
+
+# Redefine shared object build rule to use $(LD) directly (this avoids .init
+# and .fini sections being added).
+
+BUILD.SO= $(LD) -o $@ -G $(DYNFLAGS) $(PICS)
+
+.KEEP_STATE:
+
+all: $(LIBS)
+
+lint: lintcheck
+
+include ../../Makefile.targ
+
+$(DYNLIB): $(MAPFILES)
diff --git a/usr/src/lib/libxnet/amd64/Makefile b/usr/src/lib/libxnet/amd64/Makefile
new file mode 100644
index 0000000000..b6175cc0ce
--- /dev/null
+++ b/usr/src/lib/libxnet/amd64/Makefile
@@ -0,0 +1,35 @@
+#
+# CDDL HEADER START
+#
+# The contents of this file are subject to the terms of the
+# Common Development and Distribution License, Version 1.0 only
+# (the "License"). You may not use this file except in compliance
+# with the License.
+#
+# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
+# or http://www.opensolaris.org/os/licensing.
+# See the License for the specific language governing permissions
+# and limitations under the License.
+#
+# When distributing Covered Code, include this CDDL HEADER in each
+# file and include the License file at usr/src/OPENSOLARIS.LICENSE.
+# If applicable, add the following below this CDDL HEADER, with the
+# fields enclosed by brackets "[]" replaced with your own identifying
+# information: Portions Copyright [yyyy] [name of copyright owner]
+#
+# CDDL HEADER END
+#
+#
+# Copyright 2003 Sun Microsystems, Inc. All rights reserved.
+# Use is subject to license terms.
+#
+# ident "%Z%%M% %I% %E% SMI"
+
+include ../Makefile.com
+include ../../Makefile.lib.64
+
+.KEEP_STATE:
+
+BUILD.SO= $(LD) -o $@ -G -64 $(DYNFLAGS) $(PICS)
+
+install: all $(ROOTLIBS64) $(ROOTLINKS64) $(ROOTLINT)
diff --git a/usr/src/lib/libxnet/common/data.c b/usr/src/lib/libxnet/common/data.c
new file mode 100644
index 0000000000..eccdbd746a
--- /dev/null
+++ b/usr/src/lib/libxnet/common/data.c
@@ -0,0 +1,39 @@
+/*
+ * CDDL HEADER START
+ *
+ * The contents of this file are subject to the terms of the
+ * Common Development and Distribution License, Version 1.0 only
+ * (the "License"). You may not use this file except in compliance
+ * with the License.
+ *
+ * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
+ * or http://www.opensolaris.org/os/licensing.
+ * See the License for the specific language governing permissions
+ * and limitations under the License.
+ *
+ * When distributing Covered Code, include this CDDL HEADER in each
+ * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
+ * If applicable, add the following below this CDDL HEADER, with the
+ * fields enclosed by brackets "[]" replaced with your own identifying
+ * information: Portions Copyright [yyyy] [name of copyright owner]
+ *
+ * CDDL HEADER END
+ */
+/*
+ * Copyright (c) 1996, by Sun Microsystems, Inc.
+ * All rights reserved.
+ */
+#pragma ident "%Z%%M% %I% %E% SMI"
+
+/*
+ * Define any exported data items. These have to be described within an object
+ * rather than a mapfile so that they are assigned to a valid section (and thus
+ * do not result in absolute symbols).
+ *
+ * Both of these symbols originate from libnsl. h_error is an uninitialized
+ * data item where as t_errno is initialized - the value provided here is
+ * irrelevant but necessary to generate an appropriate copy relocation should
+ * an application reference this symbol.
+ */
+int h_errno;
+int t_errno = 0;
diff --git a/usr/src/lib/libxnet/common/llib-lxnet b/usr/src/lib/libxnet/common/llib-lxnet
new file mode 100644
index 0000000000..21baebd9b2
--- /dev/null
+++ b/usr/src/lib/libxnet/common/llib-lxnet
@@ -0,0 +1,44 @@
+/*
+ * CDDL HEADER START
+ *
+ * The contents of this file are subject to the terms of the
+ * Common Development and Distribution License, Version 1.0 only
+ * (the "License"). You may not use this file except in compliance
+ * with the License.
+ *
+ * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
+ * or http://www.opensolaris.org/os/licensing.
+ * See the License for the specific language governing permissions
+ * and limitations under the License.
+ *
+ * When distributing Covered Code, include this CDDL HEADER in each
+ * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
+ * If applicable, add the following below this CDDL HEADER, with the
+ * fields enclosed by brackets "[]" replaced with your own identifying
+ * information: Portions Copyright [yyyy] [name of copyright owner]
+ *
+ * CDDL HEADER END
+ */
+/*
+ * Copyright (c) 2001 by Sun Microsystems, Inc.
+ * All rights reserved.
+ */
+
+#pragma ident "%Z%%M% %I% %E% SMI"
+
+/* LINTLIBRARY */
+/* PROTOLIB1 */
+
+/*
+ * Set up the UNIX98 compilation environment.
+ */
+#define _XOPEN_SOURCE 500
+#include <sys/feature_tests.h>
+
+/*
+ * Slurp the interfaces out of the official UNIX98 networking headers.
+ */
+#include <sys/socket.h>
+#include <arpa/inet.h>
+#include <netinet/in.h>
+#include <netdb.h>
diff --git a/usr/src/lib/libxnet/common/mapfile-vers b/usr/src/lib/libxnet/common/mapfile-vers
new file mode 100644
index 0000000000..d0d4c7fe0b
--- /dev/null
+++ b/usr/src/lib/libxnet/common/mapfile-vers
@@ -0,0 +1,141 @@
+#
+# Copyright 2005 Sun Microsystems, Inc. All rights reserved.
+# Use is subject to license terms.
+#
+# CDDL HEADER START
+#
+# The contents of this file are subject to the terms of the
+# Common Development and Distribution License, Version 1.0 only
+# (the "License"). You may not use this file except in compliance
+# with the License.
+#
+# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
+# or http://www.opensolaris.org/os/licensing.
+# See the License for the specific language governing permissions
+# and limitations under the License.
+#
+# When distributing Covered Code, include this CDDL HEADER in each
+# file and include the License file at usr/src/OPENSOLARIS.LICENSE.
+# If applicable, add the following below this CDDL HEADER, with the
+# fields enclosed by brackets "[]" replaced with your own identifying
+# information: Portions Copyright [yyyy] [name of copyright owner]
+#
+# CDDL HEADER END
+#
+# ident "%Z%%M% %I% %E% SMI"
+#
+
+SUNW_1.3 {
+ global:
+ if_freenameindex = FUNCTION FILTER libsocket.so.1;
+ if_indextoname = FUNCTION FILTER libsocket.so.1;
+ if_nameindex = FUNCTION FILTER libsocket.so.1;
+ if_nametoindex = FUNCTION FILTER libsocket.so.1;
+ sockatmark = FUNCTION FILTER libsocket.so.1;
+} SUNW_1.2;
+
+SUNW_1.2 {
+ global:
+ _xti_rcvreldata = FUNCTION FILTER libnsl.so.1;
+ _xti_rcvv = FUNCTION FILTER libnsl.so.1;
+ _xti_rcvvudata = FUNCTION FILTER libnsl.so.1;
+ _xti_sndreldata = FUNCTION FILTER libnsl.so.1;
+ _xti_sndv = FUNCTION FILTER libnsl.so.1;
+ _xti_sndvudata = FUNCTION FILTER libnsl.so.1;
+ _xti_sysconf = FUNCTION FILTER libnsl.so.1;
+ _xti_xns5_accept = FUNCTION FILTER libnsl.so.1;
+ _xti_xns5_snd = FUNCTION FILTER libnsl.so.1;
+} SUNW_1.1;
+
+SUNW_1.1 {
+ global:
+ __t_errno = FUNCTION FILTER libnsl.so.1;
+ __xnet_bind = FUNCTION FILTER libsocket.so.1;
+ __xnet_connect = FUNCTION FILTER libsocket.so.1;
+ __xnet_getsockopt = FUNCTION FILTER libsocket.so.1;
+ __xnet_listen = FUNCTION FILTER libsocket.so.1;
+ __xnet_recvmsg = FUNCTION FILTER libsocket.so.1;
+ __xnet_sendmsg = FUNCTION FILTER libsocket.so.1;
+ __xnet_sendto = FUNCTION FILTER libsocket.so.1;
+ __xnet_socket = FUNCTION FILTER libsocket.so.1;
+ __xnet_socketpair = FUNCTION FILTER libsocket.so.1;
+ _xti_accept = FUNCTION FILTER libnsl.so.1;
+ _xti_alloc = FUNCTION FILTER libnsl.so.1;
+ _xti_bind = FUNCTION FILTER libnsl.so.1;
+ _xti_close = FUNCTION FILTER libnsl.so.1;
+ _xti_connect = FUNCTION FILTER libnsl.so.1;
+ _xti_error = FUNCTION FILTER libnsl.so.1;
+ _xti_free = FUNCTION FILTER libnsl.so.1;
+ _xti_getinfo = FUNCTION FILTER libnsl.so.1;
+ _xti_getprotaddr = FUNCTION FILTER libnsl.so.1;
+ _xti_getstate = FUNCTION FILTER libnsl.so.1;
+ _xti_listen = FUNCTION FILTER libnsl.so.1;
+ _xti_look = FUNCTION FILTER libnsl.so.1;
+ _xti_open = FUNCTION FILTER libnsl.so.1;
+ _xti_optmgmt = FUNCTION FILTER libnsl.so.1;
+ _xti_rcv = FUNCTION FILTER libnsl.so.1;
+ _xti_rcvconnect = FUNCTION FILTER libnsl.so.1;
+ _xti_rcvdis = FUNCTION FILTER libnsl.so.1;
+ _xti_rcvrel = FUNCTION FILTER libnsl.so.1;
+ _xti_rcvudata = FUNCTION FILTER libnsl.so.1;
+ _xti_rcvuderr = FUNCTION FILTER libnsl.so.1;
+ _xti_snd = FUNCTION FILTER libnsl.so.1;
+ _xti_snddis = FUNCTION FILTER libnsl.so.1;
+ _xti_sndrel = FUNCTION FILTER libnsl.so.1;
+ _xti_sndudata = FUNCTION FILTER libnsl.so.1;
+ _xti_strerror = FUNCTION FILTER libnsl.so.1;
+ _xti_sync = FUNCTION FILTER libnsl.so.1;
+ _xti_unbind = FUNCTION FILTER libnsl.so.1;
+ accept = FUNCTION FILTER libsocket.so.1;
+ bind = FUNCTION FILTER libsocket.so.1;
+ connect = FUNCTION FILTER libsocket.so.1;
+ endhostent = FUNCTION FILTER libnsl.so.1;
+ endnetent = FUNCTION FILTER libsocket.so.1;
+ endprotoent = FUNCTION FILTER libsocket.so.1;
+ endservent = FUNCTION FILTER libsocket.so.1;
+ gethostbyaddr = FUNCTION FILTER libnsl.so.1;
+ gethostbyname = FUNCTION FILTER libnsl.so.1;
+ gethostent = FUNCTION FILTER libnsl.so.1;
+ gethostname = FUNCTION FILTER libc.so.1;
+ getnetbyaddr = FUNCTION FILTER libsocket.so.1;
+ getnetbyname = FUNCTION FILTER libsocket.so.1;
+ getnetent = FUNCTION FILTER libsocket.so.1;
+ getpeername = FUNCTION FILTER libsocket.so.1;
+ getprotobyname = FUNCTION FILTER libsocket.so.1;
+ getprotobynumber = FUNCTION FILTER libsocket.so.1;
+ getprotoent = FUNCTION FILTER libsocket.so.1;
+ getservbyname = FUNCTION FILTER libsocket.so.1;
+ getservbyport = FUNCTION FILTER libsocket.so.1;
+ getservent = FUNCTION FILTER libsocket.so.1;
+ getsockname = FUNCTION FILTER libsocket.so.1;
+ getsockopt = FUNCTION FILTER libsocket.so.1;
+ h_errno = FILTER libnsl.so.1;
+ htonl = FUNCTION FILTER libsocket.so.1;
+ htons = FUNCTION FILTER libsocket.so.1;
+ inet_addr = FUNCTION FILTER libsocket.so.1;
+ inet_lnaof = FUNCTION FILTER libsocket.so.1;
+ inet_makeaddr = FUNCTION FILTER libsocket.so.1;
+ inet_netof = FUNCTION FILTER libnsl.so.1;
+ inet_network = FUNCTION FILTER libsocket.so.1;
+ inet_ntoa = FUNCTION FILTER libnsl.so.1;
+ listen = FUNCTION FILTER libsocket.so.1;
+ ntohl = FUNCTION FILTER libsocket.so.1;
+ ntohs = FUNCTION FILTER libsocket.so.1;
+ recv = FUNCTION FILTER libsocket.so.1;
+ recvfrom = FUNCTION FILTER libsocket.so.1;
+ recvmsg = FUNCTION FILTER libsocket.so.1;
+ send = FUNCTION FILTER libsocket.so.1;
+ sendmsg = FUNCTION FILTER libsocket.so.1;
+ sendto = FUNCTION FILTER libsocket.so.1;
+ sethostent = FUNCTION FILTER libnsl.so.1;
+ setnetent = FUNCTION FILTER libsocket.so.1;
+ setprotoent = FUNCTION FILTER libsocket.so.1;
+ setservent = FUNCTION FILTER libsocket.so.1;
+ setsockopt = FUNCTION FILTER libsocket.so.1;
+ shutdown = FUNCTION FILTER libsocket.so.1;
+ socket = FUNCTION FILTER libsocket.so.1;
+ socketpair = FUNCTION FILTER libsocket.so.1;
+ t_errno = FILTER libnsl.so.1;
+ local:
+ *;
+};
diff --git a/usr/src/lib/libxnet/i386/Makefile b/usr/src/lib/libxnet/i386/Makefile
new file mode 100644
index 0000000000..06c850e43c
--- /dev/null
+++ b/usr/src/lib/libxnet/i386/Makefile
@@ -0,0 +1,32 @@
+#
+# CDDL HEADER START
+#
+# The contents of this file are subject to the terms of the
+# Common Development and Distribution License, Version 1.0 only
+# (the "License"). You may not use this file except in compliance
+# with the License.
+#
+# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
+# or http://www.opensolaris.org/os/licensing.
+# See the License for the specific language governing permissions
+# and limitations under the License.
+#
+# When distributing Covered Code, include this CDDL HEADER in each
+# file and include the License file at usr/src/OPENSOLARIS.LICENSE.
+# If applicable, add the following below this CDDL HEADER, with the
+# fields enclosed by brackets "[]" replaced with your own identifying
+# information: Portions Copyright [yyyy] [name of copyright owner]
+#
+# CDDL HEADER END
+#
+#
+# Copyright 2003 Sun Microsystems, Inc. All rights reserved.
+# Use is subject to license terms.
+#
+# ident "%Z%%M% %I% %E% SMI"
+
+include ../Makefile.com
+
+.KEEP_STATE:
+
+install: all $(ROOTLIBS) $(ROOTLINKS) $(ROOTLINT)
diff --git a/usr/src/lib/libxnet/sparc/Makefile b/usr/src/lib/libxnet/sparc/Makefile
new file mode 100644
index 0000000000..06c850e43c
--- /dev/null
+++ b/usr/src/lib/libxnet/sparc/Makefile
@@ -0,0 +1,32 @@
+#
+# CDDL HEADER START
+#
+# The contents of this file are subject to the terms of the
+# Common Development and Distribution License, Version 1.0 only
+# (the "License"). You may not use this file except in compliance
+# with the License.
+#
+# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
+# or http://www.opensolaris.org/os/licensing.
+# See the License for the specific language governing permissions
+# and limitations under the License.
+#
+# When distributing Covered Code, include this CDDL HEADER in each
+# file and include the License file at usr/src/OPENSOLARIS.LICENSE.
+# If applicable, add the following below this CDDL HEADER, with the
+# fields enclosed by brackets "[]" replaced with your own identifying
+# information: Portions Copyright [yyyy] [name of copyright owner]
+#
+# CDDL HEADER END
+#
+#
+# Copyright 2003 Sun Microsystems, Inc. All rights reserved.
+# Use is subject to license terms.
+#
+# ident "%Z%%M% %I% %E% SMI"
+
+include ../Makefile.com
+
+.KEEP_STATE:
+
+install: all $(ROOTLIBS) $(ROOTLINKS) $(ROOTLINT)
diff --git a/usr/src/lib/libxnet/sparcv9/Makefile b/usr/src/lib/libxnet/sparcv9/Makefile
new file mode 100644
index 0000000000..b6175cc0ce
--- /dev/null
+++ b/usr/src/lib/libxnet/sparcv9/Makefile
@@ -0,0 +1,35 @@
+#
+# CDDL HEADER START
+#
+# The contents of this file are subject to the terms of the
+# Common Development and Distribution License, Version 1.0 only
+# (the "License"). You may not use this file except in compliance
+# with the License.
+#
+# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
+# or http://www.opensolaris.org/os/licensing.
+# See the License for the specific language governing permissions
+# and limitations under the License.
+#
+# When distributing Covered Code, include this CDDL HEADER in each
+# file and include the License file at usr/src/OPENSOLARIS.LICENSE.
+# If applicable, add the following below this CDDL HEADER, with the
+# fields enclosed by brackets "[]" replaced with your own identifying
+# information: Portions Copyright [yyyy] [name of copyright owner]
+#
+# CDDL HEADER END
+#
+#
+# Copyright 2003 Sun Microsystems, Inc. All rights reserved.
+# Use is subject to license terms.
+#
+# ident "%Z%%M% %I% %E% SMI"
+
+include ../Makefile.com
+include ../../Makefile.lib.64
+
+.KEEP_STATE:
+
+BUILD.SO= $(LD) -o $@ -G -64 $(DYNFLAGS) $(PICS)
+
+install: all $(ROOTLIBS64) $(ROOTLINKS64) $(ROOTLINT)