Rpcgen bugs that required us to have separate src, include, and object
directories have long been fixed. This allows us to bring the *.x files up into the main librpcsvc directory where they belong.
This commit is contained in:
parent
a37f3d9ae8
commit
958e765ff5
@ -1,7 +1,5 @@
|
||||
# $Id: Makefile,v 1.11 1995/01/12 19:27:15 jtc Exp $
|
||||
# $Id: Makefile,v 1.12 1995/01/12 19:39:43 jtc Exp $
|
||||
|
||||
RPCDIR= ${.CURDIR}/src
|
||||
.PATH: ${RPCDIR}
|
||||
|
||||
RPCSRCS= bootparam_prot.x klm_prot.x mount.x nfs_prot.x\
|
||||
nlm_prot.x rex.x rnusers.x rusers.x rquota.x rstat.x rwall.x\
|
||||
@ -21,13 +19,13 @@ beforeinstall:
|
||||
install -d -o ${BINOWN} -g ${BINGRP} -m 755 \
|
||||
${DESTDIR}/usr/include/rpcsvc
|
||||
@for i in $(HDRS); do \
|
||||
cmp -s $$i ${DESTDIR}/usr/include/rpcsvc/$$i > /dev/null 2>&1 || \
|
||||
cmp -s $$i ${DESTDIR}/usr/include/rpcsvc/$$i || \
|
||||
install -c -o ${BINOWN} -g ${BINGRP} -m 444 $$i \
|
||||
${DESTDIR}/usr/include/rpcsvc; \
|
||||
done
|
||||
@for i in $(RPCSRCS); do \
|
||||
cmp -s ${RPCDIR}/$$i ${DESTDIR}/usr/include/rpcsvc/$$i > /dev/null 2>&1 || \
|
||||
install -c -o ${BINOWN} -g ${BINGRP} -m 444 ${RPCDIR}/$$i \
|
||||
cmp -s $(.CURDIR)/$$i ${DESTDIR}/usr/include/rpcsvc/$$i || \
|
||||
install -c -o ${BINOWN} -g ${BINGRP} -m 444 $(.CURDIR)/$$i \
|
||||
${DESTDIR}/usr/include/rpcsvc; \
|
||||
done
|
||||
|
||||
|
103
lib/librpcsvc/bootparam_prot.x
Normal file
103
lib/librpcsvc/bootparam_prot.x
Normal file
@ -0,0 +1,103 @@
|
||||
/*
|
||||
* Sun RPC is a product of Sun Microsystems, Inc. and is provided for
|
||||
* unrestricted use provided that this legend is included on all tape
|
||||
* media and as a part of the software program in whole or part. Users
|
||||
* may copy or modify Sun RPC without charge, but are not authorized
|
||||
* to license or distribute it to anyone else except as part of a product or
|
||||
* program developed by the user.
|
||||
*
|
||||
* SUN RPC IS PROVIDED AS IS WITH NO WARRANTIES OF ANY KIND INCLUDING THE
|
||||
* WARRANTIES OF DESIGN, MERCHANTIBILITY AND FITNESS FOR A PARTICULAR
|
||||
* PURPOSE, OR ARISING FROM A COURSE OF DEALING, USAGE OR TRADE PRACTICE.
|
||||
*
|
||||
* Sun RPC is provided with no support and without any obligation on the
|
||||
* part of Sun Microsystems, Inc. to assist in its use, correction,
|
||||
* modification or enhancement.
|
||||
*
|
||||
* SUN MICROSYSTEMS, INC. SHALL HAVE NO LIABILITY WITH RESPECT TO THE
|
||||
* INFRINGEMENT OF COPYRIGHTS, TRADE SECRETS OR ANY PATENTS BY SUN RPC
|
||||
* OR ANY PART THEREOF.
|
||||
*
|
||||
* In no event will Sun Microsystems, Inc. be liable for any lost revenue
|
||||
* or profits or other special, indirect and consequential damages, even if
|
||||
* Sun has been advised of the possibility of such damages.
|
||||
*
|
||||
* Sun Microsystems, Inc.
|
||||
* 2550 Garcia Avenue
|
||||
* Mountain View, California 94043
|
||||
*/
|
||||
|
||||
/*
|
||||
* RPC for bootparms service.
|
||||
* There are two procedures:
|
||||
* WHOAMI takes a net address and returns a client name and also a
|
||||
* likely net address for routing
|
||||
* GETFILE takes a client name and file identifier and returns the
|
||||
* server name, server net address and pathname for the file.
|
||||
* file identifiers typically include root, swap, pub and dump
|
||||
*/
|
||||
|
||||
#ifdef RPC_HDR
|
||||
%#include <sys/param.h>
|
||||
%#include <rpc/types.h>
|
||||
%#include <sys/time.h>
|
||||
%#include <sys/errno.h>
|
||||
%#include <sys/ucred.h>
|
||||
%#include <nfs/nfsv2.h>
|
||||
%#include <nfs/nfs.h>
|
||||
#else
|
||||
%#ifndef lint
|
||||
%/*static char sccsid[] = "from: @(#)bootparam_prot.x 1.2 87/06/24 Copyr 1987 Sun Micro";*/
|
||||
%/*static char sccsid[] = "from: @(#)bootparam_prot.x 2.1 88/08/01 4.0 RPCSRC";*/
|
||||
%static char rcsid[] = "$Id: bootparam_prot.x,v 1.1 1995/01/12 19:39:45 jtc Exp $";
|
||||
%#endif /* not lint */
|
||||
#endif
|
||||
|
||||
const MAX_MACHINE_NAME = 255;
|
||||
const MAX_PATH_LEN = 1024;
|
||||
const MAX_FILEID = 32;
|
||||
const IP_ADDR_TYPE = 1;
|
||||
|
||||
typedef string bp_machine_name_t<MAX_MACHINE_NAME>;
|
||||
typedef string bp_path_t<MAX_PATH_LEN>;
|
||||
typedef string bp_fileid_t<MAX_FILEID>;
|
||||
|
||||
struct ip_addr_t {
|
||||
char net;
|
||||
char host;
|
||||
char lh;
|
||||
char impno;
|
||||
};
|
||||
|
||||
union bp_address switch (int address_type) {
|
||||
case IP_ADDR_TYPE:
|
||||
ip_addr_t ip_addr;
|
||||
};
|
||||
|
||||
struct bp_whoami_arg {
|
||||
bp_address client_address;
|
||||
};
|
||||
|
||||
struct bp_whoami_res {
|
||||
bp_machine_name_t client_name;
|
||||
bp_machine_name_t domain_name;
|
||||
bp_address router_address;
|
||||
};
|
||||
|
||||
struct bp_getfile_arg {
|
||||
bp_machine_name_t client_name;
|
||||
bp_fileid_t file_id;
|
||||
};
|
||||
|
||||
struct bp_getfile_res {
|
||||
bp_machine_name_t server_name;
|
||||
bp_address server_address;
|
||||
bp_path_t server_path;
|
||||
};
|
||||
|
||||
program BOOTPARAMPROG {
|
||||
version BOOTPARAMVERS {
|
||||
bp_whoami_res BOOTPARAMPROC_WHOAMI(bp_whoami_arg) = 1;
|
||||
bp_getfile_res BOOTPARAMPROC_GETFILE(bp_getfile_arg) = 2;
|
||||
} = 1;
|
||||
} = 100026;
|
138
lib/librpcsvc/klm_prot.x
Normal file
138
lib/librpcsvc/klm_prot.x
Normal file
@ -0,0 +1,138 @@
|
||||
/*
|
||||
* Sun RPC is a product of Sun Microsystems, Inc. and is provided for
|
||||
* unrestricted use provided that this legend is included on all tape
|
||||
* media and as a part of the software program in whole or part. Users
|
||||
* may copy or modify Sun RPC without charge, but are not authorized
|
||||
* to license or distribute it to anyone else except as part of a product or
|
||||
* program developed by the user.
|
||||
*
|
||||
* SUN RPC IS PROVIDED AS IS WITH NO WARRANTIES OF ANY KIND INCLUDING THE
|
||||
* WARRANTIES OF DESIGN, MERCHANTIBILITY AND FITNESS FOR A PARTICULAR
|
||||
* PURPOSE, OR ARISING FROM A COURSE OF DEALING, USAGE OR TRADE PRACTICE.
|
||||
*
|
||||
* Sun RPC is provided with no support and without any obligation on the
|
||||
* part of Sun Microsystems, Inc. to assist in its use, correction,
|
||||
* modification or enhancement.
|
||||
*
|
||||
* SUN MICROSYSTEMS, INC. SHALL HAVE NO LIABILITY WITH RESPECT TO THE
|
||||
* INFRINGEMENT OF COPYRIGHTS, TRADE SECRETS OR ANY PATENTS BY SUN RPC
|
||||
* OR ANY PART THEREOF.
|
||||
*
|
||||
* In no event will Sun Microsystems, Inc. be liable for any lost revenue
|
||||
* or profits or other special, indirect and consequential damages, even if
|
||||
* Sun has been advised of the possibility of such damages.
|
||||
*
|
||||
* Sun Microsystems, Inc.
|
||||
* 2550 Garcia Avenue
|
||||
* Mountain View, California 94043
|
||||
*/
|
||||
|
||||
/*
|
||||
* Kernel/lock manager protocol definition
|
||||
* Copyright (C) 1986 Sun Microsystems, Inc.
|
||||
*
|
||||
* protocol used between the UNIX kernel (the "client") and the
|
||||
* local lock manager. The local lock manager is a deamon running
|
||||
* above the kernel.
|
||||
*/
|
||||
|
||||
#ifndef RPC_HDR
|
||||
%#ifndef lint
|
||||
%/*static char sccsid[] = "from: @(#)klm_prot.x 1.7 87/07/08 Copyr 1987 Sun Micro";*/
|
||||
%/*static char sccsid[] = "from: @(#)klm_prot.x 2.1 88/08/01 4.0 RPCSRC";*/
|
||||
%static char rcsid[] = "$Id: klm_prot.x,v 1.1 1995/01/12 19:39:46 jtc Exp $";
|
||||
%#endif /* not lint */
|
||||
#endif
|
||||
|
||||
const LM_MAXSTRLEN = 1024;
|
||||
|
||||
/*
|
||||
* lock manager status returns
|
||||
*/
|
||||
enum klm_stats {
|
||||
klm_granted = 0, /* lock is granted */
|
||||
klm_denied = 1, /* lock is denied */
|
||||
klm_denied_nolocks = 2, /* no lock entry available */
|
||||
klm_working = 3 /* lock is being processed */
|
||||
};
|
||||
|
||||
/*
|
||||
* lock manager lock identifier
|
||||
*/
|
||||
struct klm_lock {
|
||||
string server_name<LM_MAXSTRLEN>;
|
||||
netobj fh; /* a counted file handle */
|
||||
int pid; /* holder of the lock */
|
||||
unsigned l_offset; /* beginning offset of the lock */
|
||||
unsigned l_len; /* byte length of the lock;
|
||||
* zero means through end of file */
|
||||
};
|
||||
|
||||
/*
|
||||
* lock holder identifier
|
||||
*/
|
||||
struct klm_holder {
|
||||
bool exclusive; /* FALSE if shared lock */
|
||||
int svid; /* holder of the lock (pid) */
|
||||
unsigned l_offset; /* beginning offset of the lock */
|
||||
unsigned l_len; /* byte length of the lock;
|
||||
* zero means through end of file */
|
||||
};
|
||||
|
||||
/*
|
||||
* reply to KLM_LOCK / KLM_UNLOCK / KLM_CANCEL
|
||||
*/
|
||||
struct klm_stat {
|
||||
klm_stats stat;
|
||||
};
|
||||
|
||||
/*
|
||||
* reply to a KLM_TEST call
|
||||
*/
|
||||
union klm_testrply switch (klm_stats stat) {
|
||||
case klm_denied:
|
||||
struct klm_holder holder;
|
||||
default: /* All other cases return no arguments */
|
||||
void;
|
||||
};
|
||||
|
||||
|
||||
/*
|
||||
* arguments to KLM_LOCK
|
||||
*/
|
||||
struct klm_lockargs {
|
||||
bool block;
|
||||
bool exclusive;
|
||||
struct klm_lock alock;
|
||||
};
|
||||
|
||||
/*
|
||||
* arguments to KLM_TEST
|
||||
*/
|
||||
struct klm_testargs {
|
||||
bool exclusive;
|
||||
struct klm_lock alock;
|
||||
};
|
||||
|
||||
/*
|
||||
* arguments to KLM_UNLOCK
|
||||
*/
|
||||
struct klm_unlockargs {
|
||||
struct klm_lock alock;
|
||||
};
|
||||
|
||||
program KLM_PROG {
|
||||
version KLM_VERS {
|
||||
|
||||
klm_testrply KLM_TEST (struct klm_testargs) = 1;
|
||||
|
||||
klm_stat KLM_LOCK (struct klm_lockargs) = 2;
|
||||
|
||||
klm_stat KLM_CANCEL (struct klm_lockargs) = 3;
|
||||
/* klm_granted=> the cancel request fails due to lock is already granted */
|
||||
/* klm_denied=> the cancel request successfully aborts
|
||||
lock request */
|
||||
|
||||
klm_stat KLM_UNLOCK (struct klm_unlockargs) = 4;
|
||||
} = 1;
|
||||
} = 100020;
|
165
lib/librpcsvc/mount.x
Normal file
165
lib/librpcsvc/mount.x
Normal file
@ -0,0 +1,165 @@
|
||||
/*
|
||||
* Sun RPC is a product of Sun Microsystems, Inc. and is provided for
|
||||
* unrestricted use provided that this legend is included on all tape
|
||||
* media and as a part of the software program in whole or part. Users
|
||||
* may copy or modify Sun RPC without charge, but are not authorized
|
||||
* to license or distribute it to anyone else except as part of a product or
|
||||
* program developed by the user.
|
||||
*
|
||||
* SUN RPC IS PROVIDED AS IS WITH NO WARRANTIES OF ANY KIND INCLUDING THE
|
||||
* WARRANTIES OF DESIGN, MERCHANTIBILITY AND FITNESS FOR A PARTICULAR
|
||||
* PURPOSE, OR ARISING FROM A COURSE OF DEALING, USAGE OR TRADE PRACTICE.
|
||||
*
|
||||
* Sun RPC is provided with no support and without any obligation on the
|
||||
* part of Sun Microsystems, Inc. to assist in its use, correction,
|
||||
* modification or enhancement.
|
||||
*
|
||||
* SUN MICROSYSTEMS, INC. SHALL HAVE NO LIABILITY WITH RESPECT TO THE
|
||||
* INFRINGEMENT OF COPYRIGHTS, TRADE SECRETS OR ANY PATENTS BY SUN RPC
|
||||
* OR ANY PART THEREOF.
|
||||
*
|
||||
* In no event will Sun Microsystems, Inc. be liable for any lost revenue
|
||||
* or profits or other special, indirect and consequential damages, even if
|
||||
* Sun has been advised of the possibility of such damages.
|
||||
*
|
||||
* Sun Microsystems, Inc.
|
||||
* 2550 Garcia Avenue
|
||||
* Mountain View, California 94043
|
||||
*/
|
||||
|
||||
/*
|
||||
* Protocol description for the mount program
|
||||
*/
|
||||
|
||||
#ifndef RPC_HDR
|
||||
%#ifndef lint
|
||||
%/*static char sccsid[] = "from: @(#)mount.x 1.2 87/09/18 Copyr 1987 Sun Micro";*/
|
||||
%/*static char sccsid[] = "from: @(#)mount.x 2.1 88/08/01 4.0 RPCSRC";*/
|
||||
%static char rcsid[] = "$Id: mount.x,v 1.1 1995/01/12 19:39:47 jtc Exp $";
|
||||
%#endif /* not lint */
|
||||
#endif
|
||||
|
||||
const MNTPATHLEN = 1024; /* maximum bytes in a pathname argument */
|
||||
const MNTNAMLEN = 255; /* maximum bytes in a name argument */
|
||||
const FHSIZE = 32; /* size in bytes of a file handle */
|
||||
|
||||
/*
|
||||
* The fhandle is the file handle that the server passes to the client.
|
||||
* All file operations are done using the file handles to refer to a file
|
||||
* or a directory. The file handle can contain whatever information the
|
||||
* server needs to distinguish an individual file.
|
||||
*/
|
||||
typedef opaque fhandle[FHSIZE];
|
||||
|
||||
/*
|
||||
* If a status of zero is returned, the call completed successfully, and
|
||||
* a file handle for the directory follows. A non-zero status indicates
|
||||
* some sort of error. The status corresponds with UNIX error numbers.
|
||||
*/
|
||||
union fhstatus switch (unsigned fhs_status) {
|
||||
case 0:
|
||||
fhandle fhs_fhandle;
|
||||
default:
|
||||
void;
|
||||
};
|
||||
|
||||
/*
|
||||
* The type dirpath is the pathname of a directory
|
||||
*/
|
||||
typedef string dirpath<MNTPATHLEN>;
|
||||
|
||||
/*
|
||||
* The type name is used for arbitrary names (hostnames, groupnames)
|
||||
*/
|
||||
typedef string name<MNTNAMLEN>;
|
||||
|
||||
/*
|
||||
* A list of who has what mounted
|
||||
*/
|
||||
typedef struct mountbody *mountlist;
|
||||
struct mountbody {
|
||||
name ml_hostname;
|
||||
dirpath ml_directory;
|
||||
mountlist ml_next;
|
||||
};
|
||||
|
||||
/*
|
||||
* A list of netgroups
|
||||
*/
|
||||
typedef struct groupnode *groups;
|
||||
struct groupnode {
|
||||
name gr_name;
|
||||
groups gr_next;
|
||||
};
|
||||
|
||||
/*
|
||||
* A list of what is exported and to whom
|
||||
*/
|
||||
typedef struct exportnode *exports;
|
||||
struct exportnode {
|
||||
dirpath ex_dir;
|
||||
groups ex_groups;
|
||||
exports ex_next;
|
||||
};
|
||||
|
||||
program MOUNTPROG {
|
||||
/*
|
||||
* Version one of the mount protocol communicates with version two
|
||||
* of the NFS protocol. The only connecting point is the fhandle
|
||||
* structure, which is the same for both protocols.
|
||||
*/
|
||||
version MOUNTVERS {
|
||||
/*
|
||||
* Does no work. It is made available in all RPC services
|
||||
* to allow server reponse testing and timing
|
||||
*/
|
||||
void
|
||||
MOUNTPROC_NULL(void) = 0;
|
||||
|
||||
/*
|
||||
* If fhs_status is 0, then fhs_fhandle contains the
|
||||
* file handle for the directory. This file handle may
|
||||
* be used in the NFS protocol. This procedure also adds
|
||||
* a new entry to the mount list for this client mounting
|
||||
* the directory.
|
||||
* Unix authentication required.
|
||||
*/
|
||||
fhstatus
|
||||
MOUNTPROC_MNT(dirpath) = 1;
|
||||
|
||||
/*
|
||||
* Returns the list of remotely mounted filesystems. The
|
||||
* mountlist contains one entry for each hostname and
|
||||
* directory pair.
|
||||
*/
|
||||
mountlist
|
||||
MOUNTPROC_DUMP(void) = 2;
|
||||
|
||||
/*
|
||||
* Removes the mount list entry for the directory
|
||||
* Unix authentication required.
|
||||
*/
|
||||
void
|
||||
MOUNTPROC_UMNT(dirpath) = 3;
|
||||
|
||||
/*
|
||||
* Removes all of the mount list entries for this client
|
||||
* Unix authentication required.
|
||||
*/
|
||||
void
|
||||
MOUNTPROC_UMNTALL(void) = 4;
|
||||
|
||||
/*
|
||||
* Returns a list of all the exported filesystems, and which
|
||||
* machines are allowed to import it.
|
||||
*/
|
||||
exports
|
||||
MOUNTPROC_EXPORT(void) = 5;
|
||||
|
||||
/*
|
||||
* Identical to MOUNTPROC_EXPORT above
|
||||
*/
|
||||
exports
|
||||
MOUNTPROC_EXPORTALL(void) = 6;
|
||||
} = 1;
|
||||
} = 100005;
|
357
lib/librpcsvc/nfs_prot.x
Normal file
357
lib/librpcsvc/nfs_prot.x
Normal file
@ -0,0 +1,357 @@
|
||||
/*
|
||||
* Sun RPC is a product of Sun Microsystems, Inc. and is provided for
|
||||
* unrestricted use provided that this legend is included on all tape
|
||||
* media and as a part of the software program in whole or part. Users
|
||||
* may copy or modify Sun RPC without charge, but are not authorized
|
||||
* to license or distribute it to anyone else except as part of a product or
|
||||
* program developed by the user.
|
||||
*
|
||||
* SUN RPC IS PROVIDED AS IS WITH NO WARRANTIES OF ANY KIND INCLUDING THE
|
||||
* WARRANTIES OF DESIGN, MERCHANTIBILITY AND FITNESS FOR A PARTICULAR
|
||||
* PURPOSE, OR ARISING FROM A COURSE OF DEALING, USAGE OR TRADE PRACTICE.
|
||||
*
|
||||
* Sun RPC is provided with no support and without any obligation on the
|
||||
* part of Sun Microsystems, Inc. to assist in its use, correction,
|
||||
* modification or enhancement.
|
||||
*
|
||||
* SUN MICROSYSTEMS, INC. SHALL HAVE NO LIABILITY WITH RESPECT TO THE
|
||||
* INFRINGEMENT OF COPYRIGHTS, TRADE SECRETS OR ANY PATENTS BY SUN RPC
|
||||
* OR ANY PART THEREOF.
|
||||
*
|
||||
* In no event will Sun Microsystems, Inc. be liable for any lost revenue
|
||||
* or profits or other special, indirect and consequential damages, even if
|
||||
* Sun has been advised of the possibility of such damages.
|
||||
*
|
||||
* Sun Microsystems, Inc.
|
||||
* 2550 Garcia Avenue
|
||||
* Mountain View, California 94043
|
||||
*/
|
||||
|
||||
#ifndef RPC_HDR
|
||||
%#ifndef lint
|
||||
%/*static char sccsid[] = "from: @(#)nfs_prot.x 1.2 87/10/12 Copyr 1987 Sun Micro";*/
|
||||
%/*static char sccsid[] = "from: @(#)nfs_prot.x 2.1 88/08/01 4.0 RPCSRC";*/
|
||||
%static char rcsid[] = "$Id: nfs_prot.x,v 1.1 1995/01/12 19:39:48 jtc Exp $";
|
||||
%#endif /* not lint */
|
||||
#endif
|
||||
|
||||
const NFS_PORT = 2049;
|
||||
const NFS_MAXDATA = 8192;
|
||||
const NFS_MAXPATHLEN = 1024;
|
||||
const NFS_MAXNAMLEN = 255;
|
||||
const NFS_FHSIZE = 32;
|
||||
const NFS_COOKIESIZE = 4;
|
||||
const NFS_FIFO_DEV = -1; /* size kludge for named pipes */
|
||||
|
||||
/*
|
||||
* File types
|
||||
*/
|
||||
const NFSMODE_FMT = 0170000; /* type of file */
|
||||
const NFSMODE_DIR = 0040000; /* directory */
|
||||
const NFSMODE_CHR = 0020000; /* character special */
|
||||
const NFSMODE_BLK = 0060000; /* block special */
|
||||
const NFSMODE_REG = 0100000; /* regular */
|
||||
const NFSMODE_LNK = 0120000; /* symbolic link */
|
||||
const NFSMODE_SOCK = 0140000; /* socket */
|
||||
const NFSMODE_FIFO = 0010000; /* fifo */
|
||||
|
||||
/*
|
||||
* Error status
|
||||
*/
|
||||
enum nfsstat {
|
||||
NFS_OK= 0, /* no error */
|
||||
NFSERR_PERM=1, /* Not owner */
|
||||
NFSERR_NOENT=2, /* No such file or directory */
|
||||
NFSERR_IO=5, /* I/O error */
|
||||
NFSERR_NXIO=6, /* No such device or address */
|
||||
NFSERR_ACCES=13, /* Permission denied */
|
||||
NFSERR_EXIST=17, /* File exists */
|
||||
NFSERR_NODEV=19, /* No such device */
|
||||
NFSERR_NOTDIR=20, /* Not a directory*/
|
||||
NFSERR_ISDIR=21, /* Is a directory */
|
||||
NFSERR_FBIG=27, /* File too large */
|
||||
NFSERR_NOSPC=28, /* No space left on device */
|
||||
NFSERR_ROFS=30, /* Read-only file system */
|
||||
NFSERR_NAMETOOLONG=63, /* File name too long */
|
||||
NFSERR_NOTEMPTY=66, /* Directory not empty */
|
||||
NFSERR_DQUOT=69, /* Disc quota exceeded */
|
||||
NFSERR_STALE=70, /* Stale NFS file handle */
|
||||
NFSERR_WFLUSH=99 /* write cache flushed */
|
||||
};
|
||||
|
||||
/*
|
||||
* File types
|
||||
*/
|
||||
enum ftype {
|
||||
NFNON = 0, /* non-file */
|
||||
NFREG = 1, /* regular file */
|
||||
NFDIR = 2, /* directory */
|
||||
NFBLK = 3, /* block special */
|
||||
NFCHR = 4, /* character special */
|
||||
NFLNK = 5, /* symbolic link */
|
||||
NFSOCK = 6, /* unix domain sockets */
|
||||
NFBAD = 7, /* unused */
|
||||
NFFIFO = 8 /* named pipe */
|
||||
};
|
||||
|
||||
/*
|
||||
* File access handle
|
||||
*/
|
||||
struct nfs_fh {
|
||||
opaque data[NFS_FHSIZE];
|
||||
};
|
||||
|
||||
/*
|
||||
* Timeval
|
||||
*/
|
||||
struct nfstime {
|
||||
unsigned seconds;
|
||||
unsigned useconds;
|
||||
};
|
||||
|
||||
|
||||
/*
|
||||
* File attributes
|
||||
*/
|
||||
struct fattr {
|
||||
ftype type; /* file type */
|
||||
unsigned mode; /* protection mode bits */
|
||||
unsigned nlink; /* # hard links */
|
||||
unsigned uid; /* owner user id */
|
||||
unsigned gid; /* owner group id */
|
||||
unsigned size; /* file size in bytes */
|
||||
unsigned blocksize; /* prefered block size */
|
||||
unsigned rdev; /* special device # */
|
||||
unsigned blocks; /* Kb of disk used by file */
|
||||
unsigned fsid; /* device # */
|
||||
unsigned fileid; /* inode # */
|
||||
nfstime atime; /* time of last access */
|
||||
nfstime mtime; /* time of last modification */
|
||||
nfstime ctime; /* time of last change */
|
||||
};
|
||||
|
||||
/*
|
||||
* File attributes which can be set
|
||||
*/
|
||||
struct sattr {
|
||||
unsigned mode; /* protection mode bits */
|
||||
unsigned uid; /* owner user id */
|
||||
unsigned gid; /* owner group id */
|
||||
unsigned size; /* file size in bytes */
|
||||
nfstime atime; /* time of last access */
|
||||
nfstime mtime; /* time of last modification */
|
||||
};
|
||||
|
||||
|
||||
typedef string filename<NFS_MAXNAMLEN>;
|
||||
typedef string nfspath<NFS_MAXPATHLEN>;
|
||||
|
||||
/*
|
||||
* Reply status with file attributes
|
||||
*/
|
||||
union attrstat switch (nfsstat status) {
|
||||
case NFS_OK:
|
||||
fattr attributes;
|
||||
default:
|
||||
void;
|
||||
};
|
||||
|
||||
struct sattrargs {
|
||||
nfs_fh file;
|
||||
sattr attributes;
|
||||
};
|
||||
|
||||
/*
|
||||
* Arguments for directory operations
|
||||
*/
|
||||
struct diropargs {
|
||||
nfs_fh dir; /* directory file handle */
|
||||
filename name; /* name (up to NFS_MAXNAMLEN bytes) */
|
||||
};
|
||||
|
||||
struct diropokres {
|
||||
nfs_fh file;
|
||||
fattr attributes;
|
||||
};
|
||||
|
||||
/*
|
||||
* Results from directory operation
|
||||
*/
|
||||
union diropres switch (nfsstat status) {
|
||||
case NFS_OK:
|
||||
diropokres diropres;
|
||||
default:
|
||||
void;
|
||||
};
|
||||
|
||||
union readlinkres switch (nfsstat status) {
|
||||
case NFS_OK:
|
||||
nfspath data;
|
||||
default:
|
||||
void;
|
||||
};
|
||||
|
||||
/*
|
||||
* Arguments to remote read
|
||||
*/
|
||||
struct readargs {
|
||||
nfs_fh file; /* handle for file */
|
||||
unsigned offset; /* byte offset in file */
|
||||
unsigned count; /* immediate read count */
|
||||
unsigned totalcount; /* total read count (from this offset)*/
|
||||
};
|
||||
|
||||
/*
|
||||
* Status OK portion of remote read reply
|
||||
*/
|
||||
struct readokres {
|
||||
fattr attributes; /* attributes, need for pagin*/
|
||||
opaque data<NFS_MAXDATA>;
|
||||
};
|
||||
|
||||
union readres switch (nfsstat status) {
|
||||
case NFS_OK:
|
||||
readokres reply;
|
||||
default:
|
||||
void;
|
||||
};
|
||||
|
||||
/*
|
||||
* Arguments to remote write
|
||||
*/
|
||||
struct writeargs {
|
||||
nfs_fh file; /* handle for file */
|
||||
unsigned beginoffset; /* beginning byte offset in file */
|
||||
unsigned offset; /* current byte offset in file */
|
||||
unsigned totalcount; /* total write count (to this offset)*/
|
||||
opaque data<NFS_MAXDATA>;
|
||||
};
|
||||
|
||||
struct createargs {
|
||||
diropargs where;
|
||||
sattr attributes;
|
||||
};
|
||||
|
||||
struct renameargs {
|
||||
diropargs from;
|
||||
diropargs to;
|
||||
};
|
||||
|
||||
struct linkargs {
|
||||
nfs_fh from;
|
||||
diropargs to;
|
||||
};
|
||||
|
||||
struct symlinkargs {
|
||||
diropargs from;
|
||||
nfspath to;
|
||||
sattr attributes;
|
||||
};
|
||||
|
||||
|
||||
typedef opaque nfscookie[NFS_COOKIESIZE];
|
||||
|
||||
/*
|
||||
* Arguments to readdir
|
||||
*/
|
||||
struct readdirargs {
|
||||
nfs_fh dir; /* directory handle */
|
||||
nfscookie cookie;
|
||||
unsigned count; /* number of directory bytes to read */
|
||||
};
|
||||
|
||||
struct entry {
|
||||
unsigned fileid;
|
||||
filename name;
|
||||
nfscookie cookie;
|
||||
entry *nextentry;
|
||||
};
|
||||
|
||||
struct dirlist {
|
||||
entry *entries;
|
||||
bool eof;
|
||||
};
|
||||
|
||||
union readdirres switch (nfsstat status) {
|
||||
case NFS_OK:
|
||||
dirlist reply;
|
||||
default:
|
||||
void;
|
||||
};
|
||||
|
||||
struct statfsokres {
|
||||
unsigned tsize; /* preferred transfer size in bytes */
|
||||
unsigned bsize; /* fundamental file system block size */
|
||||
unsigned blocks; /* total blocks in file system */
|
||||
unsigned bfree; /* free blocks in fs */
|
||||
unsigned bavail; /* free blocks avail to non-superuser */
|
||||
};
|
||||
|
||||
union statfsres switch (nfsstat status) {
|
||||
case NFS_OK:
|
||||
statfsokres reply;
|
||||
default:
|
||||
void;
|
||||
};
|
||||
|
||||
/*
|
||||
* Remote file service routines
|
||||
*/
|
||||
program NFS_PROGRAM {
|
||||
version NFS_VERSION {
|
||||
void
|
||||
NFSPROC_NULL(void) = 0;
|
||||
|
||||
attrstat
|
||||
NFSPROC_GETATTR(nfs_fh) = 1;
|
||||
|
||||
attrstat
|
||||
NFSPROC_SETATTR(sattrargs) = 2;
|
||||
|
||||
void
|
||||
NFSPROC_ROOT(void) = 3;
|
||||
|
||||
diropres
|
||||
NFSPROC_LOOKUP(diropargs) = 4;
|
||||
|
||||
readlinkres
|
||||
NFSPROC_READLINK(nfs_fh) = 5;
|
||||
|
||||
readres
|
||||
NFSPROC_READ(readargs) = 6;
|
||||
|
||||
void
|
||||
NFSPROC_WRITECACHE(void) = 7;
|
||||
|
||||
attrstat
|
||||
NFSPROC_WRITE(writeargs) = 8;
|
||||
|
||||
diropres
|
||||
NFSPROC_CREATE(createargs) = 9;
|
||||
|
||||
nfsstat
|
||||
NFSPROC_REMOVE(diropargs) = 10;
|
||||
|
||||
nfsstat
|
||||
NFSPROC_RENAME(renameargs) = 11;
|
||||
|
||||
nfsstat
|
||||
NFSPROC_LINK(linkargs) = 12;
|
||||
|
||||
nfsstat
|
||||
NFSPROC_SYMLINK(symlinkargs) = 13;
|
||||
|
||||
diropres
|
||||
NFSPROC_MKDIR(createargs) = 14;
|
||||
|
||||
nfsstat
|
||||
NFSPROC_RMDIR(diropargs) = 15;
|
||||
|
||||
readdirres
|
||||
NFSPROC_READDIR(readdirargs) = 16;
|
||||
|
||||
statfsres
|
||||
NFSPROC_STATFS(nfs_fh) = 17;
|
||||
} = 2;
|
||||
} = 100003;
|
||||
|
182
lib/librpcsvc/nlm_prot.x
Normal file
182
lib/librpcsvc/nlm_prot.x
Normal file
@ -0,0 +1,182 @@
|
||||
/*
|
||||
* Network lock manager protocol definition
|
||||
* Copyright (C) 1986 Sun Microsystems, Inc.
|
||||
*
|
||||
* protocol used between local lock manager and remote lock manager
|
||||
*/
|
||||
|
||||
#ifdef RPC_HDR
|
||||
%#define LM_MAXSTRLEN 1024
|
||||
%#define MAXNAMELEN LM_MAXSTRLEN+1
|
||||
#else
|
||||
%#ifndef lint
|
||||
%/*static char sccsid[] = "from: @(#)nlm_prot.x 1.8 87/09/21 Copyr 1987 Sun Micro";*/
|
||||
%/*static char sccsid[] = "from: * @(#)nlm_prot.x 2.1 88/08/01 4.0 RPCSRC";*/
|
||||
%static char rcsid[] = "$Id: nlm_prot.x,v 1.1 1995/01/12 19:39:49 jtc Exp $";
|
||||
%#endif /* not lint */
|
||||
#endif
|
||||
|
||||
/*
|
||||
* status of a call to the lock manager
|
||||
*/
|
||||
enum nlm_stats {
|
||||
nlm_granted = 0,
|
||||
nlm_denied = 1,
|
||||
nlm_denied_nolocks = 2,
|
||||
nlm_blocked = 3,
|
||||
nlm_denied_grace_period = 4
|
||||
};
|
||||
|
||||
struct nlm_holder {
|
||||
bool exclusive;
|
||||
int svid;
|
||||
netobj oh;
|
||||
unsigned l_offset;
|
||||
unsigned l_len;
|
||||
};
|
||||
|
||||
union nlm_testrply switch (nlm_stats stat) {
|
||||
case nlm_denied:
|
||||
struct nlm_holder holder;
|
||||
default:
|
||||
void;
|
||||
};
|
||||
|
||||
struct nlm_stat {
|
||||
nlm_stats stat;
|
||||
};
|
||||
|
||||
struct nlm_res {
|
||||
netobj cookie;
|
||||
nlm_stat stat;
|
||||
};
|
||||
|
||||
struct nlm_testres {
|
||||
netobj cookie;
|
||||
nlm_testrply stat;
|
||||
};
|
||||
|
||||
struct nlm_lock {
|
||||
string caller_name<LM_MAXSTRLEN>;
|
||||
netobj fh; /* identify a file */
|
||||
netobj oh; /* identify owner of a lock */
|
||||
int svid; /* generated from pid for svid */
|
||||
unsigned l_offset;
|
||||
unsigned l_len;
|
||||
};
|
||||
|
||||
struct nlm_lockargs {
|
||||
netobj cookie;
|
||||
bool block;
|
||||
bool exclusive;
|
||||
struct nlm_lock alock;
|
||||
bool reclaim; /* used for recovering locks */
|
||||
int state; /* specify local status monitor state */
|
||||
};
|
||||
|
||||
struct nlm_cancargs {
|
||||
netobj cookie;
|
||||
bool block;
|
||||
bool exclusive;
|
||||
struct nlm_lock alock;
|
||||
};
|
||||
|
||||
struct nlm_testargs {
|
||||
netobj cookie;
|
||||
bool exclusive;
|
||||
struct nlm_lock alock;
|
||||
};
|
||||
|
||||
struct nlm_unlockargs {
|
||||
netobj cookie;
|
||||
struct nlm_lock alock;
|
||||
};
|
||||
|
||||
|
||||
#ifdef RPC_HDR
|
||||
%/*
|
||||
% * The following enums are actually bit encoded for efficient
|
||||
% * boolean algebra.... DON'T change them.....
|
||||
% */
|
||||
#endif
|
||||
enum fsh_mode {
|
||||
fsm_DN = 0, /* deny none */
|
||||
fsm_DR = 1, /* deny read */
|
||||
fsm_DW = 2, /* deny write */
|
||||
fsm_DRW = 3 /* deny read/write */
|
||||
};
|
||||
|
||||
enum fsh_access {
|
||||
fsa_NONE = 0, /* for completeness */
|
||||
fsa_R = 1, /* read only */
|
||||
fsa_W = 2, /* write only */
|
||||
fsa_RW = 3 /* read/write */
|
||||
};
|
||||
|
||||
struct nlm_share {
|
||||
string caller_name<LM_MAXSTRLEN>;
|
||||
netobj fh;
|
||||
netobj oh;
|
||||
fsh_mode mode;
|
||||
fsh_access access;
|
||||
};
|
||||
|
||||
struct nlm_shareargs {
|
||||
netobj cookie;
|
||||
nlm_share share;
|
||||
bool reclaim;
|
||||
};
|
||||
|
||||
struct nlm_shareres {
|
||||
netobj cookie;
|
||||
nlm_stats stat;
|
||||
int sequence;
|
||||
};
|
||||
|
||||
struct nlm_notify {
|
||||
string name<MAXNAMELEN>;
|
||||
long state;
|
||||
};
|
||||
|
||||
/*
|
||||
* Over-the-wire protocol used between the network lock managers
|
||||
*/
|
||||
|
||||
program NLM_PROG {
|
||||
version NLM_VERS {
|
||||
|
||||
nlm_testres NLM_TEST(struct nlm_testargs) = 1;
|
||||
|
||||
nlm_res NLM_LOCK(struct nlm_lockargs) = 2;
|
||||
|
||||
nlm_res NLM_CANCEL(struct nlm_cancargs) = 3;
|
||||
nlm_res NLM_UNLOCK(struct nlm_unlockargs) = 4;
|
||||
|
||||
/*
|
||||
* remote lock manager call-back to grant lock
|
||||
*/
|
||||
nlm_res NLM_GRANTED(struct nlm_testargs)= 5;
|
||||
/*
|
||||
* message passing style of requesting lock
|
||||
*/
|
||||
void NLM_TEST_MSG(struct nlm_testargs) = 6;
|
||||
void NLM_LOCK_MSG(struct nlm_lockargs) = 7;
|
||||
void NLM_CANCEL_MSG(struct nlm_cancargs) =8;
|
||||
void NLM_UNLOCK_MSG(struct nlm_unlockargs) = 9;
|
||||
void NLM_GRANTED_MSG(struct nlm_testargs) = 10;
|
||||
void NLM_TEST_RES(nlm_testres) = 11;
|
||||
void NLM_LOCK_RES(nlm_res) = 12;
|
||||
void NLM_CANCEL_RES(nlm_res) = 13;
|
||||
void NLM_UNLOCK_RES(nlm_res) = 14;
|
||||
void NLM_GRANTED_RES(nlm_res) = 15;
|
||||
} = 1;
|
||||
|
||||
version NLM_VERSX {
|
||||
nlm_shareres NLM_SHARE(nlm_shareargs) = 20;
|
||||
nlm_shareres NLM_UNSHARE(nlm_shareargs) = 21;
|
||||
nlm_res NLM_NM_LOCK(nlm_lockargs) = 22;
|
||||
void NLM_FREE_ALL(nlm_notify) = 23;
|
||||
} = 3;
|
||||
|
||||
} = 100021;
|
||||
|
234
lib/librpcsvc/rex.x
Normal file
234
lib/librpcsvc/rex.x
Normal file
@ -0,0 +1,234 @@
|
||||
/*
|
||||
* Sun RPC is a product of Sun Microsystems, Inc. and is provided for
|
||||
* unrestricted use provided that this legend is included on all tape
|
||||
* media and as a part of the software program in whole or part. Users
|
||||
* may copy or modify Sun RPC without charge, but are not authorized
|
||||
* to license or distribute it to anyone else except as part of a product or
|
||||
* program developed by the user.
|
||||
*
|
||||
* SUN RPC IS PROVIDED AS IS WITH NO WARRANTIES OF ANY KIND INCLUDING THE
|
||||
* WARRANTIES OF DESIGN, MERCHANTIBILITY AND FITNESS FOR A PARTICULAR
|
||||
* PURPOSE, OR ARISING FROM A COURSE OF DEALING, USAGE OR TRADE PRACTICE.
|
||||
*
|
||||
* Sun RPC is provided with no support and without any obligation on the
|
||||
* part of Sun Microsystems, Inc. to assist in its use, correction,
|
||||
* modification or enhancement.
|
||||
*
|
||||
* SUN MICROSYSTEMS, INC. SHALL HAVE NO LIABILITY WITH RESPECT TO THE
|
||||
* INFRINGEMENT OF COPYRIGHTS, TRADE SECRETS OR ANY PATENTS BY SUN RPC
|
||||
* OR ANY PART THEREOF.
|
||||
*
|
||||
* In no event will Sun Microsystems, Inc. be liable for any lost revenue
|
||||
* or profits or other special, indirect and consequential damages, even if
|
||||
* Sun has been advised of the possibility of such damages.
|
||||
*
|
||||
* Sun Microsystems, Inc.
|
||||
* 2550 Garcia Avenue
|
||||
* Mountain View, California 94043
|
||||
*/
|
||||
|
||||
/*
|
||||
* Remote execution (rex) protocol specification
|
||||
*/
|
||||
|
||||
#ifndef RPC_HDR
|
||||
%#ifndef lint
|
||||
%/*static char sccsid[] = "from: @(#)rex.x 1.3 87/09/18 Copyr 1987 Sun Micro";*/
|
||||
%/*static char sccsid[] = "from: @(#)rex.x 2.1 88/08/01 4.0 RPCSRC";*/
|
||||
%static char rcsid[] = "$Id: rex.x,v 1.1 1995/01/12 19:39:52 jtc Exp $";
|
||||
%#endif /* not lint */
|
||||
#endif
|
||||
|
||||
const STRINGSIZE = 1024;
|
||||
typedef string rexstring<1024>;
|
||||
|
||||
/*
|
||||
* values to pass to REXPROC_SIGNAL
|
||||
*/
|
||||
const SIGINT = 2; /* interrupt */
|
||||
|
||||
/*
|
||||
* Values for rst_flags, below
|
||||
*/
|
||||
const REX_INTERACTIVE = 1; /* interactive mode */
|
||||
|
||||
struct rex_start {
|
||||
rexstring rst_cmd<>; /* list of command and args */
|
||||
rexstring rst_host; /* working directory host name */
|
||||
rexstring rst_fsname; /* working directory file system name */
|
||||
rexstring rst_dirwithin;/* working directory within file system */
|
||||
rexstring rst_env<>; /* list of environment */
|
||||
unsigned int rst_port0; /* port for stdin */
|
||||
unsigned int rst_port1; /* port for stdout */
|
||||
unsigned int rst_port2; /* port for stderr */
|
||||
unsigned int rst_flags; /* options - see const above */
|
||||
};
|
||||
|
||||
struct rex_result {
|
||||
int rlt_stat; /* integer status code */
|
||||
rexstring rlt_message; /* string message for human consumption */
|
||||
};
|
||||
|
||||
|
||||
struct sgttyb {
|
||||
unsigned four; /* always equals 4 */
|
||||
opaque chars[4];
|
||||
/* chars[0] == input speed */
|
||||
/* chars[1] == output speed */
|
||||
/* chars[2] == kill character */
|
||||
/* chars[3] == erase character */
|
||||
unsigned flags;
|
||||
};
|
||||
/* values for speeds above (baud rates) */
|
||||
const B0 = 0;
|
||||
const B50 = 1;
|
||||
const B75 = 2;
|
||||
const B110 = 3;
|
||||
const B134 = 4;
|
||||
const B150 = 5;
|
||||
const B200 = 6;
|
||||
const B300 = 7;
|
||||
const B600 = 8;
|
||||
const B1200 = 9;
|
||||
const B1800 = 10;
|
||||
const B2400 = 11;
|
||||
const B4800 = 12;
|
||||
const B9600 = 13;
|
||||
const B19200 = 14;
|
||||
const B38400 = 15;
|
||||
|
||||
/* values for flags above */
|
||||
const TANDEM = 0x00000001; /* send stopc on out q full */
|
||||
const CBREAK = 0x00000002; /* half-cooked mode */
|
||||
const LCASE = 0x00000004; /* simulate lower case */
|
||||
const ECHO = 0x00000008; /* echo input */
|
||||
const CRMOD = 0x00000010; /* map \r to \r\n on output */
|
||||
const RAW = 0x00000020; /* no i/o processing */
|
||||
const ODDP = 0x00000040; /* get/send odd parity */
|
||||
const EVENP = 0x00000080; /* get/send even parity */
|
||||
const ANYP = 0x000000c0; /* get any parity/send none */
|
||||
const NLDELAY = 0x00000300; /* \n delay */
|
||||
const NL0 = 0x00000000;
|
||||
const NL1 = 0x00000100; /* tty 37 */
|
||||
const NL2 = 0x00000200; /* vt05 */
|
||||
const NL3 = 0x00000300;
|
||||
const TBDELAY = 0x00000c00; /* horizontal tab delay */
|
||||
const TAB0 = 0x00000000;
|
||||
const TAB1 = 0x00000400; /* tty 37 */
|
||||
const TAB2 = 0x00000800;
|
||||
const XTABS = 0x00000c00; /* expand tabs on output */
|
||||
const CRDELAY = 0x00003000; /* \r delay */
|
||||
const CR0 = 0x00000000;
|
||||
const CR1 = 0x00001000; /* tn 300 */
|
||||
const CR2 = 0x00002000; /* tty 37 */
|
||||
const CR3 = 0x00003000; /* concept 100 */
|
||||
const VTDELAY = 0x00004000; /* vertical tab delay */
|
||||
const FF0 = 0x00000000;
|
||||
const FF1 = 0x00004000; /* tty 37 */
|
||||
const BSDELAY = 0x00008000; /* \b delay */
|
||||
const BS0 = 0x00000000;
|
||||
const BS1 = 0x00008000;
|
||||
const CRTBS = 0x00010000; /* do backspacing for crt */
|
||||
const PRTERA = 0x00020000; /* \ ... / erase */
|
||||
const CRTERA = 0x00040000; /* " \b " to wipe out char */
|
||||
const TILDE = 0x00080000; /* hazeltine tilde kludge */
|
||||
const MDMBUF = 0x00100000; /* start/stop output on carrier intr */
|
||||
const LITOUT = 0x00200000; /* literal output */
|
||||
const TOSTOP = 0x00400000; /* SIGTTOU on background output */
|
||||
const FLUSHO = 0x00800000; /* flush output to terminal */
|
||||
const NOHANG = 0x01000000; /* no SIGHUP on carrier drop */
|
||||
const L001000 = 0x02000000;
|
||||
const CRTKIL = 0x04000000; /* kill line with " \b " */
|
||||
const PASS8 = 0x08000000;
|
||||
const CTLECH = 0x10000000; /* echo control chars as ^X */
|
||||
const PENDIN = 0x20000000; /* tp->t_rawq needs reread */
|
||||
const DECCTQ = 0x40000000; /* only ^Q starts after ^S */
|
||||
const NOFLSH = 0x80000000; /* no output flush on signal */
|
||||
|
||||
struct tchars {
|
||||
unsigned six; /* always equals 6 */
|
||||
opaque chars[6];
|
||||
/* chars[0] == interrupt char */
|
||||
/* chars[1] == quit char */
|
||||
/* chars[2] == start output char */
|
||||
/* chars[3] == stop output char */
|
||||
/* chars[4] == end-of-file char */
|
||||
/* chars[5] == input delimeter (like nl) */
|
||||
};
|
||||
|
||||
struct ltchars {
|
||||
unsigned six; /* always equals 6 */
|
||||
opaque chars[6];
|
||||
/* chars[0] == stop process signal */
|
||||
/* chars[1] == delayed stop process signal */
|
||||
/* chars[2] == reprint line */
|
||||
/* chars[3] == flush output */
|
||||
/* chars[4] == word erase */
|
||||
/* chars[5] == literal next character */
|
||||
unsigned mode;
|
||||
};
|
||||
|
||||
struct rex_ttysize {
|
||||
int ts_lines;
|
||||
int ts_cols;
|
||||
};
|
||||
|
||||
struct rex_ttymode {
|
||||
sgttyb basic; /* standard unix tty flags */
|
||||
tchars more; /* interrupt, kill characters, etc. */
|
||||
ltchars yetmore; /* special Berkeley characters */
|
||||
unsigned andmore; /* and Berkeley modes */
|
||||
};
|
||||
|
||||
/* values for andmore above */
|
||||
const LCRTBS = 0x0001; /* do backspacing for crt */
|
||||
const LPRTERA = 0x0002; /* \ ... / erase */
|
||||
const LCRTERA = 0x0004; /* " \b " to wipe out char */
|
||||
const LTILDE = 0x0008; /* hazeltine tilde kludge */
|
||||
const LMDMBUF = 0x0010; /* start/stop output on carrier intr */
|
||||
const LLITOUT = 0x0020; /* literal output */
|
||||
const LTOSTOP = 0x0040; /* SIGTTOU on background output */
|
||||
const LFLUSHO = 0x0080; /* flush output to terminal */
|
||||
const LNOHANG = 0x0100; /* no SIGHUP on carrier drop */
|
||||
const LL001000 = 0x0200;
|
||||
const LCRTKIL = 0x0400; /* kill line with " \b " */
|
||||
const LPASS8 = 0x0800;
|
||||
const LCTLECH = 0x1000; /* echo control chars as ^X */
|
||||
const LPENDIN = 0x2000; /* needs reread */
|
||||
const LDECCTQ = 0x4000; /* only ^Q starts after ^S */
|
||||
const LNOFLSH = 0x8000; /* no output flush on signal */
|
||||
|
||||
program REXPROG {
|
||||
version REXVERS {
|
||||
|
||||
/*
|
||||
* Start remote execution
|
||||
*/
|
||||
rex_result
|
||||
REXPROC_START(rex_start) = 1;
|
||||
|
||||
/*
|
||||
* Wait for remote execution to terminate
|
||||
*/
|
||||
rex_result
|
||||
REXPROC_WAIT(void) = 2;
|
||||
|
||||
/*
|
||||
* Send tty modes
|
||||
*/
|
||||
void
|
||||
REXPROC_MODES(rex_ttymode) = 3;
|
||||
|
||||
/*
|
||||
* Send window size change
|
||||
*/
|
||||
void
|
||||
REXPROC_WINCH(rex_ttysize) = 4;
|
||||
|
||||
/*
|
||||
* Send other signal
|
||||
*/
|
||||
void
|
||||
REXPROC_SIGNAL(int) = 5;
|
||||
} = 1;
|
||||
} = 100017;
|
192
lib/librpcsvc/rnusers.x
Normal file
192
lib/librpcsvc/rnusers.x
Normal file
@ -0,0 +1,192 @@
|
||||
/*
|
||||
* Sun RPC is a product of Sun Microsystems, Inc. and is provided for
|
||||
* unrestricted use provided that this legend is included on all tape
|
||||
* media and as a part of the software program in whole or part. Users
|
||||
* may copy or modify Sun RPC without charge, but are not authorized
|
||||
* to license or distribute it to anyone else except as part of a product or
|
||||
* program developed by the user.
|
||||
*
|
||||
* SUN RPC IS PROVIDED AS IS WITH NO WARRANTIES OF ANY KIND INCLUDING THE
|
||||
* WARRANTIES OF DESIGN, MERCHANTIBILITY AND FITNESS FOR A PARTICULAR
|
||||
* PURPOSE, OR ARISING FROM A COURSE OF DEALING, USAGE OR TRADE PRACTICE.
|
||||
*
|
||||
* Sun RPC is provided with no support and without any obligation on the
|
||||
* part of Sun Microsystems, Inc. to assist in its use, correction,
|
||||
* modification or enhancement.
|
||||
*
|
||||
* SUN MICROSYSTEMS, INC. SHALL HAVE NO LIABILITY WITH RESPECT TO THE
|
||||
* INFRINGEMENT OF COPYRIGHTS, TRADE SECRETS OR ANY PATENTS BY SUN RPC
|
||||
* OR ANY PART THEREOF.
|
||||
*
|
||||
* In no event will Sun Microsystems, Inc. be liable for any lost revenue
|
||||
* or profits or other special, indirect and consequential damages, even if
|
||||
* Sun has been advised of the possibility of such damages.
|
||||
*
|
||||
* Sun Microsystems, Inc.
|
||||
* 2550 Garcia Avenue
|
||||
* Mountain View, California 94043
|
||||
*/
|
||||
|
||||
/*
|
||||
* Find out about remote users
|
||||
*/
|
||||
|
||||
#ifndef RPC_HDR
|
||||
%#ifndef lint
|
||||
%/*static char sccsid[] = "from: @(#)rnusers.x 1.2 87/09/20 Copyr 1987 Sun Micro";*/
|
||||
%/*static char sccsid[] = "from: @(#)rnusers.x 2.1 88/08/01 4.0 RPCSRC";*/
|
||||
%static char rcsid[] = "$Id: rnusers.x,v 1.1 1995/01/12 19:39:53 jtc Exp $";
|
||||
%#endif /* not lint */
|
||||
#endif
|
||||
|
||||
|
||||
#ifdef RPC_HDR
|
||||
%/*
|
||||
% * The following structures are used by version 2 of the rusersd protocol.
|
||||
% * They were not developed with rpcgen, so they do not appear as RPCL.
|
||||
% */
|
||||
%
|
||||
%#define RUSERSVERS_ORIG 1 /* original version */
|
||||
%#define RUSERSVERS_IDLE 2
|
||||
%#define MAXUSERS 100
|
||||
%
|
||||
%/*
|
||||
% * This is the structure used in version 2 of the rusersd RPC service.
|
||||
% * It corresponds to the utmp structure for BSD sytems.
|
||||
% */
|
||||
%struct ru_utmp {
|
||||
% char ut_line[8]; /* tty name */
|
||||
% char ut_name[8]; /* user id */
|
||||
% char ut_host[16]; /* host name, if remote */
|
||||
% long ut_time; /* time on */
|
||||
%};
|
||||
%typedef struct ru_utmp rutmp;
|
||||
%
|
||||
%struct utmparr {
|
||||
% struct utmp **uta_arr;
|
||||
% int uta_cnt;
|
||||
%};
|
||||
%typedef struct utmparr utmparr;
|
||||
%int xdr_utmparr();
|
||||
%
|
||||
%struct utmpidle {
|
||||
% struct ru_utmp ui_utmp;
|
||||
% unsigned ui_idle;
|
||||
%};
|
||||
%
|
||||
%struct utmpidlearr {
|
||||
% struct utmpidle **uia_arr;
|
||||
% int uia_cnt;
|
||||
%};
|
||||
%typedef struct utmpidlearr utmpidlearr;
|
||||
%int xdr_utmpidlearr();
|
||||
%
|
||||
%#define RUSERSVERS_1 ((u_long)1)
|
||||
%#define RUSERSVERS_2 ((u_long)2)
|
||||
%#ifndef RUSERSPROG
|
||||
%#define RUSERSPROG ((u_long)100002)
|
||||
%#endif
|
||||
%#ifndef RUSERSPROC_NUM
|
||||
%#define RUSERSPROC_NUM ((u_long)1)
|
||||
%#endif
|
||||
%#ifndef RUSERSPROC_NAMES
|
||||
%#define RUSERSPROC_NAMES ((u_long)2)
|
||||
%#endif
|
||||
%#ifndef RUSERSPROC_ALLNAMES
|
||||
%#define RUSERSPROC_ALLNAMES ((u_long)3)
|
||||
%#endif
|
||||
%
|
||||
#endif /* RPC_HDR */
|
||||
|
||||
#ifdef RPC_XDR
|
||||
%bool_t
|
||||
%xdr_utmp(xdrs, objp)
|
||||
% XDR *xdrs;
|
||||
% struct ru_utmp *objp;
|
||||
%{
|
||||
% char *ptr;
|
||||
% int size;
|
||||
%
|
||||
% ptr = objp->ut_line;
|
||||
% size = sizeof(objp->ut_line);
|
||||
% if (!xdr_bytes(xdrs, &ptr, &size, size)) {
|
||||
% return (FALSE);
|
||||
% }
|
||||
% ptr = objp->ut_name;
|
||||
% size = sizeof(objp->ut_line);
|
||||
% if (!xdr_bytes(xdrs, &ptr, &size, size)) {
|
||||
% return (FALSE);
|
||||
% }
|
||||
% ptr = objp->ut_host;
|
||||
% size = sizeof(objp->ut_host);
|
||||
% if (!xdr_bytes(xdrs, &ptr, &size, size)) {
|
||||
% return (FALSE);
|
||||
% }
|
||||
% if (!xdr_long(xdrs, &objp->ut_time)) {
|
||||
% return (FALSE);
|
||||
% }
|
||||
% return (TRUE);
|
||||
%}
|
||||
%
|
||||
%bool_t
|
||||
%xdr_utmpptr(xdrs, objpp)
|
||||
% XDR *xdrs;
|
||||
% struct utmp **objpp;
|
||||
%{
|
||||
% if (!xdr_reference(xdrs, (char **) objpp, sizeof (struct ru_utmp),
|
||||
% xdr_utmp)) {
|
||||
% return (FALSE);
|
||||
% }
|
||||
% return (TRUE);
|
||||
%}
|
||||
%
|
||||
%bool_t
|
||||
%xdr_utmparr(xdrs, objp)
|
||||
% XDR *xdrs;
|
||||
% struct utmparr *objp;
|
||||
%{
|
||||
% if (!xdr_array(xdrs, (char **)&objp->uta_arr, (u_int *)&objp->uta_cnt,
|
||||
% MAXUSERS, sizeof(struct utmp *), xdr_utmpptr)) {
|
||||
% return (FALSE);
|
||||
% }
|
||||
% return (TRUE);
|
||||
%}
|
||||
%
|
||||
%bool_t
|
||||
%xdr_utmpidle(xdrs, objp)
|
||||
% XDR *xdrs;
|
||||
% struct utmpidle *objp;
|
||||
%{
|
||||
% if (!xdr_utmp(xdrs, &objp->ui_utmp)) {
|
||||
% return (FALSE);
|
||||
% }
|
||||
% if (!xdr_u_int(xdrs, &objp->ui_idle)) {
|
||||
% return (FALSE);
|
||||
% }
|
||||
% return (TRUE);
|
||||
%}
|
||||
%
|
||||
%bool_t
|
||||
%xdr_utmpidleptr(xdrs, objpp)
|
||||
% XDR *xdrs;
|
||||
% struct utmpidle **objpp;
|
||||
%{
|
||||
% if (!xdr_reference(xdrs, (char **) objpp, sizeof (struct utmpidle),
|
||||
% xdr_utmpidle)) {
|
||||
% return (FALSE);
|
||||
% }
|
||||
% return (TRUE);
|
||||
%}
|
||||
%
|
||||
%bool_t
|
||||
%xdr_utmpidlearr(xdrs, objp)
|
||||
% XDR *xdrs;
|
||||
% struct utmpidlearr *objp;
|
||||
%{
|
||||
% if (!xdr_array(xdrs, (char **)&objp->uia_arr, (u_int *)&objp->uia_cnt,
|
||||
% MAXUSERS, sizeof(struct utmpidle *), xdr_utmpidleptr)) {
|
||||
% return (FALSE);
|
||||
% }
|
||||
% return (TRUE);
|
||||
%}
|
||||
#endif
|
66
lib/librpcsvc/rquota.x
Normal file
66
lib/librpcsvc/rquota.x
Normal file
@ -0,0 +1,66 @@
|
||||
/*
|
||||
* Remote quota protocol
|
||||
* Requires unix authentication
|
||||
*/
|
||||
|
||||
#ifndef RPC_HDR
|
||||
%#ifndef lint
|
||||
%/*static char sccsid[] = "from: @(#)rquota.x 1.2 87/09/20 Copyr 1987 Sun Micro";*/
|
||||
%/*static char sccsid[] = "from: @(#)rquota.x 2.1 88/08/01 4.0 RPCSRC";*/
|
||||
%static char rcsid[] = "$Id: rquota.x,v 1.1 1995/01/12 19:39:54 jtc Exp $";
|
||||
%#endif /* not lint */
|
||||
#endif
|
||||
|
||||
const RQ_PATHLEN = 1024;
|
||||
|
||||
struct getquota_args {
|
||||
string gqa_pathp<RQ_PATHLEN>; /* path to filesystem of interest */
|
||||
int gqa_uid; /* inquire about quota for uid */
|
||||
};
|
||||
|
||||
/*
|
||||
* remote quota structure
|
||||
*/
|
||||
struct rquota {
|
||||
int rq_bsize; /* block size for block counts */
|
||||
bool rq_active; /* indicates whether quota is active */
|
||||
unsigned int rq_bhardlimit; /* absolute limit on disk blks alloc */
|
||||
unsigned int rq_bsoftlimit; /* preferred limit on disk blks */
|
||||
unsigned int rq_curblocks; /* current block count */
|
||||
unsigned int rq_fhardlimit; /* absolute limit on allocated files */
|
||||
unsigned int rq_fsoftlimit; /* preferred file limit */
|
||||
unsigned int rq_curfiles; /* current # allocated files */
|
||||
unsigned int rq_btimeleft; /* time left for excessive disk use */
|
||||
unsigned int rq_ftimeleft; /* time left for excessive files */
|
||||
};
|
||||
|
||||
enum gqr_status {
|
||||
Q_OK = 1, /* quota returned */
|
||||
Q_NOQUOTA = 2, /* noquota for uid */
|
||||
Q_EPERM = 3 /* no permission to access quota */
|
||||
};
|
||||
|
||||
union getquota_rslt switch (gqr_status status) {
|
||||
case Q_OK:
|
||||
rquota gqr_rquota; /* valid if status == Q_OK */
|
||||
case Q_NOQUOTA:
|
||||
void;
|
||||
case Q_EPERM:
|
||||
void;
|
||||
};
|
||||
|
||||
program RQUOTAPROG {
|
||||
version RQUOTAVERS {
|
||||
/*
|
||||
* Get all quotas
|
||||
*/
|
||||
getquota_rslt
|
||||
RQUOTAPROC_GETQUOTA(getquota_args) = 1;
|
||||
|
||||
/*
|
||||
* Get active quotas only
|
||||
*/
|
||||
getquota_rslt
|
||||
RQUOTAPROC_GETACTIVEQUOTA(getquota_args) = 2;
|
||||
} = 1;
|
||||
} = 100011;
|
150
lib/librpcsvc/rstat.x
Normal file
150
lib/librpcsvc/rstat.x
Normal file
@ -0,0 +1,150 @@
|
||||
/*
|
||||
* Sun RPC is a product of Sun Microsystems, Inc. and is provided for
|
||||
* unrestricted use provided that this legend is included on all tape
|
||||
* media and as a part of the software program in whole or part. Users
|
||||
* may copy or modify Sun RPC without charge, but are not authorized
|
||||
* to license or distribute it to anyone else except as part of a product or
|
||||
* program developed by the user.
|
||||
*
|
||||
* SUN RPC IS PROVIDED AS IS WITH NO WARRANTIES OF ANY KIND INCLUDING THE
|
||||
* WARRANTIES OF DESIGN, MERCHANTIBILITY AND FITNESS FOR A PARTICULAR
|
||||
* PURPOSE, OR ARISING FROM A COURSE OF DEALING, USAGE OR TRADE PRACTICE.
|
||||
*
|
||||
* Sun RPC is provided with no support and without any obligation on the
|
||||
* part of Sun Microsystems, Inc. to assist in its use, correction,
|
||||
* modification or enhancement.
|
||||
*
|
||||
* SUN MICROSYSTEMS, INC. SHALL HAVE NO LIABILITY WITH RESPECT TO THE
|
||||
* INFRINGEMENT OF COPYRIGHTS, TRADE SECRETS OR ANY PATENTS BY SUN RPC
|
||||
* OR ANY PART THEREOF.
|
||||
*
|
||||
* In no event will Sun Microsystems, Inc. be liable for any lost revenue
|
||||
* or profits or other special, indirect and consequential damages, even if
|
||||
* Sun has been advised of the possibility of such damages.
|
||||
*
|
||||
* Sun Microsystems, Inc.
|
||||
* 2550 Garcia Avenue
|
||||
* Mountain View, California 94043
|
||||
*/
|
||||
|
||||
/*
|
||||
* Gather statistics on remote machines
|
||||
*/
|
||||
|
||||
#ifdef RPC_HDR
|
||||
|
||||
%#ifndef FSCALE
|
||||
%/*
|
||||
% * Scale factor for scaled integers used to count load averages.
|
||||
% */
|
||||
%#define FSHIFT 8 /* bits to right of fixed binary point */
|
||||
%#define FSCALE (1<<FSHIFT)
|
||||
%
|
||||
%#endif /* ndef FSCALE */
|
||||
|
||||
#else
|
||||
|
||||
%#ifndef lint
|
||||
%/*static char sccsid[] = "from: @(#)rstat.x 1.2 87/09/18 Copyr 1987 Sun Micro";*/
|
||||
%/*static char sccsid[] = "from: @(#)rstat.x 2.2 88/08/01 4.0 RPCSRC";*/
|
||||
%static char rcsid[] = "$Id: rstat.x,v 1.1 1995/01/12 19:39:55 jtc Exp $";
|
||||
%#endif /* not lint */
|
||||
|
||||
#endif /* def RPC_HDR */
|
||||
|
||||
const CPUSTATES = 4;
|
||||
const DK_NDRIVE = 4;
|
||||
|
||||
/*
|
||||
* GMT since 0:00, January 1, 1970
|
||||
*/
|
||||
struct rstat_timeval {
|
||||
unsigned int tv_sec; /* seconds */
|
||||
unsigned int tv_usec; /* and microseconds */
|
||||
};
|
||||
|
||||
struct statstime { /* RSTATVERS_TIME */
|
||||
int cp_time[CPUSTATES];
|
||||
int dk_xfer[DK_NDRIVE];
|
||||
unsigned int v_pgpgin; /* these are cumulative sum */
|
||||
unsigned int v_pgpgout;
|
||||
unsigned int v_pswpin;
|
||||
unsigned int v_pswpout;
|
||||
unsigned int v_intr;
|
||||
int if_ipackets;
|
||||
int if_ierrors;
|
||||
int if_oerrors;
|
||||
int if_collisions;
|
||||
unsigned int v_swtch;
|
||||
int avenrun[3]; /* scaled by FSCALE */
|
||||
rstat_timeval boottime;
|
||||
rstat_timeval curtime;
|
||||
int if_opackets;
|
||||
};
|
||||
|
||||
struct statsswtch { /* RSTATVERS_SWTCH */
|
||||
int cp_time[CPUSTATES];
|
||||
int dk_xfer[DK_NDRIVE];
|
||||
unsigned int v_pgpgin; /* these are cumulative sum */
|
||||
unsigned int v_pgpgout;
|
||||
unsigned int v_pswpin;
|
||||
unsigned int v_pswpout;
|
||||
unsigned int v_intr;
|
||||
int if_ipackets;
|
||||
int if_ierrors;
|
||||
int if_oerrors;
|
||||
int if_collisions;
|
||||
unsigned int v_swtch;
|
||||
unsigned int avenrun[3];/* scaled by FSCALE */
|
||||
rstat_timeval boottime;
|
||||
int if_opackets;
|
||||
};
|
||||
|
||||
struct stats { /* RSTATVERS_ORIG */
|
||||
int cp_time[CPUSTATES];
|
||||
int dk_xfer[DK_NDRIVE];
|
||||
unsigned int v_pgpgin; /* these are cumulative sum */
|
||||
unsigned int v_pgpgout;
|
||||
unsigned int v_pswpin;
|
||||
unsigned int v_pswpout;
|
||||
unsigned int v_intr;
|
||||
int if_ipackets;
|
||||
int if_ierrors;
|
||||
int if_oerrors;
|
||||
int if_collisions;
|
||||
int if_opackets;
|
||||
};
|
||||
|
||||
|
||||
program RSTATPROG {
|
||||
/*
|
||||
* Newest version includes current time and context switching info
|
||||
*/
|
||||
version RSTATVERS_TIME {
|
||||
statstime
|
||||
RSTATPROC_STATS(void) = 1;
|
||||
|
||||
unsigned int
|
||||
RSTATPROC_HAVEDISK(void) = 2;
|
||||
} = 3;
|
||||
/*
|
||||
* Does not have current time
|
||||
*/
|
||||
version RSTATVERS_SWTCH {
|
||||
statsswtch
|
||||
RSTATPROC_STATS(void) = 1;
|
||||
|
||||
unsigned int
|
||||
RSTATPROC_HAVEDISK(void) = 2;
|
||||
} = 2;
|
||||
/*
|
||||
* Old version has no info about current time or context switching
|
||||
*/
|
||||
version RSTATVERS_ORIG {
|
||||
stats
|
||||
RSTATPROC_STATS(void) = 1;
|
||||
|
||||
unsigned int
|
||||
RSTATPROC_HAVEDISK(void) = 2;
|
||||
} = 1;
|
||||
} = 100001;
|
91
lib/librpcsvc/rusers.x
Normal file
91
lib/librpcsvc/rusers.x
Normal file
@ -0,0 +1,91 @@
|
||||
/*
|
||||
* Sun RPC is a product of Sun Microsystems, Inc. and is provided for
|
||||
* unrestricted use provided that this legend is included on all tape
|
||||
* media and as a part of the software program in whole or part. Users
|
||||
* may copy or modify Sun RPC without charge, but are not authorized
|
||||
* to license or distribute it to anyone else except as part of a product or
|
||||
* program developed by the user.
|
||||
*
|
||||
* SUN RPC IS PROVIDED AS IS WITH NO WARRANTIES OF ANY KIND INCLUDING THE
|
||||
* WARRANTIES OF DESIGN, MERCHANTIBILITY AND FITNESS FOR A PARTICULAR
|
||||
* PURPOSE, OR ARISING FROM A COURSE OF DEALING, USAGE OR TRADE PRACTICE.
|
||||
*
|
||||
* Sun RPC is provided with no support and without any obligation on the
|
||||
* part of Sun Microsystems, Inc. to assist in its use, correction,
|
||||
* modification or enhancement.
|
||||
*
|
||||
* SUN MICROSYSTEMS, INC. SHALL HAVE NO LIABILITY WITH RESPECT TO THE
|
||||
* INFRINGEMENT OF COPYRIGHTS, TRADE SECRETS OR ANY PATENTS BY SUN RPC
|
||||
* OR ANY PART THEREOF.
|
||||
*
|
||||
* In no event will Sun Microsystems, Inc. be liable for any lost revenue
|
||||
* or profits or other special, indirect and consequential damages, even if
|
||||
* Sun has been advised of the possibility of such damages.
|
||||
*
|
||||
* Sun Microsystems, Inc.
|
||||
* 2550 Garcia Avenue
|
||||
* Mountain View, California 94043
|
||||
*/
|
||||
|
||||
/*
|
||||
* Find out about remote users
|
||||
*/
|
||||
|
||||
#ifndef RPC_HDR
|
||||
%#ifndef lint
|
||||
%/*static char sccsid[] = "from: @(#)rnusers.x 1.2 87/09/20 Copyr 1987 Sun Micro";*/
|
||||
/* @(#)rusers.x 1.1 91/12/01 Copyright 1991 Sun Microsystems, Inc. */
|
||||
%static char rcsid[] = "$Id: rusers.x,v 1.1 1995/01/12 19:39:56 jtc Exp $";
|
||||
%#endif /* not lint */
|
||||
#endif
|
||||
|
||||
%/*
|
||||
% * Find out about remote users
|
||||
% */
|
||||
|
||||
const RUSERS_MAXUSERLEN = 32;
|
||||
const RUSERS_MAXLINELEN = 32;
|
||||
const RUSERS_MAXHOSTLEN = 257;
|
||||
|
||||
struct rusers_utmp {
|
||||
string ut_user<RUSERS_MAXUSERLEN>; /* aka ut_name */
|
||||
string ut_line<RUSERS_MAXLINELEN>; /* device */
|
||||
string ut_host<RUSERS_MAXHOSTLEN>; /* host user logged on from */
|
||||
int ut_type; /* type of entry */
|
||||
int ut_time; /* time entry was made */
|
||||
unsigned int ut_idle; /* minutes idle */
|
||||
};
|
||||
|
||||
typedef rusers_utmp utmp_array<>;
|
||||
|
||||
#ifdef RPC_HDR
|
||||
%
|
||||
%/*
|
||||
% * Values for ut_type field above.
|
||||
% */
|
||||
#endif
|
||||
const RUSERS_EMPTY = 0;
|
||||
const RUSERS_RUN_LVL = 1;
|
||||
const RUSERS_BOOT_TIME = 2;
|
||||
const RUSERS_OLD_TIME = 3;
|
||||
const RUSERS_NEW_TIME = 4;
|
||||
const RUSERS_INIT_PROCESS = 5;
|
||||
const RUSERS_LOGIN_PROCESS = 6;
|
||||
const RUSERS_USER_PROCESS = 7;
|
||||
const RUSERS_DEAD_PROCESS = 8;
|
||||
const RUSERS_ACCOUNTING = 9;
|
||||
|
||||
program RUSERSPROG {
|
||||
|
||||
version RUSERSVERS_3 {
|
||||
int
|
||||
RUSERSPROC_NUM(void) = 1;
|
||||
|
||||
utmp_array
|
||||
RUSERSPROC_NAMES(void) = 2;
|
||||
|
||||
utmp_array
|
||||
RUSERSPROC_ALLNAMES(void) = 3;
|
||||
} = 3;
|
||||
|
||||
} = 100002;
|
46
lib/librpcsvc/rwall.x
Normal file
46
lib/librpcsvc/rwall.x
Normal file
@ -0,0 +1,46 @@
|
||||
/*
|
||||
* Copyright (c) 1993 Christopher G. Demetriou
|
||||
* All rights reserved.
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
* modification, are permitted provided that the following conditions
|
||||
* are met:
|
||||
* 1. Redistributions of source code must retain the above copyright
|
||||
* notice, this list of conditions and the following disclaimer.
|
||||
* 2. Redistributions in binary form must reproduce the above copyright
|
||||
* notice, this list of conditions and the following disclaimer in the
|
||||
* documentation and/or other materials provided with the distribution.
|
||||
* 3. The name of the author may not be used to endorse or promote
|
||||
* products derived from this software without specific prior written
|
||||
* permission.
|
||||
*
|
||||
* THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS
|
||||
* OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
|
||||
* WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
|
||||
* ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY
|
||||
* DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
|
||||
* DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
|
||||
* OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
|
||||
* HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
|
||||
* LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
|
||||
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
|
||||
* SUCH DAMAGE.
|
||||
*/
|
||||
|
||||
/*
|
||||
* rpc protocol definition for (remote) wall protocol
|
||||
*
|
||||
* this has to be compatible with sun's definition
|
||||
*/
|
||||
|
||||
#ifndef RPC_HDR
|
||||
%#ifndef lint
|
||||
%static char rcsid[] = "$Id: rwall.x,v 1.1 1995/01/12 19:39:57 jtc Exp $";
|
||||
%#endif /* not lint */
|
||||
#endif
|
||||
|
||||
program WALLPROG {
|
||||
version WALLVERS {
|
||||
void WALLPROC_WALL(string) = 2;
|
||||
} = 1;
|
||||
} = 100008;
|
126
lib/librpcsvc/sm_inter.x
Normal file
126
lib/librpcsvc/sm_inter.x
Normal file
@ -0,0 +1,126 @@
|
||||
/*
|
||||
* Sun RPC is a product of Sun Microsystems, Inc. and is provided for
|
||||
* unrestricted use provided that this legend is included on all tape
|
||||
* media and as a part of the software program in whole or part. Users
|
||||
* may copy or modify Sun RPC without charge, but are not authorized
|
||||
* to license or distribute it to anyone else except as part of a product or
|
||||
* program developed by the user.
|
||||
*
|
||||
* SUN RPC IS PROVIDED AS IS WITH NO WARRANTIES OF ANY KIND INCLUDING THE
|
||||
* WARRANTIES OF DESIGN, MERCHANTIBILITY AND FITNESS FOR A PARTICULAR
|
||||
* PURPOSE, OR ARISING FROM A COURSE OF DEALING, USAGE OR TRADE PRACTICE.
|
||||
*
|
||||
* Sun RPC is provided with no support and without any obligation on the
|
||||
* part of Sun Microsystems, Inc. to assist in its use, correction,
|
||||
* modification or enhancement.
|
||||
*
|
||||
* SUN MICROSYSTEMS, INC. SHALL HAVE NO LIABILITY WITH RESPECT TO THE
|
||||
* INFRINGEMENT OF COPYRIGHTS, TRADE SECRETS OR ANY PATENTS BY SUN RPC
|
||||
* OR ANY PART THEREOF.
|
||||
*
|
||||
* In no event will Sun Microsystems, Inc. be liable for any lost revenue
|
||||
* or profits or other special, indirect and consequential damages, even if
|
||||
* Sun has been advised of the possibility of such damages.
|
||||
*
|
||||
* Sun Microsystems, Inc.
|
||||
* 2550 Garcia Avenue
|
||||
* Mountain View, California 94043
|
||||
*/
|
||||
|
||||
/*
|
||||
* Status monitor protocol specification
|
||||
* Copyright (C) 1986 Sun Microsystems, Inc.
|
||||
*
|
||||
*/
|
||||
|
||||
#ifndef RPC_HDR
|
||||
%#ifndef lint
|
||||
%/*static char sccsid[] = "from: @(#)sm_inter.x 1.7 87/06/24 Copyr 1987 Sun Micro";*/
|
||||
%/*static char sccsid[] = "from: @(#)sm_inter.x 2.2 88/08/01 4.0 RPCSRC";*/
|
||||
%static char rcsid[] = "$Id: sm_inter.x,v 1.1 1995/01/12 19:39:58 jtc Exp $";
|
||||
%#endif /* not lint */
|
||||
#endif
|
||||
|
||||
program SM_PROG {
|
||||
version SM_VERS {
|
||||
/* res_stat = stat_succ if status monitor agrees to monitor */
|
||||
/* res_stat = stat_fail if status monitor cannot monitor */
|
||||
/* if res_stat == stat_succ, state = state number of site sm_name */
|
||||
struct sm_stat_res SM_STAT(struct sm_name) = 1;
|
||||
|
||||
/* res_stat = stat_succ if status monitor agrees to monitor */
|
||||
/* res_stat = stat_fail if status monitor cannot monitor */
|
||||
/* stat consists of state number of local site */
|
||||
struct sm_stat_res SM_MON(struct mon) = 2;
|
||||
|
||||
/* stat consists of state number of local site */
|
||||
struct sm_stat SM_UNMON(struct mon_id) = 3;
|
||||
|
||||
/* stat consists of state number of local site */
|
||||
struct sm_stat SM_UNMON_ALL(struct my_id) = 4;
|
||||
|
||||
void SM_SIMU_CRASH(void) = 5;
|
||||
|
||||
void SM_NOTIFY(struct stat_chge) = 6;
|
||||
|
||||
} = 1;
|
||||
} = 100024;
|
||||
|
||||
const SM_MAXSTRLEN = 1024;
|
||||
|
||||
struct sm_name {
|
||||
string mon_name<SM_MAXSTRLEN>;
|
||||
};
|
||||
|
||||
struct my_id {
|
||||
string my_name<SM_MAXSTRLEN>; /* name of the site iniates the monitoring request*/
|
||||
int my_prog; /* rpc program # of the requesting process */
|
||||
int my_vers; /* rpc version # of the requesting process */
|
||||
int my_proc; /* rpc procedure # of the requesting process */
|
||||
};
|
||||
|
||||
struct mon_id {
|
||||
string mon_name<SM_MAXSTRLEN>; /* name of the site to be monitored */
|
||||
struct my_id my_id;
|
||||
};
|
||||
|
||||
|
||||
struct mon {
|
||||
struct mon_id mon_id;
|
||||
opaque priv[16]; /* private information to store at monitor for requesting process */
|
||||
};
|
||||
|
||||
struct stat_chge {
|
||||
string mon_name<SM_MAXSTRLEN>; /* name of the site that had the state change */
|
||||
int state;
|
||||
};
|
||||
|
||||
/*
|
||||
* state # of status monitor monitonically increases each time
|
||||
* status of the site changes:
|
||||
* an even number (>= 0) indicates the site is down and
|
||||
* an odd number (> 0) indicates the site is up;
|
||||
*/
|
||||
struct sm_stat {
|
||||
int state; /* state # of status monitor */
|
||||
};
|
||||
|
||||
enum res {
|
||||
stat_succ = 0, /* status monitor agrees to monitor */
|
||||
stat_fail = 1 /* status monitor cannot monitor */
|
||||
};
|
||||
|
||||
struct sm_stat_res {
|
||||
res res_stat;
|
||||
int state;
|
||||
};
|
||||
|
||||
/*
|
||||
* structure of the status message sent back by the status monitor
|
||||
* when monitor site status changes
|
||||
*/
|
||||
struct status {
|
||||
string mon_name<SM_MAXSTRLEN>;
|
||||
int state;
|
||||
opaque priv[16]; /* stored private information */
|
||||
};
|
103
lib/librpcsvc/spray.x
Normal file
103
lib/librpcsvc/spray.x
Normal file
@ -0,0 +1,103 @@
|
||||
/*
|
||||
* Sun RPC is a product of Sun Microsystems, Inc. and is provided for
|
||||
* unrestricted use provided that this legend is included on all tape
|
||||
* media and as a part of the software program in whole or part. Users
|
||||
* may copy or modify Sun RPC without charge, but are not authorized
|
||||
* to license or distribute it to anyone else except as part of a product or
|
||||
* program developed by the user.
|
||||
*
|
||||
* SUN RPC IS PROVIDED AS IS WITH NO WARRANTIES OF ANY KIND INCLUDING THE
|
||||
* WARRANTIES OF DESIGN, MERCHANTIBILITY AND FITNESS FOR A PARTICULAR
|
||||
* PURPOSE, OR ARISING FROM A COURSE OF DEALING, USAGE OR TRADE PRACTICE.
|
||||
*
|
||||
* Sun RPC is provided with no support and without any obligation on the
|
||||
* part of Sun Microsystems, Inc. to assist in its use, correction,
|
||||
* modification or enhancement.
|
||||
*
|
||||
* SUN MICROSYSTEMS, INC. SHALL HAVE NO LIABILITY WITH RESPECT TO THE
|
||||
* INFRINGEMENT OF COPYRIGHTS, TRADE SECRETS OR ANY PATENTS BY SUN RPC
|
||||
* OR ANY PART THEREOF.
|
||||
*
|
||||
* In no event will Sun Microsystems, Inc. be liable for any lost revenue
|
||||
* or profits or other special, indirect and consequential damages, even if
|
||||
* Sun has been advised of the possibility of such damages.
|
||||
*
|
||||
* Sun Microsystems, Inc.
|
||||
* 2550 Garcia Avenue
|
||||
* Mountain View, California 94043
|
||||
*/
|
||||
|
||||
/*
|
||||
* Spray a server with packets
|
||||
* Useful for testing flakiness of network interfaces
|
||||
*/
|
||||
|
||||
#ifndef RPC_HDR
|
||||
%#ifndef lint
|
||||
%/*static char sccsid[] = "from: @(#)spray.x 1.2 87/09/18 Copyr 1987 Sun Micro";*/
|
||||
%/*static char sccsid[] = "from: @(#)spray.x 2.1 88/08/01 4.0 RPCSRC";*/
|
||||
%static char rcsid[] = "$Id: spray.x,v 1.1 1995/01/12 19:39:59 jtc Exp $";
|
||||
%#endif /* not lint */
|
||||
#endif
|
||||
|
||||
#ifdef RPC_HDR
|
||||
%#ifndef _RPCSVC_SPRAY_H_
|
||||
%#define _RPCSVC_SPRAY_H_
|
||||
%
|
||||
#endif
|
||||
|
||||
const SPRAYOVERHEAD = 86; /* size of rpc packet when size=0 */
|
||||
const SPRAYMAX = 8845; /* max amount can spray */
|
||||
|
||||
|
||||
/*
|
||||
* GMT since 0:00, 1 January 1970
|
||||
*/
|
||||
struct spraytimeval {
|
||||
unsigned int sec;
|
||||
unsigned int usec;
|
||||
};
|
||||
|
||||
/*
|
||||
* spray statistics
|
||||
*/
|
||||
struct spraycumul {
|
||||
unsigned int counter;
|
||||
spraytimeval clock;
|
||||
};
|
||||
|
||||
/*
|
||||
* spray data
|
||||
*/
|
||||
typedef opaque sprayarr<SPRAYMAX>;
|
||||
|
||||
program SPRAYPROG {
|
||||
version SPRAYVERS {
|
||||
/*
|
||||
* Just throw away the data and increment the counter
|
||||
* This call never returns, so the client should always
|
||||
* time it out.
|
||||
*/
|
||||
void
|
||||
SPRAYPROC_SPRAY(sprayarr) = 1;
|
||||
|
||||
/*
|
||||
* Get the value of the counter and elapsed time since
|
||||
* last CLEAR.
|
||||
*/
|
||||
spraycumul
|
||||
SPRAYPROC_GET(void) = 2;
|
||||
|
||||
/*
|
||||
* Clear the counter and reset the elapsed time
|
||||
*/
|
||||
void
|
||||
SPRAYPROC_CLEAR(void) = 3;
|
||||
} = 1;
|
||||
} = 100012;
|
||||
|
||||
|
||||
#ifdef RPC_HDR
|
||||
%
|
||||
%#endif /* _RPCSVC_SPRAY_H_ */
|
||||
#endif
|
296
lib/librpcsvc/yp.x
Normal file
296
lib/librpcsvc/yp.x
Normal file
@ -0,0 +1,296 @@
|
||||
/*
|
||||
* Sun RPC is a product of Sun Microsystems, Inc. and is provided for
|
||||
* unrestricted use provided that this legend is included on all tape
|
||||
* media and as a part of the software program in whole or part. Users
|
||||
* may copy or modify Sun RPC without charge, but are not authorized
|
||||
* to license or distribute it to anyone else except as part of a product or
|
||||
* program developed by the user.
|
||||
*
|
||||
* SUN RPC IS PROVIDED AS IS WITH NO WARRANTIES OF ANY KIND INCLUDING THE
|
||||
* WARRANTIES OF DESIGN, MERCHANTIBILITY AND FITNESS FOR A PARTICULAR
|
||||
* PURPOSE, OR ARISING FROM A COURSE OF DEALING, USAGE OR TRADE PRACTICE.
|
||||
*
|
||||
* Sun RPC is provided with no support and without any obligation on the
|
||||
* part of Sun Microsystems, Inc. to assist in its use, correction,
|
||||
* modification or enhancement.
|
||||
*
|
||||
* SUN MICROSYSTEMS, INC. SHALL HAVE NO LIABILITY WITH RESPECT TO THE
|
||||
* INFRINGEMENT OF COPYRIGHTS, TRADE SECRETS OR ANY PATENTS BY SUN RPC
|
||||
* OR ANY PART THEREOF.
|
||||
*
|
||||
* In no event will Sun Microsystems, Inc. be liable for any lost revenue
|
||||
* or profits or other special, indirect and consequential damages, even if
|
||||
* Sun has been advised of the possibility of such damages.
|
||||
*
|
||||
* Sun Microsystems, Inc.
|
||||
* 2550 Garcia Avenue
|
||||
* Mountain View, California 94043
|
||||
*/
|
||||
|
||||
/*
|
||||
* Protocol description file for the Yellow Pages Service
|
||||
*/
|
||||
|
||||
#ifndef RPC_HDR
|
||||
%#ifndef lint
|
||||
%/*static char sccsid[] = "from: @(#)yp.x 2.1 88/08/01 4.0 RPCSRC";*/
|
||||
%static char rcsid[] = "$Id: yp.x,v 1.1 1995/01/12 19:40:00 jtc Exp $";
|
||||
%#endif /* not lint */
|
||||
#endif
|
||||
|
||||
const YPMAXRECORD = 1024;
|
||||
const YPMAXDOMAIN = 64;
|
||||
const YPMAXMAP = 64;
|
||||
const YPMAXPEER = 64;
|
||||
|
||||
|
||||
enum ypstat {
|
||||
YP_TRUE = 1,
|
||||
YP_NOMORE = 2,
|
||||
YP_FALSE = 0,
|
||||
YP_NOMAP = -1,
|
||||
YP_NODOM = -2,
|
||||
YP_NOKEY = -3,
|
||||
YP_BADOP = -4,
|
||||
YP_BADDB = -5,
|
||||
YP_YPERR = -6,
|
||||
YP_BADARGS = -7,
|
||||
YP_VERS = -8
|
||||
};
|
||||
|
||||
|
||||
enum ypxfrstat {
|
||||
YPXFR_SUCC = 1,
|
||||
YPXFR_AGE = 2,
|
||||
YPXFR_NOMAP = -1,
|
||||
YPXFR_NODOM = -2,
|
||||
YPXFR_RSRC = -3,
|
||||
YPXFR_RPC = -4,
|
||||
YPXFR_MADDR = -5,
|
||||
YPXFR_YPERR = -6,
|
||||
YPXFR_BADARGS = -7,
|
||||
YPXFR_DBM = -8,
|
||||
YPXFR_FILE = -9,
|
||||
YPXFR_SKEW = -10,
|
||||
YPXFR_CLEAR = -11,
|
||||
YPXFR_FORCE = -12,
|
||||
YPXFR_XFRERR = -13,
|
||||
YPXFR_REFUSED = -14
|
||||
};
|
||||
|
||||
|
||||
typedef string domainname<YPMAXDOMAIN>;
|
||||
typedef string mapname<YPMAXMAP>;
|
||||
typedef string peername<YPMAXPEER>;
|
||||
typedef opaque keydat<YPMAXRECORD>;
|
||||
typedef opaque valdat<YPMAXRECORD>;
|
||||
|
||||
|
||||
struct ypmap_parms {
|
||||
domainname domain;
|
||||
mapname map;
|
||||
unsigned int ordernum;
|
||||
peername peer;
|
||||
};
|
||||
|
||||
struct ypreq_key {
|
||||
domainname domain;
|
||||
mapname map;
|
||||
keydat key;
|
||||
};
|
||||
|
||||
struct ypreq_nokey {
|
||||
domainname domain;
|
||||
mapname map;
|
||||
};
|
||||
|
||||
struct ypreq_xfr {
|
||||
ypmap_parms map_parms;
|
||||
unsigned int transid;
|
||||
unsigned int prog;
|
||||
unsigned int port;
|
||||
};
|
||||
|
||||
|
||||
struct ypresp_val {
|
||||
ypstat stat;
|
||||
valdat val;
|
||||
};
|
||||
|
||||
struct ypresp_key_val {
|
||||
ypstat stat;
|
||||
keydat key;
|
||||
valdat val;
|
||||
};
|
||||
|
||||
|
||||
struct ypresp_master {
|
||||
ypstat stat;
|
||||
peername peer;
|
||||
};
|
||||
|
||||
struct ypresp_order {
|
||||
ypstat stat;
|
||||
unsigned int ordernum;
|
||||
};
|
||||
|
||||
union ypresp_all switch (bool more) {
|
||||
case TRUE:
|
||||
ypresp_key_val val;
|
||||
case FALSE:
|
||||
void;
|
||||
};
|
||||
|
||||
struct ypresp_xfr {
|
||||
unsigned int transid;
|
||||
ypxfrstat xfrstat;
|
||||
};
|
||||
|
||||
struct ypmaplist {
|
||||
mapname map;
|
||||
ypmaplist *next;
|
||||
};
|
||||
|
||||
struct ypresp_maplist {
|
||||
ypstat stat;
|
||||
ypmaplist *maps;
|
||||
};
|
||||
|
||||
enum yppush_status {
|
||||
YPPUSH_SUCC = 1, /* Success */
|
||||
YPPUSH_AGE = 2, /* Master's version not newer */
|
||||
YPPUSH_NOMAP = -1, /* Can't find server for map */
|
||||
YPPUSH_NODOM = -2, /* Domain not supported */
|
||||
YPPUSH_RSRC = -3, /* Local resource alloc failure */
|
||||
YPPUSH_RPC = -4, /* RPC failure talking to server */
|
||||
YPPUSH_MADDR = -5, /* Can't get master address */
|
||||
YPPUSH_YPERR = -6, /* YP server/map db error */
|
||||
YPPUSH_BADARGS = -7, /* Request arguments bad */
|
||||
YPPUSH_DBM = -8, /* Local dbm operation failed */
|
||||
YPPUSH_FILE = -9, /* Local file I/O operation failed */
|
||||
YPPUSH_SKEW = -10, /* Map version skew during transfer */
|
||||
YPPUSH_CLEAR = -11, /* Can't send "Clear" req to local ypserv */
|
||||
YPPUSH_FORCE = -12, /* No local order number in map use -f flag. */
|
||||
YPPUSH_XFRERR = -13, /* ypxfr error */
|
||||
YPPUSH_REFUSED = -14 /* Transfer request refused by ypserv */
|
||||
};
|
||||
|
||||
struct yppushresp_xfr {
|
||||
unsigned transid;
|
||||
yppush_status status;
|
||||
};
|
||||
|
||||
/*
|
||||
* Response structure and overall result status codes. Success and failure
|
||||
* represent two separate response message types.
|
||||
*/
|
||||
|
||||
enum ypbind_resptype {
|
||||
YPBIND_SUCC_VAL = 1,
|
||||
YPBIND_FAIL_VAL = 2
|
||||
};
|
||||
|
||||
struct ypbind_binding {
|
||||
opaque ypbind_binding_addr[4]; /* In network order */
|
||||
opaque ypbind_binding_port[2]; /* In network order */
|
||||
};
|
||||
|
||||
union ypbind_resp switch (ypbind_resptype ypbind_status) {
|
||||
case YPBIND_FAIL_VAL:
|
||||
unsigned ypbind_error;
|
||||
case YPBIND_SUCC_VAL:
|
||||
ypbind_binding ypbind_bindinfo;
|
||||
};
|
||||
|
||||
/* Detailed failure reason codes for response field ypbind_error*/
|
||||
|
||||
const YPBIND_ERR_ERR = 1; /* Internal error */
|
||||
const YPBIND_ERR_NOSERV = 2; /* No bound server for passed domain */
|
||||
const YPBIND_ERR_RESC = 3; /* System resource allocation failure */
|
||||
|
||||
|
||||
/*
|
||||
* Request data structure for ypbind "Set domain" procedure.
|
||||
*/
|
||||
struct ypbind_setdom {
|
||||
domainname ypsetdom_domain;
|
||||
ypbind_binding ypsetdom_binding;
|
||||
unsigned ypsetdom_vers;
|
||||
};
|
||||
|
||||
|
||||
/*
|
||||
* YP access protocol
|
||||
*/
|
||||
program YPPROG {
|
||||
version YPVERS {
|
||||
void
|
||||
YPPROC_NULL(void) = 0;
|
||||
|
||||
bool
|
||||
YPPROC_DOMAIN(domainname) = 1;
|
||||
|
||||
bool
|
||||
YPPROC_DOMAIN_NONACK(domainname) = 2;
|
||||
|
||||
ypresp_val
|
||||
YPPROC_MATCH(ypreq_key) = 3;
|
||||
|
||||
ypresp_key_val
|
||||
YPPROC_FIRST(ypreq_key) = 4;
|
||||
|
||||
ypresp_key_val
|
||||
YPPROC_NEXT(ypreq_key) = 5;
|
||||
|
||||
ypresp_xfr
|
||||
YPPROC_XFR(ypreq_xfr) = 6;
|
||||
|
||||
void
|
||||
YPPROC_CLEAR(void) = 7;
|
||||
|
||||
ypresp_all
|
||||
YPPROC_ALL(ypreq_nokey) = 8;
|
||||
|
||||
ypresp_master
|
||||
YPPROC_MASTER(ypreq_nokey) = 9;
|
||||
|
||||
ypresp_order
|
||||
YPPROC_ORDER(ypreq_nokey) = 10;
|
||||
|
||||
ypresp_maplist
|
||||
YPPROC_MAPLIST(domainname) = 11;
|
||||
} = 2;
|
||||
} = 100004;
|
||||
|
||||
|
||||
/*
|
||||
* YPPUSHPROC_XFRRESP is the callback routine for result of YPPROC_XFR
|
||||
*/
|
||||
program YPPUSH_XFRRESPPROG {
|
||||
version YPPUSH_XFRRESPVERS {
|
||||
void
|
||||
YPPUSHPROC_NULL(void) = 0;
|
||||
|
||||
yppushresp_xfr
|
||||
YPPUSHPROC_XFRRESP(void) = 1;
|
||||
} = 1;
|
||||
} = 0x40000000; /* transient: could be anything up to 0x5fffffff */
|
||||
|
||||
|
||||
/*
|
||||
* YP binding protocol
|
||||
*/
|
||||
program YPBINDPROG {
|
||||
version YPBINDVERS {
|
||||
void
|
||||
YPBINDPROC_NULL(void) = 0;
|
||||
|
||||
ypbind_resp
|
||||
YPBINDPROC_DOMAIN(domainname) = 1;
|
||||
|
||||
void
|
||||
YPBINDPROC_SETDOM(ypbind_setdom) = 2;
|
||||
} = 2;
|
||||
} = 100007;
|
||||
|
||||
|
69
lib/librpcsvc/yppasswd.x
Normal file
69
lib/librpcsvc/yppasswd.x
Normal file
@ -0,0 +1,69 @@
|
||||
/*
|
||||
* Sun RPC is a product of Sun Microsystems, Inc. and is provided for
|
||||
* unrestricted use provided that this legend is included on all tape
|
||||
* media and as a part of the software program in whole or part. Users
|
||||
* may copy or modify Sun RPC without charge, but are not authorized
|
||||
* to license or distribute it to anyone else except as part of a product or
|
||||
* program developed by the user.
|
||||
*
|
||||
* SUN RPC IS PROVIDED AS IS WITH NO WARRANTIES OF ANY KIND INCLUDING THE
|
||||
* WARRANTIES OF DESIGN, MERCHANTIBILITY AND FITNESS FOR A PARTICULAR
|
||||
* PURPOSE, OR ARISING FROM A COURSE OF DEALING, USAGE OR TRADE PRACTICE.
|
||||
*
|
||||
* Sun RPC is provided with no support and without any obligation on the
|
||||
* part of Sun Microsystems, Inc. to assist in its use, correction,
|
||||
* modification or enhancement.
|
||||
*
|
||||
* SUN MICROSYSTEMS, INC. SHALL HAVE NO LIABILITY WITH RESPECT TO THE
|
||||
* INFRINGEMENT OF COPYRIGHTS, TRADE SECRETS OR ANY PATENTS BY SUN RPC
|
||||
* OR ANY PART THEREOF.
|
||||
*
|
||||
* In no event will Sun Microsystems, Inc. be liable for any lost revenue
|
||||
* or profits or other special, indirect and consequential damages, even if
|
||||
* Sun has been advised of the possibility of such damages.
|
||||
*
|
||||
* Sun Microsystems, Inc.
|
||||
* 2550 Garcia Avenue
|
||||
* Mountain View, California 94043
|
||||
*/
|
||||
|
||||
/*
|
||||
* YP password update protocol
|
||||
* Requires unix authentication
|
||||
*/
|
||||
|
||||
#ifndef RPC_HDR
|
||||
%#ifndef lint
|
||||
%/*static char sccsid[] = "from: @(#)yppasswd.x 1.1 87/04/13 Copyr 1987 Sun Micro";*/
|
||||
%/*static char sccsid[] = "from: @(#)yppasswd.x 2.1 88/08/01 4.0 RPCSRC";*/
|
||||
%static char rcsid[] = "$Id: yppasswd.x,v 1.1 1995/01/12 19:40:02 jtc Exp $";
|
||||
%#endif /* not lint */
|
||||
#endif
|
||||
|
||||
program YPPASSWDPROG {
|
||||
version YPPASSWDVERS {
|
||||
/*
|
||||
* Update my passwd entry
|
||||
*/
|
||||
int
|
||||
YPPASSWDPROC_UPDATE(yppasswd) = 1;
|
||||
} = 1;
|
||||
} = 100009;
|
||||
|
||||
|
||||
struct x_passwd {
|
||||
string pw_name<>; /* username */
|
||||
string pw_passwd<>; /* encrypted password */
|
||||
int pw_uid; /* user id */
|
||||
int pw_gid; /* group id */
|
||||
string pw_gecos<>; /* in real life name */
|
||||
string pw_dir<>; /* home directory */
|
||||
string pw_shell<>; /* default shell */
|
||||
};
|
||||
|
||||
struct yppasswd {
|
||||
string oldpass<>; /* unencrypted old password */
|
||||
x_passwd newpw; /* new passwd entry */
|
||||
};
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user