diff options
| author | stevel@tonic-gate <none@none> | 2005-06-14 00:00:00 -0700 |
|---|---|---|
| committer | stevel@tonic-gate <none@none> | 2005-06-14 00:00:00 -0700 |
| commit | 7c478bd95313f5f23a4c958a745db2134aa03244 (patch) | |
| tree | c871e58545497667cbb4b0a4f2daf204743e1fe7 /usr/src/lib/librpcsvc | |
| download | illumos-joyent-7c478bd95313f5f23a4c958a745db2134aa03244.tar.gz | |
OpenSolaris Launch
Diffstat (limited to 'usr/src/lib/librpcsvc')
21 files changed, 1876 insertions, 0 deletions
diff --git a/usr/src/lib/librpcsvc/Makefile b/usr/src/lib/librpcsvc/Makefile new file mode 100644 index 0000000000..558858bce5 --- /dev/null +++ b/usr/src/lib/librpcsvc/Makefile @@ -0,0 +1,124 @@ +# +# 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" +# +# lib/librpcsvc/Makefile +# + +include ../../Makefile.master + +PROTOCOL_DIR= $(ROOT)/usr/include/rpcsvc + +SUBDIRS= $(MACH) +$(BUILD64)SUBDIRS += $(MACH64) + +DERIVED_FILES= \ + common/bootparam_prot_xdr.c \ + common/rstat_xdr.c \ + common/rusers_xdr.c \ + common/spray_xdr.c \ + common/nlm_prot.c \ + common/sm_inter_xdr.c \ + common/mount_xdr.c \ + common/nsm_addr_xdr.c \ + common/rpc_sztypes.c + +CLEANFILES += $(DERIVED_FILES) + +# include library definitions +include ../Makefile.lib + +# definitions for install_h target +HDRS= $(TXTS) +ROOTHDRDIR= $(ROOT)/usr/include/rpcsvc +ROOTHDRS= $(HDRS:%=$(ROOTHDRDIR)/%) +CHECKHDRS= $(HDRS:%.h=%.check) + +# install rule for install_h target +$(ROOTHDRDIR)/%: % + $(INS.file) + +all := TARGET= all +clean := TARGET= clean +clobber := TARGET= clobber +install := TARGET= install +lint := TARGET= lint + +.KEEP_STATE: + +all: $(DERIVED_FILES) $(TXTS) .WAIT spec .WAIT $(SUBDIRS) + +install: all .WAIT spec .WAIT $(SUBDIRS) + +install_h: $(DERIVED_FILES) $(ROOTHDRS) + +lint: $(SUBDIRS) + +check: $(CHECKHDRS) + +clean clobber : spec .WAIT $(SUBDIRS) + +MAPFILE= mapfile-vers + +# +# Rules for building the derived files +# +# Derived files +# +common/bootparam_prot_xdr.c: $(PROTOCOL_DIR)/bootparam_prot.x + $(RPCGEN) -c $(PROTOCOL_DIR)/bootparam_prot.x > $@ + +common/rstat_xdr.c: $(PROTOCOL_DIR)/rstat.x + $(RPCGEN) -c $(PROTOCOL_DIR)/rstat.x > $@ + +common/rusers_xdr.c: $(PROTOCOL_DIR)/rusers.x + $(RPCGEN) -c $(PROTOCOL_DIR)/rusers.x > $@ + +common/sm_inter_xdr.c: $(PROTOCOL_DIR)/sm_inter.x + $(RPCGEN) -c $(PROTOCOL_DIR)/sm_inter.x > $@ + +common/spray_xdr.c: $(PROTOCOL_DIR)/spray.x + $(RPCGEN) -c $(PROTOCOL_DIR)/spray.x > $@ + +common/nlm_prot.c: $(PROTOCOL_DIR)/nlm_prot.x + $(RPCGEN) -c $(PROTOCOL_DIR)/nlm_prot.x > $@ + +common/mount_xdr.c: $(PROTOCOL_DIR)/mount.x + $(RPCGEN) -c $(PROTOCOL_DIR)/mount.x > $@ + +common/nsm_addr_xdr.c: $(PROTOCOL_DIR)/nsm_addr.x + $(RPCGEN) -c $(PROTOCOL_DIR)/nsm_addr.x > $@ + +common/rpc_sztypes.c: $(PROTOCOL_DIR)/rpc_sztypes.x + $(RPCGEN) -c $(PROTOCOL_DIR)/rpc_sztypes.x > $@ + +# include library targets +include ../Makefile.targ + +spec $(SUBDIRS): FRC + @cd $@; pwd; $(MAKE) $(TARGET) + +FRC: diff --git a/usr/src/lib/librpcsvc/Makefile.com b/usr/src/lib/librpcsvc/Makefile.com new file mode 100644 index 0000000000..8f8f2d9851 --- /dev/null +++ b/usr/src/lib/librpcsvc/Makefile.com @@ -0,0 +1,74 @@ +# +# 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" +# +# lib/librpcsvc/Makefile +# + +LIBRARY= librpcsvc.a +VERS = .1 + +OBJECTS= rstat_simple.o rstat_xdr.o rusers_simple.o rusersxdr.o rusers_xdr.o \ + rwallxdr.o spray_xdr.o nlm_prot.o sm_inter_xdr.o nsm_addr_xdr.o \ + bootparam_prot_xdr.o mount_xdr.o mountlist_xdr.o rpc_sztypes.o \ + bindresvport.o + +# include library definitions +include ../../Makefile.lib + +# install this library in the root filesystem +include ../../Makefile.rootfs + +# Don't mess with this. DAAMAPFILE gets correctly overridden +# for 64bit. +MAPFILE= $(MAPDIR)/mapfile + +CLOBBERFILES += $(MAPFILE) + +SRCS= $(OBJECTS:%.o=../common/%.c) + +pics/%.o: ../common/%.c + $(COMPILE.c) -o $@ $< + $(POST_PROCESS_O) + +LIBS = $(DYNLIB) + + +CPPFLAGS += -DYP +LDLIBS += -lnsl -lc +DYNFLAGS += -M $(MAPFILE) + +.KEEP_STATE: + + +$(DYNLIB): $(MAPFILE) +$(MAPFILE): + @cd $(MAPDIR); $(MAKE) mapfile + +lint: lintcheck + +# include library targets +include ../../Makefile.targ diff --git a/usr/src/lib/librpcsvc/amd64/Makefile b/usr/src/lib/librpcsvc/amd64/Makefile new file mode 100644 index 0000000000..605222a8ac --- /dev/null +++ b/usr/src/lib/librpcsvc/amd64/Makefile @@ -0,0 +1,40 @@ +# +# 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" +# + +MAPDIR= ../spec/amd64 + +include ../Makefile.com +include ../../Makefile.lib.64 + +all: $(LIBS) + +install: all $(ROOTLIBS64) $(ROOTLINKS64) + +# This needs to be restated, otherwise we'll be dependent +# on the 32bit mapfile... +$(DYNLIB): $(MAPFILE) diff --git a/usr/src/lib/librpcsvc/common/bindresvport.c b/usr/src/lib/librpcsvc/common/bindresvport.c new file mode 100644 index 0000000000..69bf6bf4b9 --- /dev/null +++ b/usr/src/lib/librpcsvc/common/bindresvport.c @@ -0,0 +1,196 @@ +/* + * 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. + */ + +/* Copyright (c) 1983, 1984, 1985, 1986, 1987, 1988, 1989 AT&T */ +/* All Rights Reserved */ + +/* + * Portions of this source code were derived from Berkeley 4.3 BSD + * under license from the Regents of the University of California. + */ + +#pragma ident "%Z%%M% %I% %E% SMI" + +/* + * XXX This routine should be changed to use + * ND_CHECK_RESERVED_PORT and ND_SET_RESERVED_PORT + * which can be invoked via netdir_options. + */ +#include <stdio.h> +#include <rpc/rpc.h> +#include <netinet/in.h> +#include <sys/socket.h> +#include <netdb.h> +#include <errno.h> +#include <rpc/nettype.h> +#include <stropts.h> +#include <string.h> +#include <tiuser.h> +#include <unistd.h> + +#define STARTPORT 600 +#define ENDPORT (IPPORT_RESERVED - 1) +#define NPORTS (ENDPORT - STARTPORT + 1) + +/* + * The argument is a client handle for a UDP connection. + * Unbind its transport endpoint from the existing port + * and rebind it to a reserved port. + * On failure, the client handle can be unbound even if it + * was previously bound. Callers should destroy the client + * handle after a failure. + */ +int +__clnt_bindresvport(cl) + CLIENT *cl; +{ + int fd; + int res; + short port; + struct sockaddr_in *sin; + struct sockaddr_in6 *sin6; + extern int errno; + /* extern int t_errno; */ + struct t_bind *tbind, *tres; + int i; + bool_t ipv6_fl = FALSE; + struct netconfig *nconf; + + /* make sure it's a UDP connection */ + nconf = getnetconfigent(cl->cl_netid); + if (nconf == NULL) + return (-1); + if ((nconf->nc_semantics != NC_TPI_CLTS) || + (strcmp(nconf->nc_protofmly, NC_INET) && + strcmp(nconf->nc_protofmly, NC_INET)) || + strcmp(nconf->nc_proto, NC_UDP)) { + freenetconfigent(nconf); + return (0); /* not udp - don't need resv port */ + } + if (strcmp(nconf->nc_protofmly, NC_INET6) == 0) + ipv6_fl = TRUE; + freenetconfigent(nconf); + + if (!clnt_control(cl, CLGET_FD, (char *)&fd)) { + return (-1); + } + + /* If fd is already bound - unbind it */ + if (t_getstate(fd) != T_UNBND) { + while ((t_unbind(fd) < 0) && (t_errno == TLOOK)) { + /* + * If there is a message queued to this descriptor, + * remove it. + */ + struct strbuf ctl[1], data[1]; + char ctlbuf[sizeof (union T_primitives) + 32]; + char databuf[256]; + int flags; + + ctl->maxlen = sizeof (ctlbuf); + ctl->buf = ctlbuf; + data->maxlen = sizeof (databuf); + data->buf = databuf; + flags = 0; + if (getmsg(fd, ctl, data, &flags) < 0) + return (-1); + + } + if (t_getstate(fd) != T_UNBND) + return (-1); + } + + tbind = (struct t_bind *)t_alloc(fd, T_BIND, T_ADDR); + if (tbind == NULL) { + if (t_errno == TBADF) + errno = EBADF; + return (-1); + } + tres = (struct t_bind *)t_alloc(fd, T_BIND, T_ADDR); + if (tres == NULL) { + (void) t_free((char *)tbind, T_BIND); + return (-1); + } + + (void) memset((char *)tbind->addr.buf, 0, tbind->addr.len); + /* warning: this sockaddr_in is truncated to 8 bytes */ + + if (ipv6_fl == TRUE) { + sin6 = (struct sockaddr_in6 *)tbind->addr.buf; + sin6->sin6_family = AF_INET6; + } else { + sin = (struct sockaddr_in *)tbind->addr.buf; + sin->sin_family = AF_INET; + } + + tbind->qlen = 0; + tbind->addr.len = tbind->addr.maxlen; + + /* + * Need to find a reserved port in the interval + * STARTPORT - ENDPORT. Choose a random starting + * place in the interval based on the process pid + * and sequentially search the ports for one + * that is available. + */ + port = (getpid() % NPORTS) + STARTPORT; + + for (i = 0; i < NPORTS; i++) { + sin->sin_port = htons(port++); + if (port > ENDPORT) + port = STARTPORT; + /* + * Try to bind to the requested address. If + * the call to t_bind succeeds, then we need + * to make sure that the address that we bound + * to was the address that we requested. If it + * was, then we are done. If not, we fake an + * EADDRINUSE error by setting res, t_errno, + * and errno to indicate that a bind failure + * occurred. Otherwise, if the t_bind call + * failed, we check to see whether it makes + * sense to continue trying to t_bind requests. + */ + res = t_bind(fd, tbind, tres); + if (res == 0) { + if (memcmp(tbind->addr.buf, tres->addr.buf, + (int)tres->addr.len) == 0) + break; + (void) t_unbind(fd); + res = -1; + t_errno = TSYSERR; + errno = EADDRINUSE; + } else if (t_errno != TSYSERR || errno != EADDRINUSE) { + if (t_errno == TACCES) + errno = EACCES; + break; + } + } + + (void) t_free((char *)tbind, T_BIND); + (void) t_free((char *)tres, T_BIND); + return (res); +} diff --git a/usr/src/lib/librpcsvc/common/bootparam_prot.h b/usr/src/lib/librpcsvc/common/bootparam_prot.h new file mode 100644 index 0000000000..011953a35f --- /dev/null +++ b/usr/src/lib/librpcsvc/common/bootparam_prot.h @@ -0,0 +1,100 @@ +/* + * 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 1984 Sun Microsystems, Inc. All rights reserved. + * Use is subject to license terms. + */ + +#pragma ident "%Z%%M% %I% %E% SMI" + +#include <rpc/types.h> + +#include <rpc/types.h> +#include <sys/time.h> +#include <sys/errno.h> +#include <nfs/nfs.h> +#define MAX_MACHINE_NAME 255 +#define MAX_PATH_LEN 1024 +#define MAX_FILEID 32 +#define IP_ADDR_TYPE 1 + +typedef char *bp_machine_name_t; +bool_t xdr_bp_machine_name_t(); + +typedef char *bp_path_t; +bool_t xdr_bp_path_t(); + +typedef char *bp_fileid_t; +bool_t xdr_bp_fileid_t(); + +struct ip_addr_t { + char net; + char host; + char lh; + char impno; +}; +typedef struct ip_addr_t ip_addr_t; +bool_t xdr_ip_addr_t(); + +struct bp_address { + int address_type; + union { + ip_addr_t ip_addr; + } bp_address_u; +}; +typedef struct bp_address bp_address; +bool_t xdr_bp_address(); + +struct bp_whoami_arg { + bp_address client_address; +}; +typedef struct bp_whoami_arg bp_whoami_arg; +bool_t xdr_bp_whoami_arg(); + +struct bp_whoami_res { + bp_machine_name_t client_name; + bp_machine_name_t domain_name; + bp_address router_address; +}; +typedef struct bp_whoami_res bp_whoami_res; +bool_t xdr_bp_whoami_res(); + +struct bp_getfile_arg { + bp_machine_name_t client_name; + bp_fileid_t file_id; +}; +typedef struct bp_getfile_arg bp_getfile_arg; +bool_t xdr_bp_getfile_arg(); + +struct bp_getfile_res { + bp_machine_name_t server_name; + bp_address server_address; + bp_path_t server_path; +}; +typedef struct bp_getfile_res bp_getfile_res; +bool_t xdr_bp_getfile_res(); + +#define BOOTPARAMPROG ((rpcprog_t)100026) +#define BOOTPARAMVERS ((rpcvers_t)1) +#define BOOTPARAMPROC_WHOAMI ((rpcproc_t)1) +extern bp_whoami_res *bootparamproc_whoami_1(); +#define BOOTPARAMPROC_GETFILE ((rpcproc_t)2) +extern bp_getfile_res *bootparamproc_getfile_1(); diff --git a/usr/src/lib/librpcsvc/common/mountlist_xdr.c b/usr/src/lib/librpcsvc/common/mountlist_xdr.c new file mode 100644 index 0000000000..b8bb626bf3 --- /dev/null +++ b/usr/src/lib/librpcsvc/common/mountlist_xdr.c @@ -0,0 +1,166 @@ +/* + * 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) 1998 by Sun Microsystems, Inc. + * All rights reserved. + */ + + +#pragma ident "%Z%%M% %I% %E% SMI" + + +#include <stdio.h> /* for fprintf() */ +#include <stdlib.h> /* for malloc() */ +#include <rpc/types.h> +#include <rpc/xdr.h> +#include <rpcsvc/mount.h> + + +/* + * XDR routines to handle mountlist structure + * + * These are iterative versions to avoid the stack-blowing problems of + * the recursive routines generated by rpcgen. + * + * XXXX These should be removed when rpcgen is fixed to produce better + * code in these circumstances. + */ + + +bool_t +xdr_mountlist(xdrs, objp) + register XDR *xdrs; + mountlist *objp; +{ + bool_t more_data; + + switch (xdrs->x_op) { + + case XDR_FREE: { + mountbody *mb, *tmp; + + tmp = *objp; + + while (tmp != NULL) { + mb = tmp; + tmp = mb->ml_next; + if (!xdr_name(xdrs, &mb->ml_hostname)) + return (FALSE); + if (!xdr_dirpath(xdrs, &mb->ml_directory)) + return (FALSE); + free(mb); + } + + break; + } + + case XDR_DECODE: { + mountbody *mb; + mountbody *mb_prev = NULL; + + for (;;) { + if (!xdr_bool(xdrs, &more_data)) + return (FALSE); + + if (!more_data) + break; + + mb = (mountbody *)malloc(sizeof (struct mountbody)); + if (mb == NULL) { + fprintf(stderr, + "xdr_mountlist: out of memory\n"); + return (FALSE); + } + mb->ml_hostname = NULL; + mb->ml_directory = NULL; + mb->ml_next = NULL; + + if (mb_prev == NULL) { + mb_prev = mb; + *objp = mb; + } + + if (!xdr_name(xdrs, &mb->ml_hostname)) + return (FALSE); + if (!xdr_dirpath(xdrs, &mb->ml_directory)) + return (FALSE); + + if (mb_prev != mb) { + mb_prev->ml_next = mb; + mb_prev = mb; + } + } + break; + } + + case XDR_ENCODE: { + mountbody *mb; + + mb = *objp; + + for (;;) { + more_data = mb != NULL; + + if (!xdr_bool(xdrs, &more_data)) + return (FALSE); + + if (!more_data) + break; + + if (!xdr_name(xdrs, &mb->ml_hostname)) + return (FALSE); + if (!xdr_dirpath(xdrs, &mb->ml_directory)) + return (FALSE); + + mb = mb->ml_next; + } + break; + } + + default: + break; + } + + return (TRUE); +} + + +/* + * xdr_mountbody() is included here simply for backward compatibility. It is + * no longer used by xdr_mountlist(), nor by any other SunOS routine as of + * now. + * + * This is simply a copy of the rpcgen generated routine. + */ +bool_t +xdr_mountbody(xdrs, objp) + register XDR *xdrs; + mountbody *objp; +{ + if (!xdr_name(xdrs, &objp->ml_hostname)) + return (FALSE); + if (!xdr_dirpath(xdrs, &objp->ml_directory)) + return (FALSE); + if (!xdr_mountlist(xdrs, &objp->ml_next)) + return (FALSE); + return (TRUE); +} diff --git a/usr/src/lib/librpcsvc/common/rstat_simple.c b/usr/src/lib/librpcsvc/common/rstat_simple.c new file mode 100644 index 0000000000..5b55e5c53d --- /dev/null +++ b/usr/src/lib/librpcsvc/common/rstat_simple.c @@ -0,0 +1,56 @@ +/* + * 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 + */ +#pragma ident "%Z%%M% %I% %E% SMI" + +/* + * Copyright 2004 Sun Microsystems, Inc. All rights reserved. + * Use is subject to license terms. + */ + +#include <rpc/rpc.h> +#include <rpcsvc/rstat.h> + +enum clnt_stat +rstat(host, statp) + char *host; + struct statstime *statp; +{ + return (rpc_call(host, RSTATPROG, RSTATVERS_TIME, RSTATPROC_STATS, + xdr_void, (char *) NULL, + xdr_statstime, (char *) statp, (char *) NULL)); +} + +int +havedisk(host) + char *host; +{ + int32_t have; + + if (rpc_call(host, RSTATPROG, RSTATVERS_TIME, RSTATPROC_HAVEDISK, + xdr_void, (char *) NULL, + xdr_int, (char *) &have, (char *) NULL) != 0) + return (-1); + else + return (have); +} + + diff --git a/usr/src/lib/librpcsvc/common/rusers_simple.c b/usr/src/lib/librpcsvc/common/rusers_simple.c new file mode 100644 index 0000000000..3cccb42e78 --- /dev/null +++ b/usr/src/lib/librpcsvc/common/rusers_simple.c @@ -0,0 +1,134 @@ +/* + * 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 + */ +#pragma ident "%Z%%M% %I% %E% SMI" + +/* + * rusers_simple.c + * These are the "easy to use" interfaces to rusers. + * + * Copyright 2004 Sun Microsystems, Inc. All rights reserved. + * Use is subject to license terms. + */ + +#include <string.h> +#include <rpc/rpc.h> +#include <rpcsvc/rusers.h> +#include <stdlib.h> + +int +rusers3(host, uap) + char *host; + utmp_array *uap; +{ + struct utmpidlearr up; + + if (rpc_call(host, RUSERSPROG, RUSERSVERS_3, RUSERSPROC_NAMES, + xdr_void, (char *) NULL, + xdr_utmp_array, (char *) uap, (char *) NULL) != 0) { + /* + * If version 3 isn't available, try version 2. We'll have to + * convert a utmpidlearr structure into a utmp_array. + */ + up.uia_cnt = 0; + up.uia_arr = NULL; + if (rusers(host, &up) != 0) + return (-1); + else { + int i; + struct ru_utmp forsize; + rusers_utmp *rutp; + + uap->utmp_array_val = (rusers_utmp *)malloc(up.uia_cnt + * sizeof (rusers_utmp)); + if (uap->utmp_array_val == NULL) { + xdr_free(xdr_utmpidlearr, (char *)&up); + return (-1); + } + uap->utmp_array_len = up.uia_cnt; + for (rutp = uap->utmp_array_val, i = 0; + i < up.uia_cnt; rutp++, i++) { + rutp->ut_line = (char *)malloc(sizeof + (forsize.ut_line)+1); + rutp->ut_user = (char *)malloc(sizeof + (forsize.ut_name)+1); + rutp->ut_host = (char *)malloc(sizeof + (forsize.ut_host)+1); + if (rutp->ut_line == NULL || + rutp->ut_user == NULL || + rutp->ut_host == NULL) { + + while (--rutp >= uap->utmp_array_val) { + free(rutp->ut_line); + free(rutp->ut_user); + free(rutp->ut_host); + } + free(uap->utmp_array_val); + xdr_free(xdr_utmpidlearr, (char *)&up); + return (-1); + } + strncpy(rutp->ut_line, + up.uia_arr[i]->ui_utmp.ut_line, + sizeof (forsize.ut_line)+1); + strncpy(rutp->ut_user, + up.uia_arr[i]->ui_utmp.ut_name, + sizeof (forsize.ut_name)+1); + strncpy(rutp->ut_host, + up.uia_arr[i]->ui_utmp.ut_host, + sizeof (forsize.ut_host)+1); + rutp->ut_idle = up.uia_arr[i]->ui_idle; + rutp->ut_time = up.uia_arr[i]->ui_utmp.ut_time; + rutp->ut_type = RUSERS_USER_PROCESS; + /* assume this */ + } + xdr_free(xdr_utmpidlearr, (char *)&up); + } + } + return (0); +} + +int +rnusers(host) + char *host; +{ + int nusers; + + if (rpc_call(host, RUSERSPROG, RUSERSVERS_3, RUSERSPROC_NUM, + xdr_void, (char *) NULL, + xdr_u_int, (char *) &nusers, (char *) NULL) != 0) { + if (rpc_call(host, RUSERSPROG, RUSERSVERS_IDLE, RUSERSPROC_NUM, + xdr_void, (char *) NULL, + xdr_u_int, (char *) &nusers, (char *) NULL) != 0) + return (-1); + } + return (nusers); +} + +enum clnt_stat +rusers(host, up) + char *host; + struct utmpidlearr *up; +{ + return (rpc_call(host, RUSERSPROG, RUSERSVERS_IDLE, RUSERSPROC_NAMES, + xdr_void, (char *) NULL, + xdr_utmpidlearr, (char *) up, (char *) NULL)); +} + diff --git a/usr/src/lib/librpcsvc/common/rusersxdr.c b/usr/src/lib/librpcsvc/common/rusersxdr.c new file mode 100644 index 0000000000..7f0bd965f2 --- /dev/null +++ b/usr/src/lib/librpcsvc/common/rusersxdr.c @@ -0,0 +1,123 @@ +/* + * 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. + */ +/* Copyright (c) 1983, 1984, 1985, 1986, 1987, 1988, 1989 AT&T */ +/* All Rights Reserved */ +/* + * Portions of this source code were derived from Berkeley + * 4.3 BSD under license from the Regents of the University of + * California. + */ + +#pragma ident "%Z%%M% %I% %E% SMI" + +/* + * rusersxdr.c + * These are the non-rpcgen-able XDR routines for version 2 of the rusers + * protocol. + * + */ + +#include <sys/types.h> +#include <rpc/rpc.h> +#include <rpcsvc/rusers.h> + +int +xdr_ru_utmp(xdrsp, up) + XDR *xdrsp; + struct ru_utmp *up; +{ + u_int len; + char *p; + + /* + * This code implements demented byte vectors: we send out the length + * of fixed-length vectors, followed by the opaque bytes. This is to + * be compatible with the over-the-wire protocol, as well as the + * rusers.h definition for struct ru_utmp. + */ + len = (int)sizeof (up->ut_line); + if (xdr_u_int(xdrsp, &len) == FALSE) + return (0); + if (len != sizeof (up->ut_line)) { + return (0); + } + if (!xdr_opaque(xdrsp, (char *)up->ut_line, len)) { + return (0); + } + len = (int)sizeof (up->ut_name); + if (xdr_u_int(xdrsp, &len) == FALSE) + return (0); + if (len != sizeof (up->ut_name)) { + return (0); + } + if (!xdr_opaque(xdrsp, (char *)up->ut_name, len)) { + return (0); + } + len = (int)sizeof (up->ut_host); + if (xdr_u_int(xdrsp, &len) == FALSE) + return (0); + if (len != sizeof (up->ut_host)) { + return (0); + } + if (!xdr_opaque(xdrsp, (char *)up->ut_host, len)) { + return (0); + } + if (xdr_int(xdrsp, (int32_t *) &up->ut_time) == FALSE) + return (0); + return (1); +} + +int +xdr_utmpidle(xdrsp, ui) + XDR *xdrsp; + struct utmpidle *ui; +{ + if (xdr_ru_utmp(xdrsp, &ui->ui_utmp) == FALSE) + return (0); + if (xdr_u_int(xdrsp, &ui->ui_idle) == FALSE) + return (0); + return (1); +} + +int +xdr_utmpidleptr(xdrsp, up) + XDR *xdrsp; + struct utmpidle **up; +{ + if (xdr_reference(xdrsp, (char **) up, sizeof (struct utmpidle), + xdr_utmpidle) == FALSE) + return (0); + return (1); +} + +int +xdr_utmpidlearr(xdrsp, up) + XDR *xdrsp; + struct utmpidlearr *up; +{ + return (xdr_array(xdrsp, (char **) &up->uia_arr, + (u_int *)&(up->uia_cnt), MAXUSERS, sizeof (struct utmpidle *), + xdr_utmpidleptr)); +} diff --git a/usr/src/lib/librpcsvc/common/rwallxdr.c b/usr/src/lib/librpcsvc/common/rwallxdr.c new file mode 100644 index 0000000000..b8b9315aba --- /dev/null +++ b/usr/src/lib/librpcsvc/common/rwallxdr.c @@ -0,0 +1,52 @@ +/* + * 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 1989 Sun Microsystems, Inc. All rights reserved. + * Use is subject to license terms. + */ + +/* Copyright (c) 1983, 1984, 1985, 1986, 1987, 1988, 1989 AT&T */ +/* All Rights Reserved */ + +/* + * Portions of this source code were derived from Berkeley 4.3 BSD + * under license from the Regents of the University of California. + */ + +#ident "%Z%%M% %I% %E% SMI" + +#if !defined(lint) && defined(SCCSIDS) +static char sccsid[] = "@(#)rwallxdr.c 1.3 89/03/24 Copyr 1985 Sun Micro"; +#endif + +#include <rpc/rpc.h> +#include <rpcsvc/rwall.h> + +enum clnt_stat +rwall(host, msg) + char *host; + char *msg; +{ + return (rpc_call(host, WALLPROG, WALLVERS, WALLPROC_WALL, + xdr_wrapstring, (char *) &msg, + xdr_void, (char *) NULL, (char *) NULL)); +} diff --git a/usr/src/lib/librpcsvc/i386/Makefile b/usr/src/lib/librpcsvc/i386/Makefile new file mode 100644 index 0000000000..d51e3be102 --- /dev/null +++ b/usr/src/lib/librpcsvc/i386/Makefile @@ -0,0 +1,36 @@ +# +# 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 1997-2003 Sun Microsystems, Inc. All rights reserved. +# Use is subject to license terms. +# +# ident "%Z%%M% %I% %E% SMI" +# +# lib/librpcsvc/i386/Makefile + +MAPDIR= ../spec/i386 + +include ../Makefile.com + +all: $(LIBS) + +install: all $(ROOTLIBS) $(ROOTLINKS) diff --git a/usr/src/lib/librpcsvc/sparc/Makefile b/usr/src/lib/librpcsvc/sparc/Makefile new file mode 100644 index 0000000000..673b48987c --- /dev/null +++ b/usr/src/lib/librpcsvc/sparc/Makefile @@ -0,0 +1,36 @@ +# +# 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 1997-2003 Sun Microsystems, Inc. All rights reserved. +# Use is subject to license terms. +# +# ident "%Z%%M% %I% %E% SMI" +# +# lib/librpcsvc/sparc/Makefile + +MAPDIR= ../spec/sparc + +include ../Makefile.com + +all: $(LIBS) + +install: all $(ROOTLIBS) $(ROOTLINKS) diff --git a/usr/src/lib/librpcsvc/sparcv9/Makefile b/usr/src/lib/librpcsvc/sparcv9/Makefile new file mode 100644 index 0000000000..e20daa29e0 --- /dev/null +++ b/usr/src/lib/librpcsvc/sparcv9/Makefile @@ -0,0 +1,41 @@ +# +# 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 1997-2003 Sun Microsystems, Inc. All rights reserved. +# Use is subject to license terms. +# +# ident "%Z%%M% %I% %E% SMI" +# +# lib/librpcsvc/sparcv9/Makefile + +MAPDIR= ../spec/sparcv9 + +include ../Makefile.com +include ../../Makefile.lib.64 + +all: $(LIBS) + +install: all $(ROOTLIBS64) $(ROOTLINKS64) + +# This needs to be restated, otherwise we'll be dependent +# on the 32bit mapfile... +$(DYNLIB): $(MAPFILE) diff --git a/usr/src/lib/librpcsvc/spec/Makefile b/usr/src/lib/librpcsvc/spec/Makefile new file mode 100644 index 0000000000..b8db3ec14e --- /dev/null +++ b/usr/src/lib/librpcsvc/spec/Makefile @@ -0,0 +1,29 @@ +# +# 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" +# +# Copyright (c) 1998-1999 by Sun Microsystems, Inc. +# All rights reserved. +# +# lib/librpcsvc/spec/Makefile + +include $(SRC)/lib/Makefile.spec.arch diff --git a/usr/src/lib/librpcsvc/spec/Makefile.targ b/usr/src/lib/librpcsvc/spec/Makefile.targ new file mode 100644 index 0000000000..16f656ded0 --- /dev/null +++ b/usr/src/lib/librpcsvc/spec/Makefile.targ @@ -0,0 +1,33 @@ +# +# 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" +# +# Copyright (c) 1998-1999 by Sun Microsystems, Inc. +# All rights reserved. +# +# lib/librpcsvc/spec/Makefile.targ + +LIBRARY = librpcsvc.a +VERS = .1 + +OBJECTS = rpcsvc.o + diff --git a/usr/src/lib/librpcsvc/spec/amd64/Makefile b/usr/src/lib/librpcsvc/spec/amd64/Makefile new file mode 100644 index 0000000000..453c0ea671 --- /dev/null +++ b/usr/src/lib/librpcsvc/spec/amd64/Makefile @@ -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 2004 Sun Microsystems, Inc. All rights reserved. +# Use is subject to license terms. +# +# ident "%Z%%M% %I% %E% SMI" +# + +.KEEP_STATE: + +include ../Makefile.targ + +# Add arch specific objects here +OBJECTS += + +include $(SRC)/lib/Makefile.lib +include $(SRC)/lib/Makefile.lib.64 + +# Uncomment the following if the linker complains +#amd64_C_PICFLAGS = -K PIC + +include $(SRC)/lib/Makefile.spec + +install: $(ROOTABILIB64) diff --git a/usr/src/lib/librpcsvc/spec/i386/Makefile b/usr/src/lib/librpcsvc/spec/i386/Makefile new file mode 100644 index 0000000000..65942c1722 --- /dev/null +++ b/usr/src/lib/librpcsvc/spec/i386/Makefile @@ -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 +# +# +#ident "%Z%%M% %I% %E% SMI" +# +# Copyright (c) 1998-1999 by Sun Microsystems, Inc. +# All rights reserved. +# +# lib/librpcsvc/spec/i386/Makefile + +.KEEP_STATE: + +include ../Makefile.targ + +# Add arch specific objects here +OBJECTS += + +include $(SRC)/lib/Makefile.lib + +# Uncomment the following if the linker complains +#i386_C_PICFLAGS = -K PIC + +include $(SRC)/lib/Makefile.spec + +install: $(ROOTABILIB) diff --git a/usr/src/lib/librpcsvc/spec/rpcsvc.spec b/usr/src/lib/librpcsvc/spec/rpcsvc.spec new file mode 100644 index 0000000000..3567a7ad0b --- /dev/null +++ b/usr/src/lib/librpcsvc/spec/rpcsvc.spec @@ -0,0 +1,407 @@ +# +# 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 +# +#pragma ident "%Z%%M% %I% %E% SMI" +# +# lib/librpcsvc/spec/rpcsvc.spec + +function rstat +include <rpc/rpc.h>, <rpcsvc/rstat.h> +declaration enum clnt_stat rstat(char *host, struct statstime *statp ) +version SUNW_0.7 +exception $return != RPC_SUCCESS +end + +function havedisk +include <rpc/rpc.h>, <rpcsvc/rstat.h> +declaration int havedisk(char *host ) +version SUNW_0.7 +exception $return == 0 +end + +function rusers +include <rpc/rpc.h>, <rpcsvc/rusers.h> +declaration enum clnt_stat rusers(char *host, struct utmpidlearr *up ) +version SUNW_0.7 +exception $return != 0 +end + +function rnusers +include <rpc/rpc.h>, <rpcsvc/rusers.h> +declaration int rnusers(char *host ) +version SUNW_0.7 +exception $return != 0 +end + +function rwall +include <rpc/rpc.h>, <rpcsvc/rwall.h> +declaration enum clnt_stat rwall(char *host, char *msg ) +version SUNW_0.7 +exception $return != RPC_SUCCESS +end + +function xdr_statstime +version SUNW_0.7 +end + +function xdr_statsvar +version SUNW_0.7 +end + +function xdr_utmpidlearr +version SUNW_0.7 +end + +function __clnt_bindresvport +version SUNWprivate_1.1 +end + +function xdr_bp_address +version SUNWprivate_1.1 +end + +function xdr_bp_fileid_t +version SUNWprivate_1.1 +end + +function xdr_bp_getfile_arg +version SUNWprivate_1.1 +end + +function xdr_bp_getfile_res +version SUNWprivate_1.1 +end + +function xdr_bp_machine_name_t +version SUNWprivate_1.1 +end + +function xdr_bp_path_t +version SUNWprivate_1.1 +end + +function xdr_bp_whoami_arg +version SUNWprivate_1.1 +end + +function xdr_bp_whoami_res +version SUNWprivate_1.1 +end + +function xdr_dirpath +version SUNWprivate_1.1 +end + +function xdr_exportnode +version SUNWprivate_1.1 +end + +function xdr_exports +version SUNWprivate_1.1 +end + +function xdr_fhandle +version SUNWprivate_1.1 +end + +function xdr_fhandle3 +version SUNWprivate_1.1 +end + +function xdr_fhstatus +version SUNWprivate_1.1 +end + +function xdr_fsh4_access +version SUNWprivate_1.1 +end + +function xdr_fsh4_mode +version SUNWprivate_1.1 +end + +function xdr_fsh_access +version SUNWprivate_1.1 +end + +function xdr_fsh_mode +version SUNWprivate_1.1 +end + +function xdr_groupnode +version SUNWprivate_1.1 +end + +function xdr_groups +version SUNWprivate_1.1 +end + +function xdr_int32 +version SUNWprivate_1.1 +end + +function xdr_int64 +version SUNWprivate_1.1 +end + +function xdr_ip_addr_t +version SUNWprivate_1.1 +end + +function xdr_mon +version SUNWprivate_1.1 +end + +function xdr_mon_id +version SUNWprivate_1.1 +end + +function xdr_mountbody +version SUNWprivate_1.1 +end + +function xdr_mountlist +version SUNWprivate_1.1 +end + +function xdr_mountres3 +version SUNWprivate_1.1 +end + +function xdr_mountres3_ok +version SUNWprivate_1.1 +end + +function xdr_mountstat3 +version SUNWprivate_1.1 +end + +function xdr_my_id +version SUNWprivate_1.1 +end + +function xdr_name +version SUNWprivate_1.1 +end + +function xdr_nlm4_cancargs +version SUNWprivate_1.1 +end + +function xdr_nlm4_holder +version SUNWprivate_1.1 +end + +function xdr_nlm4_lock +version SUNWprivate_1.1 +end + +function xdr_nlm4_lockargs +version SUNWprivate_1.1 +end + +function xdr_nlm4_notify +version SUNWprivate_1.1 +end + +function xdr_nlm4_res +version SUNWprivate_1.1 +end + +function xdr_nlm4_share +version SUNWprivate_1.1 +end + +function xdr_nlm4_shareargs +version SUNWprivate_1.1 +end + +function xdr_nlm4_shareres +version SUNWprivate_1.1 +end + +function xdr_nlm4_stat +version SUNWprivate_1.1 +end + +function xdr_nlm4_stats +version SUNWprivate_1.1 +end + +function xdr_nlm4_testargs +version SUNWprivate_1.1 +end + +function xdr_nlm4_testres +version SUNWprivate_1.1 +end + +function xdr_nlm4_testrply +version SUNWprivate_1.1 +end + +function xdr_nlm4_unlockargs +version SUNWprivate_1.1 +end + +function xdr_nlm_cancargs +version SUNWprivate_1.1 +end + +function xdr_nlm_holder +version SUNWprivate_1.1 +end + +function xdr_nlm_lock +version SUNWprivate_1.1 +end + +function xdr_nlm_lockargs +version SUNWprivate_1.1 +end + +function xdr_nlm_notify +version SUNWprivate_1.1 +end + +function xdr_nlm_res +version SUNWprivate_1.1 +end + +function xdr_nlm_share +version SUNWprivate_1.1 +end + +function xdr_nlm_shareargs +version SUNWprivate_1.1 +end + +function xdr_nlm_shareres +version SUNWprivate_1.1 +end + +function xdr_nlm_stat +version SUNWprivate_1.1 +end + +function xdr_nlm_stats +version SUNWprivate_1.1 +end + +function xdr_nlm_testargs +version SUNWprivate_1.1 +end + +function xdr_nlm_testres +version SUNWprivate_1.1 +end + +function xdr_nlm_testrply +version SUNWprivate_1.1 +end + +function xdr_nlm_unlockargs +version SUNWprivate_1.1 +end + +function xdr_ppathcnf +version SUNWprivate_1.1 +end + +function xdr_res +version SUNWprivate_1.1 +end + +function xdr_rstat_timeval +version SUNWprivate_1.1 +end + +function xdr_rusers_utmp +version SUNWprivate_1.1 +end + +function xdr_sm_name +version SUNWprivate_1.1 +end + +function xdr_sm_stat +version SUNWprivate_1.1 +end + +function xdr_sm_stat_res +version SUNWprivate_1.1 +end + +function xdr_sprayarr +version SUNWprivate_1.1 +end + +function xdr_spraycumul +version SUNWprivate_1.1 +end + +function xdr_spraytimeval +version SUNWprivate_1.1 +end + +function xdr_stat_chge +version SUNWprivate_1.1 +end + +function xdr_status +version SUNWprivate_1.1 +end + +function xdr_timeval +version SUNWprivate_1.1 +end + +function xdr_uint32 +version SUNWprivate_1.1 +end + +function xdr_uint64 +version SUNWprivate_1.1 +end + +function xdr_utmp_array +version SUNWprivate_1.1 +end + +function xdr_reg1args +version SUNWprivate_1.1 +end + +function xdr_reg1res +version SUNWprivate_1.1 +end + +function xdr_unreg1args +version SUNWprivate_1.1 +end + +function xdr_unreg1res +version SUNWprivate_1.1 +end + diff --git a/usr/src/lib/librpcsvc/spec/sparc/Makefile b/usr/src/lib/librpcsvc/spec/sparc/Makefile new file mode 100644 index 0000000000..b7fbb05116 --- /dev/null +++ b/usr/src/lib/librpcsvc/spec/sparc/Makefile @@ -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 +# +# +#ident "%Z%%M% %I% %E% SMI" +# +# Copyright (c) 1998-1999 by Sun Microsystems, Inc. +# All rights reserved. +# +# lib/librpcsvc/spec/sparc/Makefile + +.KEEP_STATE: + +include ../Makefile.targ + +# Add arch specific objects here +OBJECTS += + +include $(SRC)/lib/Makefile.lib + +# Uncomment the following if the linker complains +#sparc_C_PICFLAGS = -K PIC + +include $(SRC)/lib/Makefile.spec + +install: $(ROOTABILIB) diff --git a/usr/src/lib/librpcsvc/spec/sparcv9/Makefile b/usr/src/lib/librpcsvc/spec/sparcv9/Makefile new file mode 100644 index 0000000000..012d10c3eb --- /dev/null +++ b/usr/src/lib/librpcsvc/spec/sparcv9/Makefile @@ -0,0 +1,45 @@ +# +# 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" +# +# Copyright (c) 1998-1999 by Sun Microsystems, Inc. +# All rights reserved. +# +# lib/librpcsvc/spec/sparcv9/Makefile + +.KEEP_STATE: + +include ../Makefile.targ + +# Add arch specific objects here +OBJECTS += + +include $(SRC)/lib/Makefile.lib +include $(SRC)/lib/Makefile.lib.64 + +# Uncomment the following if the linker complains +#sparcv9_C_PICFLAGS = -K PIC + +include $(SRC)/lib/Makefile.spec + +install: $(ROOTABILIB64) diff --git a/usr/src/lib/librpcsvc/spec/versions b/usr/src/lib/librpcsvc/spec/versions new file mode 100644 index 0000000000..2fed5f1c60 --- /dev/null +++ b/usr/src/lib/librpcsvc/spec/versions @@ -0,0 +1,52 @@ +# +# 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" +# +# Note: Even though the SUNW_1.1 version now contains no symbols +# beyond what was present at Solaris 2.3, the SUNW_1.1 version MUST be +# present. This is because applications built on 2.6 Beta +# (when it did contain symbols explicitly) may depend on it. +# + +sparc { + SUNW_1.1: {SUNW_0.7}; + SUNW_0.7; + SUNWprivate_1.1; +} +sparcv9 { + SUNW_1.1: {SUNW_0.7}; + SUNW_0.7; + SUNWprivate_1.1; +} +i386 { + SUNW_1.1: {SUNW_0.7}; + SUNW_0.7; + SUNWprivate_1.1; +} +amd64 { + SUNW_1.1: {SUNW_0.7}; + SUNW_0.7; + SUNWprivate_1.1; +} |
