home *** CD-ROM | disk | FTP | other *** search
/ Liren Large Software Subsidy 15 / 15.iso / s / s053 / 8.ddi / usr / include / rpc / rpcb_prot.h < prev    next >
Encoding:
C/C++ Source or Header  |  1990-12-08  |  4.0 KB  |  146 lines

  1. /*    Copyright (c) 1990 UNIX System Laboratories, Inc.    */
  2. /*    Copyright (c) 1984, 1986, 1987, 1988, 1989, 1990 AT&T    */
  3. /*      All Rights Reserved      */
  4.  
  5. /*    THIS IS UNPUBLISHED PROPRIETARY SOURCE CODE OF         */
  6. /*    UNIX System Laboratories, Inc.                         */
  7. /*    The copyright notice above does not evidence any       */
  8. /*    actual or intended publication of such source code.    */
  9.  
  10. #ident    "@(#)/usr/include/rpc/rpcb_prot.h.sl 1.1 4.0 12/08/90 31111 AT&T-USL"
  11.  
  12. /*+++++++++++++++++++++++++++++++++++++++++++++++++++++++++
  13. *    PROPRIETARY NOTICE (Combined)
  14. *
  15. * This source code is unpublished proprietary information
  16. * constituting, or derived under license from AT&T's UNIX(r) System V.
  17. * In addition, portions of such source code were derived from Berkeley
  18. * 4.3 BSD under license from the Regents of the University of
  19. * California.
  20. *
  21. *
  22. *
  23. *    Copyright Notice 
  24. *
  25. * Notice of copyright on this source code product does not indicate 
  26. *  publication.
  27. *
  28. *    (c) 1986,1987,1988,1989  Sun Microsystems, Inc
  29. *    (c) 1983,1984,1985,1986,1987,1988,1989  AT&T.
  30. *          All rights reserved.
  31. */ 
  32. /*
  33.  * rpcb_prot.h
  34.  * Protocol for the local rpcbinder service
  35.  */
  36.  
  37. /*
  38.  * The following procedures are supported by the protocol:
  39.  *
  40.  * RPCBPROC_NULL() returns ()
  41.  *     takes nothing, returns nothing
  42.  *
  43.  * RPCBPROC_SET(RPCB) returns (bool_t)
  44.  *     TRUE is success, FALSE is failure.  Registers the tuple
  45.  *    [prog, vers, netid] with address
  46.  *
  47.  * RPCBPROC_UNSET(RPCB) returns (bool_t)
  48.  *    TRUE is success, FALSE is failure.  Un-registers tuple
  49.  *    [prog, vers, netid].  address is ignored.
  50.  *
  51.  * RPCBPROC_GETADDR(RPCB) returns (Universal address).
  52.  *    0 is failure.  Otherwise returns the universal address where the pair
  53.  *    [prog, vers, netid] is registered.
  54.  *
  55.  * RPCBPROC_DUMP() RETURNS (RPCBLIST *)
  56.  *    used for dumping the entire rpcbind maps
  57.  *
  58.  * RPCBPROC_CALLIT(unsigned, unsigned, unsigned, string<>)
  59.  *     RETURNS (address, string<>);
  60.  * usage: encapsulatedresults = RPCBPROC_CALLIT(prog, vers, proc, encapsulatedargs);
  61.  *     Calls the procedure on the local machine.  If it is not registered,
  62.  *    this procedure is quiet; i.e. it does not return error information!!!
  63.  *    This routine only passes null authentication parameters.
  64.  *    This file has no interface to xdr routines for RPCBPROC_CALLIT.
  65.  *
  66.  * RPCBPROC_GETTIME() returns (bool_t).
  67.  *    TRUE is success, FALSE is failure.  Gets the remote machines time
  68.  *
  69.  */
  70.  
  71. #ifndef _RPC_RPCB_PROT_H
  72. #define _RPC_RPCB_PROT_H
  73.  
  74. #include <rpc/types.h>
  75.  
  76. #define RPCBPROG        ((u_long)100000)
  77. #define RPCBVERS        ((u_long)3)
  78.  
  79. /*
  80.  * All the defined procedures on it
  81.  */
  82. #define RPCBPROC_NULL        ((u_long)0)
  83. #define RPCBPROC_SET        ((u_long)1)
  84. #define RPCBPROC_UNSET        ((u_long)2)
  85. #define RPCBPROC_GETADDR    ((u_long)3)
  86. #define RPCBPROC_DUMP        ((u_long)4)
  87. #define RPCBPROC_CALLIT        ((u_long)5)
  88. #define RPCBPROC_GETTIME    ((u_long)6)
  89. #define RPCBPROC_UADDR2TADDR    ((u_long)7)
  90. #define RPCBPROC_TADDR2UADDR    ((u_long)8)
  91.  
  92. /*
  93.  * All rpcbind stuff (vers 3)
  94.  */
  95.  
  96. /*
  97.  * A mapping of (program, version, network ID) to address
  98.  */
  99. struct rpcb {
  100.     u_long r_prog;            /* program number */
  101.     u_long r_vers;            /* version number */
  102.     char *r_netid;            /* network id */
  103.     char *r_addr;            /* universal address */
  104.     char *r_owner;            /* owner of the mapping */
  105. };
  106. typedef struct rpcb RPCB;
  107. extern bool_t xdr_rpcb();
  108.  
  109. extern bool_t xdr_netbuf();
  110.  
  111. /*
  112.  * A list of mappings
  113.  */
  114. struct rpcblist {
  115.     RPCB rpcb_map;
  116.     struct rpcblist *rpcb_next;
  117. };
  118. typedef struct rpcblist RPCBLIST;
  119. extern bool_t xdr_rpcblist();
  120.  
  121. /*
  122.  * Remote calls arguments
  123.  */
  124. struct rpcb_rmtcallargs {
  125.     u_long prog;            /* program number */
  126.     u_long vers;            /* version number */
  127.     u_long proc;            /* procedure number */
  128.     u_long arglen;            /* arg len */
  129.     caddr_t args_ptr;        /* argument */
  130.     xdrproc_t xdr_args;        /* XDR routine for argument */
  131. };
  132. extern bool_t xdr_rpcb_rmtcallargs();
  133.  
  134. /*
  135.  * Remote calls results
  136.  */
  137. struct rpcb_rmtcallres {
  138.     char *addr_ptr;            /* remote universal address */
  139.     u_long resultslen;        /* results length */
  140.     caddr_t results_ptr;        /* results */
  141.     xdrproc_t xdr_results;        /* XDR routine for result */
  142. };
  143. extern bool_t xdr_rpcb_rmtcallres();
  144.  
  145. #endif /*!_RPC_RPCB_PROT_H*/
  146.