* Copyright (c) 1990 Jan-Simon Pendry
* Copyright (c) 1990 Imperial College of Science, Technology & Medicine
* Copyright (c) 1990, 1993
* The Regents of the University of California. All rights reserved.
* This code is derived from software contributed to Berkeley by
* Jan-Simon Pendry at Imperial College, London.
* %sccs.include.redist.c%
* @(#)amq_svc.c 8.1 (Berkeley) %G%
* $Id: amq_svc.c,v 5.2.2.1 1992/02/09 15:09:26 jsp beta $
extern bool_t
xdr_amq_mount_info_qelem();
amq_program_1(rqstp
, transp
)
amq_string amqproc_mnttree_1_arg
;
amq_string amqproc_umnt_1_arg
;
amq_setopt amqproc_setopt_1_arg
;
amq_string amqproc_mount_1_arg
;
bool_t (*xdr_argument
)(), (*xdr_result
)();
switch (rqstp
->rq_proc
) {
local
= (char *(*)()) amqproc_null_1
;
xdr_argument
= xdr_amq_string
;
xdr_result
= xdr_amq_mount_tree_p
;
local
= (char *(*)()) amqproc_mnttree_1
;
xdr_argument
= xdr_amq_string
;
local
= (char *(*)()) amqproc_umnt_1
;
xdr_result
= xdr_amq_mount_stats
;
local
= (char *(*)()) amqproc_stats_1
;
xdr_result
= xdr_amq_mount_tree_list
;
local
= (char *(*)()) amqproc_export_1
;
xdr_argument
= xdr_amq_setopt
;
local
= (char *(*)()) amqproc_setopt_1
;
xdr_result
= xdr_amq_mount_info_qelem
;
local
= (char *(*)()) amqproc_getmntfs_1
;
xdr_argument
= xdr_amq_string
;
local
= (char *(*)()) amqproc_mount_1
;
xdr_result
= xdr_amq_string
;
local
= (char *(*)()) amqproc_getvers_1
;
bzero((char *)&argument
, sizeof(argument
));
if (!svc_getargs(transp
, xdr_argument
, &argument
)) {
result
= (*local
)(&argument
, rqstp
);
if (result
!= NULL
&& !svc_sendreply(transp
, xdr_result
, result
)) {
svcerr_systemerr(transp
);
if (!svc_freeargs(transp
, xdr_argument
, &argument
)) {
plog(XLOG_FATAL
, "unable to free rpc arguments in amqprog_1");