/* IBM_PROLOG_BEGIN_TAG */ /* This is an automatically generated prolog. */ /* */ /* onc720 src/oncplus/usr/include/tirpc/rpc/pmap_prot.h 1.3 */ /* */ /* Licensed Materials - Property of IBM */ /* */ /* COPYRIGHT International Business Machines Corp. 1996,1999 */ /* All Rights Reserved */ /* */ /* US Government Users Restricted Rights - Use, duplication or */ /* disclosure restricted by GSA ADP Schedule Contract with IBM Corp. */ /* */ /* IBM_PROLOG_END_TAG */ /* * Please do not edit this file. * It was generated using rpcgen. */ #ifndef _PMAP_PROT_H_RPCGEN #define _PMAP_PROT_H_RPCGEN /* * If this is not the ONC+ code then we need to make sure that libc can build * to get the ONC+ pmap_prot,h TIRPC must be defined */ #ifndef _AIX_TIRPC /* static char sccsid[] = "@(#)68 1.6 src/bos/usr/include/rpc/pmap_prot.h, libcrpc, bos420 10/25/93 20:47:39"; */ /* * COMPONENT_NAME: LIBCRPC * * FUNCTIONS: * * ORIGINS: 24 * * * Copyright (c) 1990 by Sun Microsystems, Inc. * 1.14 88/02/08 SMI */ /* @(#)pmap_prot.h 1.2 90/07/17 4.1NFSSRC SMI */ /* * pmap_prot.h * Protocol for the local binder service, or pmap. * * * The following procedures are supported by the protocol: * * PMAPPROC_NULL() returns () * takes nothing, returns nothing * * PMAPPROC_SET(struct pmap) returns (bool_t) * TRUE is success, FALSE is failure. Registers the tuple * [prog, vers, prot, port]. * * PMAPPROC_UNSET(struct pmap) returns (bool_t) * TRUE is success, FALSE is failure. Un-registers pair * [prog, vers]. prot and port are ignored. * * PMAPPROC_GETPORT(struct pmap) returns (long unsigned). * 0 is failure. Otherwise returns the port number where the pair * [prog, vers] is registered. It may lie! * * PMAPPROC_DUMP() RETURNS (struct pmaplist *) * * PMAPPROC_CALLIT(unsigned, unsigned, unsigned, string<>) * RETURNS (port, string<>); * usage: encapsulatedresults = PMAPPROC_CALLIT(prog, vers, proc, encapsulatedargs); * Calls the procedure on the local machine. If it is not registered, * this procedure is quite; ie it does not return error information!!! * This procedure only is supported on rpc/udp and calls via * rpc/udp. This routine only passes null authentication parameters. * This file has no interface to xdr routines for PMAPPROC_CALLIT. * * The service supports remote procedure calls on udp/ip or tcp/ip socket 111. */ #ifndef _RPC_PMAP_PROT_H #define _RPC_PMAP_PROT_H #define PMAPPORT ((u_short)111) #define PMAPPROG ((u_long)100000) #define PMAPVERS ((u_long)2) #define PMAPVERS_PROTO ((u_long)2) #define PMAPVERS_ORIG ((u_long)1) #define PMAPPROC_NULL ((u_long)0) #define PMAPPROC_SET ((u_long)1) #define PMAPPROC_UNSET ((u_long)2) #define PMAPPROC_GETPORT ((u_long)3) #define PMAPPROC_DUMP ((u_long)4) #define PMAPPROC_CALLIT ((u_long)5) struct pmap { long unsigned pm_prog; long unsigned pm_vers; long unsigned pm_prot; long unsigned pm_port; }; #include extern bool_t xdr_pmap(XDR *, struct pmap *); struct pmaplist { struct pmap pml_map; struct pmaplist *pml_next; }; extern bool_t xdr_pmaplist(XDR *, struct pmaplist **); #endif /*!_RPC_PMAP_PROT_H*/ #else /* * ---------------------------------- * The ONC+ path... * ---------------------------------- */ #include /* * Copyright (c) 1984,1989 by Sun Microsystems, Inc. */ /* from pmap_prot.x */ /*** #pragma ident "@(#)pmap_prot.x 1.5 94/09/21 SMI" ***/ /* * Protocol for the local binder service, or pmap. * * Copyright (C) 1984, Sun Microsystems, Inc. * * The following procedures are supported by the protocol: * * PMAPPROC_NULL() returns () * takes nothing, returns nothing * * PMAPPROC_SET(struct pmap) returns (bool_t) * TRUE is success, FALSE is failure. Registers the tuple * [prog, vers, prot, port]. * * PMAPPROC_UNSET(struct pmap) returns (bool_t) * TRUE is success, FALSE is failure. Un-registers pair * [prog, vers]. prot and port are ignored. * * PMAPPROC_GETPORT(struct pmap) returns (long unsigned). * 0 is failure. Otherwise returns the port number where the pair * [prog, vers] is registered. It may lie! * * PMAPPROC_DUMP() RETURNS (struct pmaplist_ptr) * * PMAPPROC_CALLIT(unsigned, unsigned, unsigned, string<>) * RETURNS (port, string<>); * usage: encapsulatedresults = PMAPPROC_CALLIT(prog, vers, proc, * encapsulatedargs); * Calls the procedure on the local machine. If it is not registered, * this procedure is quite; ie it does not return error information!!! * This procedure only is supported on rpc/udp and calls via * rpc/udp. This routine only passes null authentication parameters. * This file has no interface to xdr routines for PMAPPROC_CALLIT. * * The service supports remote procedure calls on udp/ip or tcp/ip socket 111. */ #define PMAPPORT 111 /* * A mapping of (program, version, protocol) to port number */ struct pmap { u_long pm_prog; u_long pm_vers; u_long pm_prot; u_long pm_port; }; typedef struct pmap pmap; typedef pmap PMAP; /* * Supported values for the "prot" field */ #define PMAP_IPPROTO_TCP 6 #define PMAP_IPPROTO_UDP 17 /* * A list of mappings * * Below are two definitions for the pmaplist structure. This is done because * xdr_pmaplist() is specified to take a struct pmaplist **, rather than a * struct pmaplist * that rpcgen would produce. One version of the pmaplist * structure (actually called pm__list) is used with rpcgen, and the other is * defined only in the header file for compatibility with the specified * interface. */ struct pm__list { pmap pml_map; struct pm__list *pml_next; }; typedef struct pm__list pm__list; typedef pm__list *pmaplist_ptr; struct pmaplist { PMAP pml_map; struct pmaplist *pml_next; }; typedef struct pmaplist pmaplist; typedef struct pmaplist PMAPLIST; #ifdef __cplusplus extern "C" { #endif extern bool_t xdr_pmaplist(XDR *, pmaplist**); #ifdef __cplusplus } #endif /* * Arguments to callit */ struct rmtcallargs { u_long prog; u_long vers; u_long proc; struct { u_int args_len; char *args_val; } args; }; typedef struct rmtcallargs rmtcallargs; /* * Client-side only representation of rmtcallargs structure. * * The routine that XDRs the rmtcallargs structure must deal with the * opaque arguments in the "args" structure. xdr_rmtcall_args() needs to be * passed the XDR routine that knows the args' structure. This routine * doesn't need to go over-the-wire (and it wouldn't make sense anyway) since * the application being called knows the args structure already. So we use a * different "XDR" structure on the client side, p_rmtcallargs, which includes * the args' XDR routine. */ struct p_rmtcallargs { u_long prog; u_long vers; u_long proc; struct { u_int args_len; char *args_val; } args; xdrproc_t xdr_args; /* encodes args */ }; /* * Results of callit */ struct rmtcallres { u_long port; struct { u_int res_len; char *res_val; } res; }; typedef struct rmtcallres rmtcallres; /* * Client-side only representation of rmtcallres structure. */ struct p_rmtcallres { u_long port; struct { u_int res_len; char *res_val; } res; xdrproc_t xdr_res; /* decodes res */ }; #define PMAPVERS_PROTO ((u_long)2) #define PMAPVERS_ORIG ((u_long)1) #define PMAPPROG ((unsigned long)(100000)) #define PMAPVERS ((unsigned long)(2)) #define PMAPPROC_NULL ((unsigned long)(0)) extern void * pmapproc_null_2(); #define PMAPPROC_SET ((unsigned long)(1)) extern bool_t * pmapproc_set_2(); #define PMAPPROC_UNSET ((unsigned long)(2)) extern bool_t * pmapproc_unset_2(); #define PMAPPROC_GETPORT ((unsigned long)(3)) extern u_long * pmapproc_getport_2(); #define PMAPPROC_DUMP ((unsigned long)(4)) extern pmaplist_ptr * pmapproc_dump_2(); #define PMAPPROC_CALLIT ((unsigned long)(5)) extern rmtcallres * pmapproc_callit_2(); extern int pmapprog_2_freeresult(); /* the xdr functions */ extern bool_t xdr_pmap(XDR *, struct pmap *); extern bool_t xdr_pm__list(XDR *, pm__list *); extern bool_t xdr_pmaplist_ptr(XDR *, pmaplist_ptr *); extern bool_t xdr_rmtcallargs(XDR *, struct p_rmtcallargs *); extern bool_t xdr_rmtcallres(XDR *, struct p_rmtcallres *); #endif /* TIRPC */ #endif /* !_PMAP_PROT_H_RPCGEN */