174462Salfred/* $NetBSD: pmap_prot.h,v 1.8 2000/06/02 22:57:55 fvdl Exp $ */ 274462Salfred 3261046Smav/*- 4261046Smav * Copyright (c) 2009, Sun Microsystems, Inc. 5261046Smav * All rights reserved. 68858Srgrimes * 7261046Smav * Redistribution and use in source and binary forms, with or without 8261046Smav * modification, are permitted provided that the following conditions are met: 9261046Smav * - Redistributions of source code must retain the above copyright notice, 10261046Smav * this list of conditions and the following disclaimer. 11261046Smav * - Redistributions in binary form must reproduce the above copyright notice, 12261046Smav * this list of conditions and the following disclaimer in the documentation 13261046Smav * and/or other materials provided with the distribution. 14261046Smav * - Neither the name of Sun Microsystems, Inc. nor the names of its 15261046Smav * contributors may be used to endorse or promote products derived 16261046Smav * from this software without specific prior written permission. 178858Srgrimes * 18261046Smav * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" 19261046Smav * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 20261046Smav * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 21261046Smav * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE 22261046Smav * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR 23261046Smav * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF 24261046Smav * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS 25261046Smav * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN 26261046Smav * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) 27261046Smav * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE 28261046Smav * POSSIBILITY OF SUCH DAMAGE. 298858Srgrimes * 3074462Salfred * from: @(#)pmap_prot.h 1.14 88/02/08 SMI 311903Swollman * from: @(#)pmap_prot.h 2.1 88/07/29 4.0 RPCSRC 3250473Speter * $FreeBSD$ 331839Swollman */ 341839Swollman 351839Swollman/* 361839Swollman * pmap_prot.h 371839Swollman * Protocol for the local binder service, or pmap. 381839Swollman * 391839Swollman * Copyright (C) 1984, Sun Microsystems, Inc. 401839Swollman * 411839Swollman * The following procedures are supported by the protocol: 421839Swollman * 431839Swollman * PMAPPROC_NULL() returns () 441839Swollman * takes nothing, returns nothing 451839Swollman * 461839Swollman * PMAPPROC_SET(struct pmap) returns (bool_t) 471839Swollman * TRUE is success, FALSE is failure. Registers the tuple 481839Swollman * [prog, vers, prot, port]. 491839Swollman * 501839Swollman * PMAPPROC_UNSET(struct pmap) returns (bool_t) 511839Swollman * TRUE is success, FALSE is failure. Un-registers pair 521839Swollman * [prog, vers]. prot and port are ignored. 531839Swollman * 541839Swollman * PMAPPROC_GETPORT(struct pmap) returns (long unsigned). 551839Swollman * 0 is failure. Otherwise returns the port number where the pair 561839Swollman * [prog, vers] is registered. It may lie! 571839Swollman * 581839Swollman * PMAPPROC_DUMP() RETURNS (struct pmaplist *) 591839Swollman * 601839Swollman * PMAPPROC_CALLIT(unsigned, unsigned, unsigned, string<>) 611839Swollman * RETURNS (port, string<>); 621839Swollman * usage: encapsulatedresults = PMAPPROC_CALLIT(prog, vers, proc, encapsulatedargs); 631839Swollman * Calls the procedure on the local machine. If it is not registered, 641839Swollman * this procedure is quite; ie it does not return error information!!! 651839Swollman * This procedure only is supported on rpc/udp and calls via 661839Swollman * rpc/udp. This routine only passes null authentication parameters. 671839Swollman * This file has no interface to xdr routines for PMAPPROC_CALLIT. 681839Swollman * 691839Swollman * The service supports remote procedure calls on udp/ip or tcp/ip socket 111. 701839Swollman */ 711839Swollman 7274462Salfred#ifndef _RPC_PMAP_PROT_H 7374462Salfred#define _RPC_PMAP_PROT_H 741903Swollman#include <sys/cdefs.h> 751903Swollman 761839Swollman#define PMAPPORT ((u_short)111) 771839Swollman#define PMAPPROG ((u_long)100000) 781839Swollman#define PMAPVERS ((u_long)2) 791839Swollman#define PMAPVERS_PROTO ((u_long)2) 801839Swollman#define PMAPVERS_ORIG ((u_long)1) 811839Swollman#define PMAPPROC_NULL ((u_long)0) 821839Swollman#define PMAPPROC_SET ((u_long)1) 831839Swollman#define PMAPPROC_UNSET ((u_long)2) 841839Swollman#define PMAPPROC_GETPORT ((u_long)3) 851839Swollman#define PMAPPROC_DUMP ((u_long)4) 861839Swollman#define PMAPPROC_CALLIT ((u_long)5) 871839Swollman 881839Swollmanstruct pmap { 891839Swollman long unsigned pm_prog; 901839Swollman long unsigned pm_vers; 911839Swollman long unsigned pm_prot; 921839Swollman long unsigned pm_port; 931839Swollman}; 941839Swollman 951839Swollmanstruct pmaplist { 961839Swollman struct pmap pml_map; 971839Swollman struct pmaplist *pml_next; 981839Swollman}; 991839Swollman 1001903Swollman__BEGIN_DECLS 10193032Simpextern bool_t xdr_pmap(XDR *, struct pmap *); 10293032Simpextern bool_t xdr_pmaplist(XDR *, struct pmaplist **); 10393032Simpextern bool_t xdr_pmaplist_ptr(XDR *, struct pmaplist *); 1041903Swollman__END_DECLS 1051903Swollman 10674462Salfred#endif /* !_RPC_PMAP_PROT_H */ 107