1*0342d508Spgoyette /* $NetBSD: nfs_mountcommon.h,v 1.2 2016/12/13 22:52:46 pgoyette Exp $ */ 26ca35587Sdholland /*- 36ca35587Sdholland * Copyright (c) 2009 Rick Macklem, University of Guelph 46ca35587Sdholland * All rights reserved. 56ca35587Sdholland * 66ca35587Sdholland * Redistribution and use in source and binary forms, with or without 76ca35587Sdholland * modification, are permitted provided that the following conditions 86ca35587Sdholland * are met: 96ca35587Sdholland * 1. Redistributions of source code must retain the above copyright 106ca35587Sdholland * notice, this list of conditions and the following disclaimer. 116ca35587Sdholland * 2. Redistributions in binary form must reproduce the above copyright 126ca35587Sdholland * notice, this list of conditions and the following disclaimer in the 136ca35587Sdholland * documentation and/or other materials provided with the distribution. 146ca35587Sdholland * 156ca35587Sdholland * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND 166ca35587Sdholland * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 176ca35587Sdholland * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 186ca35587Sdholland * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE 196ca35587Sdholland * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 206ca35587Sdholland * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 216ca35587Sdholland * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 226ca35587Sdholland * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 236ca35587Sdholland * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 246ca35587Sdholland * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 256ca35587Sdholland * SUCH DAMAGE. 266ca35587Sdholland * 276ca35587Sdholland * FreeBSD: head/sys/nfs/nfs_mountcommon.h 216931 2011-01-03 20:37:31Z rmacklem 28*0342d508Spgoyette * $NetBSD: nfs_mountcommon.h,v 1.2 2016/12/13 22:52:46 pgoyette Exp $ 296ca35587Sdholland */ 306ca35587Sdholland 316ca35587Sdholland #ifndef _NFS_MOUNTCOMMON_H_ 326ca35587Sdholland #define _NFS_MOUNTCOMMON_H_ 336ca35587Sdholland 346ca35587Sdholland /* 356ca35587Sdholland * The common fields of the nfsmount structure for the two clients 366ca35587Sdholland * used by the nlm. It includes a function pointer that provides 376ca35587Sdholland * a mechanism for getting the client specific info for an nfs vnode. 386ca35587Sdholland */ 396ca35587Sdholland typedef void nfs_getinfofromvp_ftype(struct vnode *, uint8_t *, size_t *, 406ca35587Sdholland struct sockaddr_storage *, int *, off_t *, 416ca35587Sdholland struct timeval *); 42*0342d508Spgoyette typedef int nfs_vinvalbuf_ftype(struct vnode *, int, struct lwp *, int); 436ca35587Sdholland 446ca35587Sdholland struct nfsmount_common { 45*0342d508Spgoyette kmutex_t nmcom_mtx; 466ca35587Sdholland int nmcom_flag; /* Flags for soft/hard... */ 476ca35587Sdholland int nmcom_state; /* Internal state flags */ 486ca35587Sdholland struct mount *nmcom_mountp; /* Vfs structure for this filesystem */ 496ca35587Sdholland int nmcom_timeo; /* Init timer for NFSMNT_DUMBTIMR */ 506ca35587Sdholland int nmcom_retry; /* Max retries */ 516ca35587Sdholland char nmcom_hostname[MNAMELEN]; /* server's name */ 526ca35587Sdholland nfs_getinfofromvp_ftype *nmcom_getinfo; /* Get info from nfsnode */ 536ca35587Sdholland nfs_vinvalbuf_ftype *nmcom_vinvalbuf; /* Invalidate buffers */ 546ca35587Sdholland }; 556ca35587Sdholland 566ca35587Sdholland #endif /* _NFS_MOUNTCOMMON_H_ */ 57