153494Sdillon/*
253494Sdillon * Copyright (c) 1999 Martin Blapp
353494Sdillon * All rights reserved.
453494Sdillon *
553494Sdillon * Redistribution and use in source and binary forms, with or without
653494Sdillon * modification, are permitted provided that the following conditions
753494Sdillon * are met:
853494Sdillon * 1. Redistributions of source code must retain the above copyright
953494Sdillon *    notice, this list of conditions and the following disclaimer.
1053494Sdillon * 2. Redistributions in binary form must reproduce the above copyright
1153494Sdillon *    notice, this list of conditions and the following disclaimer in the
1253494Sdillon *    documentation and/or other materials provided with the distribution.
1353494Sdillon *
1453494Sdillon * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
1553494Sdillon * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
1653494Sdillon * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
1753494Sdillon * ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
1853494Sdillon * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
1953494Sdillon * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
2053494Sdillon * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
2153494Sdillon * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
2253494Sdillon * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
2353494Sdillon * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
2453494Sdillon * SUCH DAMAGE.
2553494Sdillon *
2653494Sdillon * $FreeBSD$
2753494Sdillon */
2853494Sdillon
29194880Sdfr#define STRSIZ  (MNTNAMLEN+MNTPATHLEN+100)
3053494Sdillon#define PATH_MOUNTTAB	"/var/db/mounttab"
3153494Sdillon
3253494Sdillon/* Structure for /var/db/mounttab */
3353494Sdillonstruct mtablist {
3453494Sdillon	time_t	mtab_time;
35194880Sdfr	char	mtab_host[MNTNAMLEN];
36194880Sdfr	char	mtab_dirp[MNTPATHLEN];
3753494Sdillon	struct mtablist *mtab_next;
3853494Sdillon};
3953494Sdillon
4080146Siedowseextern struct mtablist *mtabhead;
4180146Siedowse
4253494Sdillonint	add_mtab(char *, char *);
4380146Siedowsevoid	clean_mtab(char *, char *, int);
4480146Siedowseint	read_mtab(void);
4580146Siedowseint	write_mtab(int);
4680146Siedowsevoid	free_mtab(void);
47