138494Sobrien/*
2310490Scy * Copyright (c) 1997-2014 Erez Zadok
338494Sobrien * Copyright (c) 1990 Jan-Simon Pendry
438494Sobrien * Copyright (c) 1990 Imperial College of Science, Technology & Medicine
538494Sobrien * Copyright (c) 1990 The Regents of the University of California.
638494Sobrien * All rights reserved.
738494Sobrien *
838494Sobrien * This code is derived from software contributed to Berkeley by
938494Sobrien * Jan-Simon Pendry at Imperial College, London.
1038494Sobrien *
1138494Sobrien * Redistribution and use in source and binary forms, with or without
1238494Sobrien * modification, are permitted provided that the following conditions
1338494Sobrien * are met:
1438494Sobrien * 1. Redistributions of source code must retain the above copyright
1538494Sobrien *    notice, this list of conditions and the following disclaimer.
1638494Sobrien * 2. Redistributions in binary form must reproduce the above copyright
1738494Sobrien *    notice, this list of conditions and the following disclaimer in the
1838494Sobrien *    documentation and/or other materials provided with the distribution.
19310490Scy * 3. Neither the name of the University nor the names of its contributors
2038494Sobrien *    may be used to endorse or promote products derived from this software
2138494Sobrien *    without specific prior written permission.
2238494Sobrien *
2338494Sobrien * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
2438494Sobrien * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
2538494Sobrien * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
2638494Sobrien * ARE DISCLAIMED.  IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
2738494Sobrien * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
2838494Sobrien * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
2938494Sobrien * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
3038494Sobrien * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
3138494Sobrien * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
3238494Sobrien * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
3338494Sobrien * SUCH DAMAGE.
3438494Sobrien *
3538494Sobrien *
36174294Sobrien * File: am-utils/libamu/amu.h
3738494Sobrien *
3838494Sobrien */
3938494Sobrien
4038494Sobrien#ifndef _AMU_H
4138494Sobrien#define _AMU_H
4238494Sobrien
4338494Sobrien/*
4438494Sobrien * Decide what maximum level of NFS server to try and mount with.
4538494Sobrien */
46310490Scy#if defined(HAVE_FS_NFS4)
47310490Scy# define NFS_VERS_MAX NFS_VERSION4
48310490Scy#elif defined(HAVE_FS_NFS3)
4938494Sobrien# define NFS_VERS_MAX NFS_VERSION3
5038494Sobrien#else /* not HAVE_FS_NFS3 */
5138494Sobrien# define NFS_VERS_MAX NFS_VERSION
5238494Sobrien#endif /* not HAVE_FS_NFS3 */
53310490Scy# define NFS_VERS_MIN NFS_VERSION
5438494Sobrien
5538494Sobrien/* some systems like ncr2 do not define this in <rpcsvc/mount.h> */
5638494Sobrien#ifndef MNTPATHLEN
5738494Sobrien# define MNTPATHLEN 1024
5838494Sobrien#endif /* not MNTPATHLEN */
5938494Sobrien#ifndef MNTNAMLEN
6038494Sobrien# define MNTNAMLEN 255
6138494Sobrien#endif /* not MNTNAMLEN */
6238494Sobrien
6338494Sobrien/*
6438494Sobrien * external definitions for building libamu.a
6538494Sobrien */
6638494Sobrienextern voidp amqproc_null_1(voidp argp, CLIENT *rqstp);
6738494Sobrienextern amq_mount_tree_p *amqproc_mnttree_1(amq_string *argp, CLIENT *rqstp);
6838494Sobrienextern voidp amqproc_umnt_1(amq_string *argp, CLIENT *rqstp);
6938494Sobrienextern amq_mount_stats *amqproc_stats_1(voidp argp, CLIENT *rqstp);
7038494Sobrienextern amq_mount_tree_list *amqproc_export_1(voidp argp, CLIENT *rqstp);
7138494Sobrienextern int *amqproc_setopt_1(amq_setopt *argp, CLIENT *rqstp);
7238494Sobrienextern amq_mount_info_list *amqproc_getmntfs_1(voidp argp, CLIENT *rqstp);
7338494Sobrienextern int *amqproc_mount_1(voidp argp, CLIENT *rqstp);
7438494Sobrienextern amq_string *amqproc_getvers_1(voidp argp, CLIENT *rqstp);
7538494Sobrien
76174294Sobrienextern long get_server_pid(void);
77174294Sobrien
7838494Sobrien#endif /* not _AMU_H */
79