home *** CD-ROM | disk | FTP | other *** search
/ OS/2 Shareware BBS: 10 Tools / 10-Tools.zip / tcp30tkt.zip / PGMG1.ZIP / INCLUDE / RPC / PMAP_CLN.H < prev    next >
Text File  |  1995-12-04  |  4KB  |  88 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_CLN_32H
  14. #define __PMAP_CLN_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_clnt.h 1.1 86/02/03 SMI        */
  45.  
  46. /*
  47.  * portmap_clnt.h
  48.  * Supplies C routines to get to portmap services.
  49.  *
  50.  * Copyright (C) 1984, Sun Microsystems, Inc.
  51.  */
  52.  
  53. /*
  54.  * Usage:
  55.  *      success = pmap_set(program, version, protocol, port);
  56.  *      success = pmap_unset(program, version);
  57.  *      port = pmap_getport(address, program, version, protocol);
  58.  *      head = pmap_getmaps(address);
  59.  *      clnt_stat = pmap_rmtcall(address, program, version, procedure,
  60.  *              xdrargs, argsp, xdrres, resp, tout, port_ptr)
  61.  *              (works for udp only.)
  62.  *      clnt_stat = clnt_broadcast(program, version, procedure,
  63.  *              xdrargs, argsp, xdrres, resp, eachresult)
  64.  *              (like pmap_rmtcall, except the call is broadcasted to all
  65.  *              locally connected nets.  For each valid response received,
  66.  *              the procedure eachresult is called.  Its form is:
  67.  *      done = eachresult(resp, raddr)
  68.  *              bool_t done;
  69.  *              caddr_t resp;
  70.  *              struct sockaddr_in raddr;
  71.  *              where resp points to the results of the call and raddr is the
  72.  *              address if the responder to the broadcast.
  73.  */
  74.  
  75. typedef bool_t (*resultproc_t)();
  76.  
  77. extern bool_t           pmap_set(u_long, u_long, u_long, u_short);
  78. extern bool_t           pmap_unset(u_long,u_long);
  79. extern u_short          pmap_getport(struct sockaddr_in *, u_long, u_long, u_int);   /**** OJAN 11/15/95 ****/
  80. extern struct pmaplist  *pmap_getmaps(struct sockaddr_in *);
  81. enum clnt_stat          pmap_rmtcall(struct sockaddr_in *, u_long, u_long, u_long,
  82.                                      xdrproc_t, caddr_t, xdrproc_t, caddr_t,
  83.                                      struct timeval, u_long *);
  84. enum clnt_stat          clnt_broadcast(u_long, u_long, u_long, xdrproc_t, caddr_t,
  85.                                        xdrproc_t, caddr_t, resultproc_t);
  86.  
  87. #endif /* __PMAP_CLN_32H */
  88.