pmap_clnt.h revision 1.1
11.1Sderaadt/* @(#)pmap_clnt.h 2.1 88/07/29 4.0 RPCSRC; from 1.11 88/02/08 SMI */ 21.1Sderaadt/* 31.1Sderaadt * Sun RPC is a product of Sun Microsystems, Inc. and is provided for 41.1Sderaadt * unrestricted use provided that this legend is included on all tape 51.1Sderaadt * media and as a part of the software program in whole or part. Users 61.1Sderaadt * may copy or modify Sun RPC without charge, but are not authorized 71.1Sderaadt * to license or distribute it to anyone else except as part of a product or 81.1Sderaadt * program developed by the user. 91.1Sderaadt * 101.1Sderaadt * SUN RPC IS PROVIDED AS IS WITH NO WARRANTIES OF ANY KIND INCLUDING THE 111.1Sderaadt * WARRANTIES OF DESIGN, MERCHANTIBILITY AND FITNESS FOR A PARTICULAR 121.1Sderaadt * PURPOSE, OR ARISING FROM A COURSE OF DEALING, USAGE OR TRADE PRACTICE. 131.1Sderaadt * 141.1Sderaadt * Sun RPC is provided with no support and without any obligation on the 151.1Sderaadt * part of Sun Microsystems, Inc. to assist in its use, correction, 161.1Sderaadt * modification or enhancement. 171.1Sderaadt * 181.1Sderaadt * SUN MICROSYSTEMS, INC. SHALL HAVE NO LIABILITY WITH RESPECT TO THE 191.1Sderaadt * INFRINGEMENT OF COPYRIGHTS, TRADE SECRETS OR ANY PATENTS BY SUN RPC 201.1Sderaadt * OR ANY PART THEREOF. 211.1Sderaadt * 221.1Sderaadt * In no event will Sun Microsystems, Inc. be liable for any lost revenue 231.1Sderaadt * or profits or other special, indirect and consequential damages, even if 241.1Sderaadt * Sun has been advised of the possibility of such damages. 251.1Sderaadt * 261.1Sderaadt * Sun Microsystems, Inc. 271.1Sderaadt * 2550 Garcia Avenue 281.1Sderaadt * Mountain View, California 94043 291.1Sderaadt */ 301.1Sderaadt 311.1Sderaadt/* 321.1Sderaadt * pmap_clnt.h 331.1Sderaadt * Supplies C routines to get to portmap services. 341.1Sderaadt * 351.1Sderaadt * Copyright (C) 1984, Sun Microsystems, Inc. 361.1Sderaadt */ 371.1Sderaadt 381.1Sderaadt/* 391.1Sderaadt * Usage: 401.1Sderaadt * success = pmap_set(program, version, protocol, port); 411.1Sderaadt * success = pmap_unset(program, version); 421.1Sderaadt * port = pmap_getport(address, program, version, protocol); 431.1Sderaadt * head = pmap_getmaps(address); 441.1Sderaadt * clnt_stat = pmap_rmtcall(address, program, version, procedure, 451.1Sderaadt * xdrargs, argsp, xdrres, resp, tout, port_ptr) 461.1Sderaadt * (works for udp only.) 471.1Sderaadt * clnt_stat = clnt_broadcast(program, version, procedure, 481.1Sderaadt * xdrargs, argsp, xdrres, resp, eachresult) 491.1Sderaadt * (like pmap_rmtcall, except the call is broadcasted to all 501.1Sderaadt * locally connected nets. For each valid response received, 511.1Sderaadt * the procedure eachresult is called. Its form is: 521.1Sderaadt * done = eachresult(resp, raddr) 531.1Sderaadt * bool_t done; 541.1Sderaadt * caddr_t resp; 551.1Sderaadt * struct sockaddr_in raddr; 561.1Sderaadt * where resp points to the results of the call and raddr is the 571.1Sderaadt * address if the responder to the broadcast. 581.1Sderaadt */ 591.1Sderaadt 601.1Sderaadtextern bool_t pmap_set(); 611.1Sderaadtextern bool_t pmap_unset(); 621.1Sderaadtextern struct pmaplist *pmap_getmaps(); 631.1Sderaadtenum clnt_stat pmap_rmtcall(); 641.1Sderaadtenum clnt_stat clnt_broadcast(); 651.1Sderaadtextern u_short pmap_getport(); 66