/*
* CDDL HEADER START
*
* The contents of this file are subject to the terms of the
* Common Development and Distribution License (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
*/
/*
*/
/*
* rad protocol definitions
*
* We don't use straight RPC since we have additional requirements:
* - We need multiple outstanding requests that get distinct results
* - We need asynchronous notifications
*
* At the same time, we can make things simpler. Which is good because
* Java doesn't have an RPC client.
*/
/*
* We programmatically impose an limit on the request size, but it is
* still possible for the XDR-encoded content of a request to deny
* service by specifying string, array, or opaque sizes that don't
* match the actual amount of data sent.
*
* Solaris's xdr_string implementation protects us from XDR strings
* with exaggerated sizes. Unfortunately xdr_bytes and xdr_array do
* not. So that we can safely use rpcgen to implement our protocol,
* we enforce the following limits on our non-string variable-length
* quanities.
*/
const MAXARGS = 16;
const MAXARGLEN = 16336;
/*
* Request definitions
*/
struct wiretime {
int nanos;
};
typedef string objectname<>;
struct op_invoke {
};
struct resp_invoke {
};
struct op_getattr {
};
struct resp_getattr {
};
struct op_setattr {
};
/*
struct resp_setattr {
};
*/
struct op_lookup {
bool describe;
};
/* Not actually used; see xdr_object_t & datatype.x */
/*
struct resp_lookup {
hyper objectid;
hyper typeid;
bool isdefined;
( if isdefined, definition )
};
*/
struct op_define {
};
/* Not actually used; see xdr_object_t & datatype.x */
/*
struct resp_define {
( definition )
};
*/
struct op_list {
};
struct resp_list {
};
struct op_subscribe {
};
/* resp_subscribe {}; */
struct op_unsubscribe {
};
/* resp_unsubscribe {}; */
/*
*/
struct server_hello {
int min_ver; /* Minimum supported version */
int max_ver; /* Maximum supported version */
};
struct client_hello {
int ver; /* Selected version */
};
/* Container operations */
enum operation {
LIST,
SUB,
};
struct request {
};
struct fault {
};
struct response_data {
int error;
};
struct event_data {
};
case 0:
default:
};