home *** CD-ROM | disk | FTP | other *** search
/ OS/2 Shareware BBS: 10 Tools / 10-Tools.zip / tcp30tkt.zip / PGMG1.ZIP / INCLUDE / RPC / PMAP_PRO.H < prev    next >
Text File  |  1995-12-04  |  5KB  |  119 lines

  1. /********************************************************copyrite.xmc***/
  2. /*                                                                     */
  3. /*   Licensed Materials - Property of IBM                              */
  4. /*                                                                     */
  5. /*   This module is "Restricted Materials of IBM":                     */
  6. /*      Program Number:   5798RXW                                      */
  7. /*      Program Name:     IBM TCP/IP Version 1.2 for OS/2              */
  8. /*   (C) Copyright IBM Corporation. 1990, 1991.                        */
  9. /*                                                                     */
  10. /*   See IBM Copyright Instructions.                                   */
  11. /*                                                                     */
  12. /********************************************************copyrite.xmc***/
  13. #ifndef __PMAP_PRO_32H
  14. #define __PMAP_PRO_32H
  15.  
  16. /*
  17.  * Sun RPC is a product of Sun Microsystems, Inc. and is provided for
  18.  * unrestricted use provided that this legend is included on all tape
  19.  * media and as a part of the software program in whole or part.  Users
  20.  * may copy or modify Sun RPC without charge, but are not authorized
  21.  * to license or distribute it to anyone else except as part of a product or
  22.  * program developed by the user.
  23.  *
  24.  * SUN RPC IS PROVIDED AS IS WITH NO WARRANTIES OF ANY KIND INCLUDING THE
  25.  * WARRANTIES OF DESIGN, MERCHANTIBILITY AND FITNESS FOR A PARTICULAR
  26.  * PURPOSE, OR ARISING FROM A COURSE OF DEALING, USAGE OR TRADE PRACTICE.
  27.  *
  28.  * Sun RPC is provided with no support and without any obligation on the
  29.  * part of Sun Microsystems, Inc. to assist in its use, correction,
  30.  * modification or enhancement.
  31.  *
  32.  * SUN MICROSYSTEMS, INC. SHALL HAVE NO LIABILITY WITH RESPECT TO THE
  33.  * INFRINGEMENT OF COPYRIGHTS, TRADE SECRETS OR ANY PATENTS BY SUN RPC
  34.  * OR ANY PART THEREOF.
  35.  *
  36.  * In no event will Sun Microsystems, Inc. be liable for any lost revenue
  37.  * or profits or other special, indirect and consequential damages, even if
  38.  * Sun has been advised of the possibility of such damages.
  39.  *
  40.  * Sun Microsystems, Inc.
  41.  * 2550 Garcia Avenue
  42.  * Mountain View, California  94043
  43.  */
  44. /*      @(#)pmap_prot.h 1.1 86/02/03 SMI        */
  45.  
  46. /*
  47.  * pmap_prot.h
  48.  * Protocol for the local binder service, or pmap.
  49.  *
  50.  * Copyright (C) 1984, Sun Microsystems, Inc.
  51.  *
  52.  * The following procedures are supported by the protocol:
  53.  *
  54.  * PMAPPROC_NULL() returns ()
  55.  *      takes nothing, returns nothing
  56.  *
  57.  * PMAPPROC_SET(struct pmap) returns (bool_t)
  58.  *      TRUE is success, FALSE is failure.  Registers the tuple
  59.  *      [prog, vers, prot, port].
  60.  *
  61.  * PMAPPROC_UNSET(struct pmap) returns (bool_t)
  62.  *      TRUE is success, FALSE is failure.  Un-registers pair
  63.  *      [prog, vers].  prot and port are ignored.
  64.  *
  65.  * PMAPPROC_GETPORT(struct pmap) returns (long unsigned).
  66.  *      0 is failure.  Otherwise returns the port number where the pair
  67.  *      [prog, vers] is registered.  It may lie!
  68.  *
  69.  * PMAPPROC_DUMP() RETURNS (struct pmaplist *)
  70.  *
  71.  * PMAPPROC_CALLIT(unsigned, unsigned, unsigned, string<>)
  72.  *      RETURNS (port, string<>);
  73.  * usage: encapsulatedresults = PMAPPROC_CALLIT(prog, vers, proc, encapsulatedargs);
  74.  *      Calls the procedure on the local machine.  If it is not registered,
  75.  *      this procedure is quite; ie it does not return error information!!!
  76.  *      This procedure only is supported on rpc/udp and calls via
  77.  *      rpc/udp.  This routine only passes null authentication parameters.
  78.  *      This file has no interface to xdr routines for PMAPPROC_CALLIT.
  79.  *
  80.  * The service supports remote procedure calls on udp/ip or tcp/ip socket 111.
  81.  */
  82.  
  83. #define PMAPPORT                ((u_short)111)
  84. #define PMAPPROG                ((u_long)100000L)
  85. #define PMAPVERS                ((u_long)2)
  86. #define PMAPVERS_PROTO          ((u_long)2)
  87. #define PMAPVERS_ORIG           ((u_long)1)
  88. #define PMAPPROC_NULL           ((u_long)0)
  89. #define PMAPPROC_SET            ((u_long)1)
  90. #define PMAPPROC_UNSET          ((u_long)2)
  91. #define PMAPPROC_GETPORT        ((u_long)3)
  92. #define PMAPPROC_DUMP           ((u_long)4)
  93. #define PMAPPROC_CALLIT         ((u_long)5)
  94.  
  95. struct pmap {
  96.         long unsigned pm_prog;
  97.         long unsigned pm_vers;
  98.         long unsigned pm_prot;
  99.         long unsigned pm_port;
  100. };
  101.  
  102.  
  103. struct pmaplist {
  104.         struct pmap     pml_map;
  105.         struct pmaplist *pml_next;
  106. };
  107.  
  108. #ifdef XDRNOPROTO
  109. extern bool_t xdr_pmap();
  110. extern bool_t xdr_pmaplist();
  111. #else
  112. extern bool_t xdr_pmap(XDR *, struct pmap *);
  113. extern bool_t xdr_pmaplist(XDR *, struct pmaplist **);
  114. #endif
  115.  
  116. extern void get_myaddress( struct sockaddr_in *);
  117.  
  118. #endif /* __PMAP_PRO_32H */
  119.