pmap_clnt.h revision 1.6
11.6Sperry/* $NetBSD: pmap_clnt.h,v 1.6 1998/02/10 00:44:32 perry Exp $ */ 21.4Scgd 31.1Sderaadt/* 41.1Sderaadt * Sun RPC is a product of Sun Microsystems, Inc. and is provided for 51.1Sderaadt * unrestricted use provided that this legend is included on all tape 61.1Sderaadt * media and as a part of the software program in whole or part. Users 71.1Sderaadt * may copy or modify Sun RPC without charge, but are not authorized 81.1Sderaadt * to license or distribute it to anyone else except as part of a product or 91.1Sderaadt * program developed by the user. 101.1Sderaadt * 111.1Sderaadt * SUN RPC IS PROVIDED AS IS WITH NO WARRANTIES OF ANY KIND INCLUDING THE 121.1Sderaadt * WARRANTIES OF DESIGN, MERCHANTIBILITY AND FITNESS FOR A PARTICULAR 131.1Sderaadt * PURPOSE, OR ARISING FROM A COURSE OF DEALING, USAGE OR TRADE PRACTICE. 141.1Sderaadt * 151.1Sderaadt * Sun RPC is provided with no support and without any obligation on the 161.1Sderaadt * part of Sun Microsystems, Inc. to assist in its use, correction, 171.1Sderaadt * modification or enhancement. 181.1Sderaadt * 191.1Sderaadt * SUN MICROSYSTEMS, INC. SHALL HAVE NO LIABILITY WITH RESPECT TO THE 201.1Sderaadt * INFRINGEMENT OF COPYRIGHTS, TRADE SECRETS OR ANY PATENTS BY SUN RPC 211.1Sderaadt * OR ANY PART THEREOF. 221.1Sderaadt * 231.1Sderaadt * In no event will Sun Microsystems, Inc. be liable for any lost revenue 241.1Sderaadt * or profits or other special, indirect and consequential damages, even if 251.1Sderaadt * Sun has been advised of the possibility of such damages. 261.1Sderaadt * 271.1Sderaadt * Sun Microsystems, Inc. 281.1Sderaadt * 2550 Garcia Avenue 291.1Sderaadt * Mountain View, California 94043 301.3Smycroft * 311.3Smycroft * from: @(#)pmap_clnt.h 1.11 88/02/08 SMI 321.4Scgd * @(#)pmap_clnt.h 2.1 88/07/29 4.0 RPCSRC 331.1Sderaadt */ 341.1Sderaadt 351.1Sderaadt/* 361.1Sderaadt * pmap_clnt.h 371.1Sderaadt * Supplies C routines to get to portmap services. 381.1Sderaadt * 391.1Sderaadt * Copyright (C) 1984, Sun Microsystems, Inc. 401.1Sderaadt */ 411.1Sderaadt 421.1Sderaadt/* 431.1Sderaadt * Usage: 441.1Sderaadt * success = pmap_set(program, version, protocol, port); 451.1Sderaadt * success = pmap_unset(program, version); 461.1Sderaadt * port = pmap_getport(address, program, version, protocol); 471.1Sderaadt * head = pmap_getmaps(address); 481.1Sderaadt * clnt_stat = pmap_rmtcall(address, program, version, procedure, 491.1Sderaadt * xdrargs, argsp, xdrres, resp, tout, port_ptr) 501.1Sderaadt * (works for udp only.) 511.1Sderaadt * clnt_stat = clnt_broadcast(program, version, procedure, 521.1Sderaadt * xdrargs, argsp, xdrres, resp, eachresult) 531.1Sderaadt * (like pmap_rmtcall, except the call is broadcasted to all 541.1Sderaadt * locally connected nets. For each valid response received, 551.1Sderaadt * the procedure eachresult is called. Its form is: 561.1Sderaadt * done = eachresult(resp, raddr) 571.1Sderaadt * bool_t done; 581.1Sderaadt * caddr_t resp; 591.1Sderaadt * struct sockaddr_in raddr; 601.1Sderaadt * where resp points to the results of the call and raddr is the 611.1Sderaadt * address if the responder to the broadcast. 621.1Sderaadt */ 631.1Sderaadt 641.6Sperry#ifndef _RPC_PMAP_CLNT_H_ 651.6Sperry#define _RPC_PMAP_CLNT_H_ 661.2Sbrezak#include <sys/cdefs.h> 671.2Sbrezak 681.2Sbrezak__BEGIN_DECLS 691.2Sbrezakextern bool_t pmap_set __P((u_long, u_long, int, int)); 701.2Sbrezakextern bool_t pmap_unset __P((u_long, u_long)); 711.2Sbrezakextern struct pmaplist *pmap_getmaps __P((struct sockaddr_in *)); 721.2Sbrezakextern enum clnt_stat pmap_rmtcall __P((struct sockaddr_in *, 731.2Sbrezak u_long, u_long, u_long, 741.2Sbrezak xdrproc_t, caddr_t, 751.2Sbrezak xdrproc_t, caddr_t, 761.2Sbrezak struct timeval, u_long *)); 771.2Sbrezakextern enum clnt_stat clnt_broadcast __P((u_long, u_long, u_long, 781.2Sbrezak xdrproc_t, char *, 791.2Sbrezak xdrproc_t, char *, 801.5Scgd bool_t (*) __P((caddr_t, 811.5Scgd struct sockaddr_in *)))); 821.2Sbrezakextern u_short pmap_getport __P((struct sockaddr_in *, 831.2Sbrezak u_long, u_long, u_int)); 841.2Sbrezak__END_DECLS 851.2Sbrezak 861.6Sperry#endif /* !_RPC_PMAP_CLNT_H_ */ 87