home *** CD-ROM | disk | FTP | other *** search
/ NeXTSTEP 3.0 / NeXTSTEP3.0.iso / NextDeveloper / Headers / bsd / rpc / pmap_prot.h < prev    next >
Text File  |  1991-06-21  |  2KB  |  72 lines

  1. /*    @(#)pmap_prot.h    1.1 88/03/04 4.0NFSSRC SMI    */
  2.  
  3. /* 
  4.  * Copyright (c) 1988 by Sun Microsystems, Inc.
  5.  * 1.14 88/02/08 SMI    
  6.  */
  7.  
  8.  
  9. /*
  10.  * pmap_prot.h
  11.  * Protocol for the local binder service, or pmap.
  12.  *
  13.  *
  14.  * The following procedures are supported by the protocol:
  15.  *
  16.  * PMAPPROC_NULL() returns ()
  17.  *     takes nothing, returns nothing
  18.  *
  19.  * PMAPPROC_SET(struct pmap) returns (bool_t)
  20.  *     TRUE is success, FALSE is failure.  Registers the tuple
  21.  *    [prog, vers, prot, port].
  22.  *
  23.  * PMAPPROC_UNSET(struct pmap) returns (bool_t)
  24.  *    TRUE is success, FALSE is failure.  Un-registers pair
  25.  *    [prog, vers].  prot and port are ignored.
  26.  *
  27.  * PMAPPROC_GETPORT(struct pmap) returns (long unsigned).
  28.  *    0 is failure.  Otherwise returns the port number where the pair
  29.  *    [prog, vers] is registered.  It may lie!
  30.  *
  31.  * PMAPPROC_DUMP() RETURNS (struct pmaplist *)
  32.  *
  33.  * PMAPPROC_CALLIT(unsigned, unsigned, unsigned, string<>)
  34.  *     RETURNS (port, string<>);
  35.  * usage: encapsulatedresults = PMAPPROC_CALLIT(proW)ers, proc, encapsulatedargs);
  36.  *     Calls the procedure on the local machine.  If it is not registered,
  37.  *    this procedure is quite; ie it does not return error information!!!
  38.  *    This procedure only is supported on rpc/udp and calls via
  39.  *    rpc/udp.  This routine only passes null authentication parameters.
  40.  *    This file has no interface to xdr routines for PMAPPROC_CALLIT.
  41.  *
  42.  * The service supports remote procedure calls on udp/ip or tcp/ip socket 111.
  43.  */
  44.  
  45. #define PMAPPORT        ((u_short)111)
  46. #define PMAPPROG        ((u_long)100000)
  47. #define PMAPVERS        ((u_long)2)
  48. #define PMAPVERS_PROTO        ((u_long)2)
  49. #define PMAPVERS_ORIG        ((u_long)1)
  50. #define PMAPPROC_NULL        ((u_long)0)
  51. #define PMAPPROC_SET        ((u_long)1)
  52. #define PMAPPROC_UNSET        ((u_long)2)
  53. #define PMAPPROC_GETPORT    ((u_long)3)
  54. #define PMAPPROC_DUMP        ((u_long)4)
  55. #define PMAPPROC_CALLIT        ((u_long)5)
  56.  
  57. struct pmap {
  58.     long unsigned pm_prog;
  59.     long unsigned pm_vers;
  60.     long unsigned pm_prot;
  61.     long unsigned pm_port;
  62. };
  63.  
  64. extern bool_t xdr_pmap();
  65.  
  66. struct pmaplist {
  67.     struct pmap    pml_map;
  68.     struct pmaplist *pml_next;
  69. };
  70.  
  71. extern bool_t xdr_pmaplist();
  72.