/*
* CDDL HEADER START
*
* The contents of this file are subject to the terms of the
* Common Development and Distribution License, Version 1.0 only
* (the "License"). You may not use this file except in compliance
* with the License.
*
* You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
* See the License for the specific language governing permissions
* and limitations under the License.
*
* When distributing Covered Code, include this CDDL HEADER in each
* file and include the License file at usr/src/OPENSOLARIS.LICENSE.
* If applicable, add the following below this CDDL HEADER, with the
* fields enclosed by brackets "[]" replaced with your own identifying
* information: Portions Copyright [yyyy] [name of copyright owner]
*
* CDDL HEADER END
*/
%/*
% * Copyright (c) 1988,1994 by Sun Microsystems, Inc.
% * All rights reserved.
% */
%/* from rpcb_prot.x */
#ifdef RPC_HDR
%
%#pragma ident "%Z%%M% %I% %E% SMI"
%
%#ifndef _KERNEL
%
#endif
/*
* rpcb_prot.x
* rpcbind protocol, versions 3 and 4, in RPC Language
*/
%
%/*
% * The following procedures are supported by the protocol in version 3:
% *
% * RPCBPROC_NULL() returns ()
% * takes nothing, returns nothing
% *
% * RPCBPROC_SET(rpcb) returns (bool_t)
% * TRUE is success, FALSE is failure. Registers the tuple
% * [prog, vers, address, owner, netid].
% * Finds out owner and netid information on its own.
% *
% * RPCBPROC_UNSET(rpcb) returns (bool_t)
% * TRUE is success, FALSE is failure. Un-registers tuple
% * [prog, vers, netid]. addresses is ignored.
% * If netid is NULL, unregister all.
% *
% * RPCBPROC_GETADDR(rpcb) returns (string).
% * 0 is failure. Otherwise returns the universal address where the
% * triple [prog, vers, netid] is registered. Ignore address and owner.
% *
% * RPCBPROC_DUMP() RETURNS (rpcblist_ptr)
% * used to dump the entire rpcbind maps
% *
% * RPCBPROC_CALLIT(rpcb_rmtcallargs)
% * RETURNS (rpcb_rmtcallres);
% * Calls the procedure on the remote machine. If it is not registered,
% * this procedure is quiet; i.e. it does not return error information!!!
% * This routine only passes null authentication parameters.
% * It has no interface to xdr routines for RPCBPROC_CALLIT.
% *
% * RPCBPROC_GETTIME() returns (int).
% * Gets the remote machines time
% *
% * RPCBPROC_UADDR2TADDR(strint) RETURNS (struct netbuf)
% * Returns the netbuf address from universal address.
% *
% * RPCBPROC_TADDR2UADDR(struct netbuf) RETURNS (string)
% * Returns the universal address from netbuf address.
% *
% * END OF RPCBIND VERSION 3 PROCEDURES
% */
%/*
% * Except for RPCBPROC_CALLIT, the procedures above are carried over to
% * rpcbind version 4. Those below are added or modified for version 4.
% * NOTE: RPCBPROC_BCAST HAS THE SAME FUNCTIONALITY AND PROCEDURE NUMBER
% * AS RPCBPROC_CALLIT.
% *
% * RPCBPROC_BCAST(rpcb_rmtcallargs)
% * RETURNS (rpcb_rmtcallres);
% * Calls the procedure on the remote machine. If it is not registered,
% * this procedure IS quiet; i.e. it DOES NOT return error information!!!
% * This routine should be used for broadcasting and nothing else.
% *
% * RPCBPROC_GETVERSADDR(rpcb) returns (string).
% * 0 is failure. Otherwise returns the universal address where the
% * triple [prog, vers, netid] is registered. Ignore address and owner.
% * Same as RPCBPROC_GETADDR except that if the given version number
% * is not available, the address is not returned.
% *
% * RPCBPROC_INDIRECT(rpcb_rmtcallargs)
% * RETURNS (rpcb_rmtcallres);
% * Calls the procedure on the remote machine. If it is not registered,
% * this procedure is NOT quiet; i.e. it DOES return error information!!!
% * as any normal application would expect.
% *
% * RPCBPROC_GETADDRLIST(rpcb) returns (rpcb_entry_list_ptr).
% * Same as RPCBPROC_GETADDR except that it returns a list of all the
% * addresses registered for the combination (prog, vers) (for all
% * transports).
% *
% * RPCBPROC_GETSTAT(void) returns (rpcb_stat_byvers)
% * Returns the statistics about the kind of requests received by rpcbind.
% */
%
%/*
% * A mapping of (program, version, network ID) to address
% */
struct rpcb {
};
#ifdef RPC_HDR
%
%
#endif
%
%/*
% * A list of mappings
% *
% * Below are two definitions for the rpcblist structure. This is done because
% * xdr_rpcblist() is specified to take a struct rpcblist **, rather than a
% * struct rpcblist * that rpcgen would produce. One version of the rpcblist
% * structure (actually called rp__list) is used with rpcgen, and the other is
% * defined only in the header file for compatibility with the specified
% * interface.
% */
struct rp__list {
};
#ifdef RPC_HDR
%
%
%#ifndef __cplusplus
%struct rpcblist {
%};
%#endif
%
%#ifdef __cplusplus
%extern "C" {
%#endif
%#ifdef __STDC__
%#else /* K&R C */
%bool_t xdr_rpcblist();
%#endif
%#ifdef __cplusplus
%}
%#endif
%
#endif
%
%/*
% * Arguments of remote calls
% */
struct rpcb_rmtcallargs {
};
#ifdef RPC_HDR
%
%/*
% * Client-side only representation of rpcb_rmtcallargs structure.
% *
% * The routine that XDRs the rpcb_rmtcallargs structure must deal with the
% * opaque arguments in the "args" structure. xdr_rpcb_rmtcallargs() 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 already knows the args structure. So we use a
% * different "XDR" structure on the client side, r_rpcb_rmtcallargs, which
% * includes the args' XDR routine.
% */
%struct r_rpcb_rmtcallargs {
% struct {
% char *args_val;
% } args;
%};
%
#endif /* def RPC_HDR */
%
%/*
% * Results of the remote call
% */
struct rpcb_rmtcallres {
};
#ifdef RPC_HDR
%
%/*
% * Client-side only representation of rpcb_rmtcallres structure.
% */
%struct r_rpcb_rmtcallres {
% char *addr;
% struct {
% char *results_val;
% } results;
%};
#endif RPC_HDR
%
%/*
% * rpcb_entry contains a merged address of a service on a particular
% * transport, plus associated netconfig information. A list of rpcb_entrys
% * is returned by RPCBPROC_GETADDRLIST. See netconfig.h for values used
% * in r_nc_* fields.
% */
struct rpcb_entry {
unsigned int r_nc_semantics; /* semantics of transport */
};
%
%/*
% * A list of addresses supported by a service.
% */
struct rpcb_entry_list {
struct rpcb_entry_list *rpcb_entry_next;
};
typedef rpcb_entry_list *rpcb_entry_list_ptr;
%
%/*
% * rpcbind statistics
% */
%
const rpcb_highproc_2 = RPCBPROC_CALLIT;
const rpcb_highproc_3 = RPCBPROC_TADDR2UADDR;
const rpcb_highproc_4 = RPCBPROC_GETSTAT;
const RPCBVERS_4_STAT = 2;
const RPCBVERS_3_STAT = 1;
const RPCBVERS_2_STAT = 0;
%
%/* Link list of all the stats about getport and getaddr */
struct rpcbs_addrlist {
int success;
int failure;
struct rpcbs_addrlist *next;
};
%
%/* Link list of all the stats about rmtcall */
struct rpcbs_rmtcalllist {
int success;
int failure;
int indirect; /* whether callit or indirect */
struct rpcbs_rmtcalllist *next;
};
typedef int rpcbs_proc[RPCBSTAT_HIGHPROC];
typedef rpcbs_addrlist *rpcbs_addrlist_ptr;
typedef rpcbs_rmtcalllist *rpcbs_rmtcalllist_ptr;
struct rpcb_stat {
int setinfo;
int unsetinfo;
};
%
%/*
% * One rpcb_stat structure is returned for each version of rpcbind
% * being monitored.
% */
#ifdef RPC_HDR
%
%/*
% * We don't define netbuf in RPCL, since it would contain structure member
% * names that would conflict with the definition of struct netbuf in
% * <tiuser.h>. Instead we merely declare the XDR routine xdr_netbuf() here,
% * and implement it ourselves in rpc/rpcb_prot.c.
% */
%#ifdef __cplusplus
%
%
%#else /* K&R C */
%bool_t xdr_netbuf();
%
%#endif /* K&R C */
#endif /* def RPC_HDR */
/*
* rpcbind procedures
*/
bool
bool
RPCBPROC_DUMP(void) = 4;
unsigned int
RPCBPROC_GETTIME(void) = 6;
struct netbuf
} = 3;
bool
bool
RPCBPROC_DUMP(void) = 4;
/*
* NOTE: RPCBPROC_BCAST has the same functionality as CALLIT;
* the new name is intended to indicate that this
* procedure should be used for broadcast RPC, and
* RPCBPROC_INDIRECT should be used for indirect calls.
*/
unsigned int
RPCBPROC_GETTIME(void) = 6;
struct netbuf
RPCBPROC_GETSTAT(void) = 12;
} = 4;
} = 100000;
#ifdef RPC_HDR
%
%#define RPCBVERS_3 RPCBVERS
%#define RPCBVERS_4 RPCBVERS4
%
%#else /* ndef _KERNEL */
%#ifdef __cplusplus
%extern "C" {
%#endif
%
%/*
% * A mapping of (program, version, network ID) to address
% */
%struct rpcb {
% char *r_netid; /* network id */
% char *r_addr; /* universal address */
% char *r_owner; /* owner of the mapping */
%};
%
%/*
% * A list of mappings
% */
%struct rpcblist {
%};
%typedef struct rpcblist *rpcblist_ptr;
%
%/*
% * Remote calls arguments
% */
%struct rpcb_rmtcallargs {
% unsigned int arglen; /* arg len */
%};
%typedef struct rpcb_rmtcallargs rpcb_rmtcallargs;
%
%/*
% * Remote calls results
% */
%struct rpcb_rmtcallres {
% char *addr_ptr; /* remote universal address */
%};
%typedef struct rpcb_rmtcallres rpcb_rmtcallres;
%
%struct rpcb_entry {
% char *r_maddr;
% char *r_nc_netid;
% unsigned int r_nc_semantics;
% char *r_nc_protofmly;
% char *r_nc_proto;
%};
%typedef struct rpcb_entry rpcb_entry;
%
%/*
% * A list of addresses supported by a service.
% */
%
%struct rpcb_entry_list {
% struct rpcb_entry_list *rpcb_entry_next;
%};
%typedef struct rpcb_entry_list rpcb_entry_list;
%
%typedef rpcb_entry_list *rpcb_entry_list_ptr;
%
%/*
% * rpcbind statistics
% */
%
%#define rpcb_highproc_2 RPCBPROC_CALLIT
%#define rpcb_highproc_3 RPCBPROC_TADDR2UADDR
%#define rpcb_highproc_4 RPCBPROC_GETSTAT
%#define RPCBSTAT_HIGHPROC 13
%#define RPCBVERS_STAT 3
%#define RPCBVERS_4_STAT 2
%#define RPCBVERS_3_STAT 1
%#define RPCBVERS_2_STAT 0
%
%/* Link list of all the stats about getport and getaddr */
%
%struct rpcbs_addrlist {
% int success;
% int failure;
% char *netid;
% struct rpcbs_addrlist *next;
%};
%typedef struct rpcbs_addrlist rpcbs_addrlist;
%
%/* Link list of all the stats about rmtcall */
%
%struct rpcbs_rmtcalllist {
% int success;
% int failure;
% int indirect;
% char *netid;
% struct rpcbs_rmtcalllist *next;
%};
%typedef struct rpcbs_rmtcalllist rpcbs_rmtcalllist;
%
%typedef int rpcbs_proc[RPCBSTAT_HIGHPROC];
%
%typedef rpcbs_addrlist *rpcbs_addrlist_ptr;
%
%typedef rpcbs_rmtcalllist *rpcbs_rmtcalllist_ptr;
%
%struct rpcb_stat {
% rpcbs_proc info;
% int setinfo;
% int unsetinfo;
%};
%
%/*
% * One rpcb_stat structure is returned for each version of rpcbind
% * being monitored.
% */
%
%
%
%#ifdef __cplusplus
%}
%#endif
%
%#endif /* ndef _KERNEL */
#endif /* RPC_HDR */