11.13Sdholland/* $NetBSD: pmap_clnt.h,v 1.13 2016/01/23 02:34:09 dholland 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.12Sdhollandextern bool_t pmap_set(unsigned long, unsigned long, int, int); 701.12Sdhollandextern bool_t pmap_unset(unsigned long, unsigned long); 711.10Sperryextern struct pmaplist *pmap_getmaps(struct sockaddr_in *); 721.11Schristos#ifndef __LIBC12_SOURCE__ 731.10Sperryextern enum clnt_stat pmap_rmtcall(struct sockaddr_in *, 741.12Sdholland unsigned long, unsigned long, 751.12Sdholland unsigned long, 761.10Sperry xdrproc_t, caddr_t, 771.10Sperry xdrproc_t, caddr_t, 781.12Sdholland struct timeval, unsigned long *) 791.11Schristos __RENAME(__pmap_rmtcall50); 801.11Schristos#endif 811.12Sdhollandextern enum clnt_stat clnt_broadcast(unsigned long, unsigned long, 821.12Sdholland unsigned long, 831.10Sperry xdrproc_t, char *, 841.10Sperry xdrproc_t, char *, 851.10Sperry resultproc_t); 861.13Sdhollandextern unsigned short pmap_getport(struct sockaddr_in *, 871.12Sdholland unsigned long, unsigned long, 881.13Sdholland unsigned int); 891.2Sbrezak__END_DECLS 901.2Sbrezak 911.6Sperry#endif /* !_RPC_PMAP_CLNT_H_ */ 92