Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/include Move rpcb_prot.x to here from libc/rpc.



details:   https://anonhg.NetBSD.org/src/rev/3abeebb23a6b
branches:  trunk
changeset: 487111:3abeebb23a6b
user:      fvdl <fvdl%NetBSD.org@localhost>
date:      Sat Jun 03 02:29:22 2000 +0000

description:
Move rpcb_prot.x to here from libc/rpc.

diffstat:

 include/Makefile        |   12 +-
 include/rpc/rpcb_prot.x |  559 ++++++++++++++++++++++++++++++++++++++++++++++++
 2 files changed, 568 insertions(+), 3 deletions(-)

diffs (truncated from 591 to 300 lines):

diff -r a5ee2b0f9a83 -r 3abeebb23a6b include/Makefile
--- a/include/Makefile  Sat Jun 03 02:28:40 2000 +0000
+++ b/include/Makefile  Sat Jun 03 02:29:22 2000 +0000
@@ -1,4 +1,4 @@
-#      $NetBSD: Makefile,v 1.87 2000/06/02 23:01:57 fvdl Exp $
+#      $NetBSD: Makefile,v 1.88 2000/06/03 02:29:22 fvdl Exp $
 #      @(#)Makefile    8.2 (Berkeley) 1/4/94
 
 SRCTOP=        ..
@@ -25,10 +25,16 @@
 INCS+= protocols/dumprestore.h protocols/routed.h protocols/rwhod.h \
        protocols/talkd.h protocols/timed.h
 INCS+= rpc/auth.h rpc/auth_unix.h rpc/clnt.h rpc/nettype.h rpc/pmap_clnt.h \
-       rpc/pmap_prot.h rpc/pmap_rmt.h rpc/rpc.h rpc/rpc_msg.h rpc/svc.h \
-       rpc/svc_auth.h rpc/types.h rpc/xdr.h
+       rpc/pmap_prot.h rpc/pmap_rmt.h rpc/rpc.h rpc/rpcb_prot.h rpc/rpc_msg.h \
+       rpc/svc.h rpc/svc_auth.h rpc/types.h rpc/xdr.h
 INCS+= rpcsvc/yp_prot.h rpcsvc/ypclnt.h
 
+
+rpc/rpcb_prot.h: rpc/rpcb_prot.x
+       rpcgen -h ${.ALLSRC} -o ${.TARGET}
+
+CLEANFILES+=   rpc/rpcb_prot.h
+
 INCSDIR=/usr/include
 
 MKOBJ= no
