autofs_prot.x revision 3bfb48feb84bb78924286a801c68f80198912fa7
/*
* 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
*/
%/*
% * Copyright 2007 Sun Microsystems, Inc. All rights reserved.
% * Use is subject to license terms.
% */
%
%#pragma ident "%Z%%M% %I% %E% SMI"
%
%
%#define xdr_bool_t xdr_bool
%
/*
* Autofs/automountd communication protocol.
*/
const AUTOFS_MAXPATHLEN = 1024;
const AUTOFS_MAXCOMPONENTLEN = 255;
const AUTOFS_MAXOPTSLEN = 1024;
const AUTOFS_DAEMONCOOKIE = 100000;
/*
* Action Status
* Automountd replies to autofs indicating whether the operation is done,
* or further action needs to be taken by autofs.
*/
enum autofs_stat {
AUTOFS_ACTION=0, /* list of actions included */
};
/*
* Used by autofs to either create a link, or mount a new filesystem.
*/
enum autofs_action {
AUTOFS_MOUNT_RQ=0, /* mount request */
};
enum autofs_res {
AUTOFS_OK=0,
AUTOFS_NOENT=2,
AUTOFS_ECOMM=5,
AUTOFS_NOMEM=12,
AUTOFS_NOTDIR=20,
AUTOFS_SHUTDOWN=1000
};
/*
* Argument structure passed to both autofs_lookup() and autofs_mount().
* autofs_lookup():
* autofs_mount():
* Request automountd to mount the map entry associated with
*/
struct autofs_lookupargs {
};
/*
* Symbolic link information.
*/
struct linka {
};
/*
* We don't define netbuf in RPCL, we include the header file that
* includes it, and implement the xdr function ourselves.
*/
/*
* Autofs Mount specific information - used to mount a new
* autofs filesystem.
*/
struct autofs_args {
int mount_to; /* time in sec the fs is to remain */
/* mounted after last reference */
int rpc_to; /* timeout for rpc calls */
int direct; /* 1 = direct mount */
};
%#ifdef _SYSCALL32
%/*
% * This is an LP64 representation of the ILP32 autofs_args data structure
% * for use by autofs_mount which may receive the data structure "raw"
% * from a 32-bit program without being processed by XDR. rpcgen doesn't
% * version of autofs_args. If this isn't hidden from rpcgen then it will
% * insist on generating unnecessary code to deal with it.
% */
%struct autofs_args32 {
% /* mounted after last reference */
%};
%#endif /* _SYSCALL32 */
/*
* Contains the necessary information to notify autofs to
* perfom either a new mount or create a symbolic link.
*/
case AUTOFS_MOUNT_RQ:
case AUTOFS_LINK_RQ:
default:
void;
};
/*
* List of actions that need to be performed by autofs to
* finish the requested operation.
*/
struct action_list {
};
case AUTOFS_ACTION:
case AUTOFS_DONE:
int error;
default:
void;
};
/*
* Result from mount operation.
*/
struct autofs_mountres {
int mr_verbose;
};
case AUTOFS_LINK_RQ:
case AUTOFS_MOUNT_RQ:
void;
default:
void;
};
/*
* Result from lookup operation.
*/
struct autofs_lookupres {
enum autofs_res lu_res;
int lu_verbose;
};
/*
* Unmount operation request
* Automountd will issue unmount system call for the
* given fstype on the given mntpnt.
*/
struct umntrequest {
};
/*
* Unmount operation result
* status = 0 if unmount was successful,
* otherwise status = errno.
*/
struct umntres {
int status;
};
/*
* AUTOFS readdir request
* Request list of entries in 'rda_map' map starting at the given
* offset 'rda_offset', for 'rda_count' bytes.
*/
struct autofs_rddirargs {
};
struct autofsrddir {
};
/*
* AUTOFS readdir result.
*/
struct autofs_rddirres {
enum autofs_res rd_status;
struct autofsrddir rd_rddir;
};