Annotation of 43BSDReno/usr.sbin/amd/rpcx/amq_clnt.c, revision 1.1.1.1

1.1       root        1: /*
                      2:  * $Id: amq_clnt.c,v 5.2 90/06/23 22:20:16 jsp Rel $
                      3:  *
                      4:  * Copyright (c) 1990 Jan-Simon Pendry
                      5:  * Copyright (c) 1990 Imperial College of Science, Technology & Medicine
                      6:  * Copyright (c) 1990 The Regents of the University of California.
                      7:  * All rights reserved.
                      8:  *
                      9:  * This code is derived from software contributed to Berkeley by
                     10:  * Jan-Simon Pendry at Imperial College, London.
                     11:  *
                     12:  * Redistribution and use in source and binary forms are permitted provided
                     13:  * that: (1) source distributions retain this entire copyright notice and
                     14:  * comment, and (2) distributions including binaries display the following
                     15:  * acknowledgement:  ``This product includes software developed by the
                     16:  * University of California, Berkeley and its contributors'' in the
                     17:  * documentation or other materials provided with the distribution and in
                     18:  * all advertising materials mentioning features or use of this software.
                     19:  * Neither the name of the University nor the names of its contributors may
                     20:  * be used to endorse or promote products derived from this software without
                     21:  * specific prior written permission.
                     22:  * THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR IMPLIED
                     23:  * WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED WARRANTIES OF
                     24:  * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
                     25:  *
                     26:  *     @(#)amq_clnt.c  5.1 (Berkeley) 7/19/90
                     27:  */
                     28: 
                     29: #include "am.h"
                     30: #include "amq.h"
                     31: 
                     32: /* Default timeout can be changed using clnt_control() */
                     33: static struct timeval TIMEOUT = { 25, 0 };
                     34: 
                     35: voidp
                     36: amqproc_null_1(argp, clnt)
                     37:        voidp argp;
                     38:        CLIENT *clnt;
                     39: {
                     40:        static char res;
                     41: 
                     42:        bzero((char *)&res, sizeof(res));
                     43:        if (clnt_call(clnt, AMQPROC_NULL, xdr_void, argp, xdr_void, &res, TIMEOUT) != RPC_SUCCESS) {
                     44:                return (NULL);
                     45:        }
                     46:        return ((voidp)&res);
                     47: }
                     48: 
                     49: 
                     50: amq_mount_tree_p *
                     51: amqproc_mnttree_1(argp, clnt)
                     52:        amq_string *argp;
                     53:        CLIENT *clnt;
                     54: {
                     55:        static amq_mount_tree_p res;
                     56: 
                     57:        bzero((char *)&res, sizeof(res));
                     58:        if (clnt_call(clnt, AMQPROC_MNTTREE, xdr_amq_string, argp, xdr_amq_mount_tree_p, &res, TIMEOUT) != RPC_SUCCESS) {
                     59:                return (NULL);
                     60:        }
                     61:        return (&res);
                     62: }
                     63: 
                     64: 
                     65: voidp
                     66: amqproc_umnt_1(argp, clnt)
                     67:        amq_string *argp;
                     68:        CLIENT *clnt;
                     69: {
                     70:        static char res;
                     71: 
                     72:        bzero((char *)&res, sizeof(res));
                     73:        if (clnt_call(clnt, AMQPROC_UMNT, xdr_amq_string, argp, xdr_void, &res, TIMEOUT) != RPC_SUCCESS) {
                     74:                return (NULL);
                     75:        }
                     76:        return ((voidp)&res);
                     77: }
                     78: 
                     79: 
                     80: amq_mount_stats *
                     81: amqproc_stats_1(argp, clnt)
                     82:        voidp argp;
                     83:        CLIENT *clnt;
                     84: {
                     85:        static amq_mount_stats res;
                     86: 
                     87:        bzero((char *)&res, sizeof(res));
                     88:        if (clnt_call(clnt, AMQPROC_STATS, xdr_void, argp, xdr_amq_mount_stats, &res, TIMEOUT) != RPC_SUCCESS) {
                     89:                return (NULL);
                     90:        }
                     91:        return (&res);
                     92: }
                     93: 
                     94: 
                     95: amq_mount_tree_list *
                     96: amqproc_export_1(argp, clnt)
                     97:        voidp argp;
                     98:        CLIENT *clnt;
                     99: {
                    100:        static amq_mount_tree_list res;
                    101: 
                    102:        bzero((char *)&res, sizeof(res));
                    103:        if (clnt_call(clnt, AMQPROC_EXPORT, xdr_void, argp, xdr_amq_mount_tree_list, &res, TIMEOUT) != RPC_SUCCESS) {
                    104:                return (NULL);
                    105:        }
                    106:        return (&res);
                    107: }
                    108: 
                    109: int *
                    110: amqproc_setopt_1(argp, clnt)
                    111:        amq_setopt *argp;
                    112:        CLIENT *clnt;
                    113: {
                    114:        static int res;
                    115: 
                    116:        bzero((char *)&res, sizeof(res));
                    117:        if (clnt_call(clnt, AMQPROC_SETOPT, xdr_amq_setopt, argp, xdr_int, &res, TIMEOUT) != RPC_SUCCESS) {
                    118:                return (NULL);
                    119:        }
                    120:        return (&res);
                    121: }
                    122: 
                    123: 
                    124: amq_mount_info_list *
                    125: amqproc_getmntfs_1(argp, clnt)
                    126:        voidp argp;
                    127:        CLIENT *clnt;
                    128: {
                    129:        static amq_mount_info_list res;
                    130: 
                    131:        bzero((char *)&res, sizeof(res));
                    132:        if (clnt_call(clnt, AMQPROC_GETMNTFS, xdr_void, argp, xdr_amq_mount_info_list, &res, TIMEOUT) != RPC_SUCCESS) {
                    133:                return (NULL);
                    134:        }
                    135:        return (&res);
                    136: }
                    137: 

unix.superglobalmegacorp.com

This archive runs on limited infrastructure. Preserving old code on modern bandwidth. Automated agents are requested to crawl responsibly.