diff -r a5ee2b0f9a83 -r 3abeebb23a6b include/rpc/rpcb_prot.x
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/include/rpc/rpcb_prot.x   Sat Jun 03 02:29:22 2000 +0000
@@ -0,0 +1,559 @@
+%/*
+% * 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
+% */
+%/*
+% * Copyright (c) 1988 by Sun Microsystems, Inc.
+% */
+
+%/* from rpcb_prot.x */
+
+#ifdef RPC_HDR
+%
+%/* #pragma ident      "@(#)rpcb_prot.x        1.5     94/04/29 SMI" */
+%
+%#ifndef _KERNEL
+%
+#endif
+
+/*
+ * rpcb_prot.x
+ * rpcbind protocol, versions 3 and 4, in RPC Language
+ */
+%
+%/*
+% * The following procedures are supported by the protocol in version 3:
+% *
+% * RPCBPROC_NULL() returns ()
+% *    takes nothing, returns nothing
+% *
+% * RPCBPROC_SET(rpcb) returns (bool_t)
+% *    TRUE is success, FALSE is failure.  Registers the tuple
+% *    [prog, vers, address, owner, netid].
+% *    Finds out owner and netid information on its own.
+% *
+% * RPCBPROC_UNSET(rpcb) returns (bool_t)
+% *    TRUE is success, FALSE is failure.  Un-registers tuple
+% *    [prog, vers, netid].  addresses is ignored.
+% *    If netid is NULL, unregister all.
+% *
+% * RPCBPROC_GETADDR(rpcb) returns (string).
+% *    0 is failure.  Otherwise returns the universal address where the
+% *    triple [prog, vers, netid] is registered.  Ignore address and owner.
+% *
+% * RPCBPROC_DUMP() RETURNS (rpcblist_ptr)
+% *    used to dump the entire rpcbind maps
+% *
+% * RPCBPROC_CALLIT(rpcb_rmtcallargs)
+% *    RETURNS (rpcb_rmtcallres);
+% *    Calls the procedure on the remote machine.  If it is not registered,
+% *    this procedure is quiet; i.e. it does not return error information!!!
+% *    This routine only passes null authentication parameters.
+% *    It has no interface to xdr routines for RPCBPROC_CALLIT.
+% *
+% * RPCBPROC_GETTIME() returns (int).
+% *    Gets the remote machines time
+% *
+% * RPCBPROC_UADDR2TADDR(strint) RETURNS (struct netbuf)
+% *    Returns the netbuf address from universal address.
+% *
+% * RPCBPROC_TADDR2UADDR(struct netbuf) RETURNS (string)
+% *    Returns the universal address from netbuf address.
+% *
+% * END OF RPCBIND VERSION 3 PROCEDURES
+% */
+%/*
+% * Except for RPCBPROC_CALLIT, the procedures above are carried over to
+% * rpcbind version 4.  Those below are added or modified for version 4.
+% * NOTE: RPCBPROC_BCAST HAS THE SAME FUNCTIONALITY AND PROCEDURE NUMBER
+% * AS RPCBPROC_CALLIT.
+% *
+% * RPCBPROC_BCAST(rpcb_rmtcallargs)
+% *    RETURNS (rpcb_rmtcallres);
+% *    Calls the procedure on the remote machine.  If it is not registered,
+% *    this procedure IS quiet; i.e. it DOES NOT return error information!!!
+% *    This routine should be used for broadcasting and nothing else.
+% *
+% * RPCBPROC_GETVERSADDR(rpcb) returns (string).
+% *    0 is failure.  Otherwise returns the universal address where the
+% *    triple [prog, vers, netid] is registered.  Ignore address and owner.
+% *    Same as RPCBPROC_GETADDR except that if the given version number
+% *    is not available, the address is not returned.
+% *
+% * RPCBPROC_INDIRECT(rpcb_rmtcallargs)
+% *    RETURNS (rpcb_rmtcallres);
+% *    Calls the procedure on the remote machine.  If it is not registered,
+% *    this procedure is NOT quiet; i.e. it DOES return error information!!!
+% *    as any normal application would expect.
+% *
+% * RPCBPROC_GETADDRLIST(rpcb) returns (rpcb_entry_list_ptr).
+% *    Same as RPCBPROC_GETADDR except that it returns a list of all the
+% *    addresses registered for the combination (prog, vers) (for all
+% *    transports).
+% *
+% * RPCBPROC_GETSTAT(void) returns (rpcb_stat_byvers)
+% *    Returns the statistics about the kind of requests received by rpcbind.
+% */
+%
+%/*
+% * A mapping of (program, version, network ID) to address
+% */
+struct rpcb {
+       rpcprog_t r_prog;               /* program number */
+       rpcvers_t r_vers;               /* version number */
+       string r_netid<>;               /* network id */
+       string r_addr<>;                /* universal address */
+       string r_owner<>;               /* owner of this service */
+};
+#ifdef RPC_HDR
+%
+%typedef rpcb RPCB;
+%
+#endif
+%
+%/*
+% * A list of mappings
+% *
+% * Below are two definitions for the rpcblist structure.  This is done because
+% * xdr_rpcblist() is specified to take a struct rpcblist **, rather than a
+% * struct rpcblist * that rpcgen would produce.  One version of the rpcblist
+% * structure (actually called rp__list) is used with rpcgen, and the other is
+% * defined only in the header file for compatibility with the specified
+% * interface.
+% */
+
+struct rp__list {
+       rpcb rpcb_map;
+       struct rp__list *rpcb_next;
+};
+
+typedef rp__list *rpcblist_ptr;                /* results of RPCBPROC_DUMP */
+
+#ifdef RPC_HDR
+%
+%typedef struct rp__list rpcblist;
+%typedef struct rp__list RPCBLIST;
+%
+%#ifndef __cplusplus
+%struct rpcblist {
+%      RPCB rpcb_map;
+%      struct rpcblist *rpcb_next;
+%};
+%#endif
+%
+%#ifdef __cplusplus
+%extern "C" {
+%#endif
+%#ifdef __STDC__
+%extern  bool_t xdr_rpcblist(XDR *, rpcblist**);
+%#else /* K&R C */
+%bool_t xdr_rpcblist();
+%#endif
+%#ifdef        __cplusplus
+%}
+%#endif
+%
+#endif
+
+%
+%/*
+% * Arguments of remote calls
+% */
+struct rpcb_rmtcallargs {
+       rpcprog_t prog;                 /* program number */
+       rpcvers_t vers;                 /* version number */
+       rpcproc_t proc;                 /* procedure number */
+       opaque args<>;                  /* argument */
+};
+#ifdef RPC_HDR
+%
+%/*
+% * Client-side only representation of rpcb_rmtcallargs structure.
+% *
+% * The routine that XDRs the rpcb_rmtcallargs structure must deal with the
+% * opaque arguments in the "args" structure.  xdr_rpcb_rmtcallargs() needs to
+% * be passed the XDR routine that knows the args' structure.  This routine
+% * doesn't need to go over-the-wire (and it wouldn't make sense anyway) since
+% * the application being called already knows the args structure.  So we use a
+% * different "XDR" structure on the client side, r_rpcb_rmtcallargs, which
+% * includes the args' XDR routine.
+% */
+%struct r_rpcb_rmtcallargs {
+%      rpcprog_t prog;
+%      rpcvers_t vers;
+%      rpcproc_t proc;
+%      struct {
+%              u_int args_len;
+%              char *args_val;
+%      } args;
+%      xdrproc_t       xdr_args;       /* encodes args */
+%};
+%
+#endif /* def RPC_HDR */
+%
+%/*
+% * Results of the remote call
+% */
+struct rpcb_rmtcallres {
+       string addr<>;                  /* remote universal address */
+       opaque results<>;               /* result */
+};
+#ifdef RPC_HDR
+%
+%/*
+% * Client-side only representation of rpcb_rmtcallres structure.
+% */
+%struct r_rpcb_rmtcallres {
+%      char *addr;
+%      struct {
+%              u_int32_t results_len;
+%              char *results_val;
+%      } results;
+%      xdrproc_t       xdr_res;        /* decodes results */
+%};
+#endif RPC_HDR
+%
+%/*
+% * rpcb_entry contains a merged address of a service on a particular
+% * transport, plus associated netconfig information.  A list of rpcb_entrys
+% * is returned by RPCBPROC_GETADDRLIST.  See netconfig.h for values used
+% * in r_nc_* fields.
+% */
+struct rpcb_entry {
+       string          r_maddr<>;      /* merged address of service */
+       string          r_nc_netid<>;   /* netid field */
+       unsigned int    r_nc_semantics; /* semantics of transport */
+       string          r_nc_protofmly<>; /* protocol family */
+       string          r_nc_proto<>;   /* protocol name */
+};
+%
+%/*
+% * A list of addresses supported by a service.
+% */
+struct rpcb_entry_list {
+       rpcb_entry rpcb_entry_map;
+       struct rpcb_entry_list *rpcb_entry_next;
+};
+
+typedef rpcb_entry_list *rpcb_entry_list_ptr;
+
+%
+%/*
+% * rpcbind statistics
+% */
+%



Home | Main Index | Thread Index | Old Index