layer_extern.h revision 1.1.2.2 1 1.1.2.2 thorpej /* $NetBSD: layer_extern.h,v 1.1.2.2 1999/08/02 22:27:34 thorpej Exp $ */
2 1.1.2.2 thorpej
3 1.1.2.2 thorpej /*
4 1.1.2.2 thorpej * Copyright (c) 1999 National Aeronautics & Space Administration
5 1.1.2.2 thorpej * All rights reserved.
6 1.1.2.2 thorpej *
7 1.1.2.2 thorpej * This software was written by William Studenmund of the
8 1.1.2.2 thorpej * Numerical Aerospace Similation Facility, NASA Ames Research Center.
9 1.1.2.2 thorpej *
10 1.1.2.2 thorpej * Redistribution and use in source and binary forms, with or without
11 1.1.2.2 thorpej * modification, are permitted provided that the following conditions
12 1.1.2.2 thorpej * are met:
13 1.1.2.2 thorpej * 1. Redistributions of source code must retain the above copyright
14 1.1.2.2 thorpej * notice, this list of conditions and the following disclaimer.
15 1.1.2.2 thorpej * 2. Redistributions in binary form must reproduce the above copyright
16 1.1.2.2 thorpej * notice, this list of conditions and the following disclaimer in the
17 1.1.2.2 thorpej * documentation and/or other materials provided with the distribution.
18 1.1.2.2 thorpej * 3. Neither the the name of the National Aeronautics & Space Administration
19 1.1.2.2 thorpej * nor the names of its contributors may be used to endorse or promote
20 1.1.2.2 thorpej * products derived from this software without specific prior written
21 1.1.2.2 thorpej * permission.
22 1.1.2.2 thorpej *
23 1.1.2.2 thorpej * THIS SOFTWARE IS PROVIDED BY THE NATIONAL AERONAUTICS & SPACE ADMINISTRATION
24 1.1.2.2 thorpej * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
25 1.1.2.2 thorpej * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
26 1.1.2.2 thorpej * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE ADMINISTRATION OR CONTRIB-
27 1.1.2.2 thorpej * UTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY,
28 1.1.2.2 thorpej * OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
29 1.1.2.2 thorpej * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
30 1.1.2.2 thorpej * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
31 1.1.2.2 thorpej * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
32 1.1.2.2 thorpej * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
33 1.1.2.2 thorpej * POSSIBILITY OF SUCH DAMAGE.
34 1.1.2.2 thorpej */
35 1.1.2.2 thorpej /*
36 1.1.2.2 thorpej * Copyright (c) 1992, 1993, 1995
37 1.1.2.2 thorpej * The Regents of the University of California. All rights reserved.
38 1.1.2.2 thorpej *
39 1.1.2.2 thorpej * This code is derived from software donated to Berkeley by
40 1.1.2.2 thorpej * Jan-Simon Pendry.
41 1.1.2.2 thorpej *
42 1.1.2.2 thorpej * Redistribution and use in source and binary forms, with or without
43 1.1.2.2 thorpej * modification, are permitted provided that the following conditions
44 1.1.2.2 thorpej * are met:
45 1.1.2.2 thorpej * 1. Redistributions of source code must retain the above copyright
46 1.1.2.2 thorpej * notice, this list of conditions and the following disclaimer.
47 1.1.2.2 thorpej * 2. Redistributions in binary form must reproduce the above copyright
48 1.1.2.2 thorpej * notice, this list of conditions and the following disclaimer in the
49 1.1.2.2 thorpej * documentation and/or other materials provided with the distribution.
50 1.1.2.2 thorpej * 3. All advertising materials mentioning features or use of this software
51 1.1.2.2 thorpej * must display the following acknowledgement:
52 1.1.2.2 thorpej * This product includes software developed by the University of
53 1.1.2.2 thorpej * California, Berkeley and its contributors.
54 1.1.2.2 thorpej * 4. Neither the name of the University nor the names of its contributors
55 1.1.2.2 thorpej * may be used to endorse or promote products derived from this software
56 1.1.2.2 thorpej * without specific prior written permission.
57 1.1.2.2 thorpej *
58 1.1.2.2 thorpej * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
59 1.1.2.2 thorpej * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
60 1.1.2.2 thorpej * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
61 1.1.2.2 thorpej * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
62 1.1.2.2 thorpej * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
63 1.1.2.2 thorpej * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
64 1.1.2.2 thorpej * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
65 1.1.2.2 thorpej * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
66 1.1.2.2 thorpej * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
67 1.1.2.2 thorpej * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
68 1.1.2.2 thorpej * SUCH DAMAGE.
69 1.1.2.2 thorpej *
70 1.1.2.2 thorpej */
71 1.1.2.2 thorpej
72 1.1.2.2 thorpej /*
73 1.1.2.2 thorpej * Routines defined by layerfs
74 1.1.2.2 thorpej */
75 1.1.2.2 thorpej
76 1.1.2.2 thorpej /* misc routines in layer_subr.c */
77 1.1.2.2 thorpej void layerfs_init __P((void));
78 1.1.2.2 thorpej int layer_node_alloc __P((struct mount *, struct vnode *, struct vnode **));
79 1.1.2.2 thorpej int layer_node_create __P((struct mount *, struct vnode *, struct vnode **));
80 1.1.2.2 thorpej struct vnode *
81 1.1.2.2 thorpej layer_node_find __P((struct mount *, struct vnode *));
82 1.1.2.2 thorpej #define LOG2_SIZEVNODE 7 /* log2(sizeof struct vnode) */
83 1.1.2.2 thorpej #define LAYER_NHASH(lmp, vp) \
84 1.1.2.2 thorpej (&((lmp)->layerm_node_hashtbl[(((u_long)vp)>>LOG2_SIZEVNODE) & \
85 1.1.2.2 thorpej (lmp)->layerm_node_hash]))
86 1.1.2.2 thorpej
87 1.1.2.2 thorpej /* vfs routines */
88 1.1.2.2 thorpej int layerfs_start __P((struct mount *, int, struct proc *));
89 1.1.2.2 thorpej int layerfs_root __P((struct mount *, struct vnode **));
90 1.1.2.2 thorpej int layerfs_quotactl __P((struct mount *, int, uid_t, caddr_t,
91 1.1.2.2 thorpej struct proc *));
92 1.1.2.2 thorpej int layerfs_statfs __P((struct mount *, struct statfs *, struct proc *));
93 1.1.2.2 thorpej int layerfs_sync __P((struct mount *, int, struct ucred *, struct proc *));
94 1.1.2.2 thorpej int layerfs_vget __P((struct mount *, ino_t, struct vnode **));
95 1.1.2.2 thorpej int layerfs_fhtovp __P((struct mount *, struct fid *, struct vnode **));
96 1.1.2.2 thorpej int layerfs_checkexp __P((struct mount *, struct mbuf *, int *,
97 1.1.2.2 thorpej struct ucred **));
98 1.1.2.2 thorpej int layerfs_vptofh __P((struct vnode *, struct fid *));
99 1.1.2.2 thorpej int layerfs_sysctl __P((int *, u_int, void *, size_t *, void *, size_t,
100 1.1.2.2 thorpej struct proc *));
101 1.1.2.2 thorpej
102 1.1.2.2 thorpej /* VOP routines */
103 1.1.2.2 thorpej int layer_bypass __P((void *));
104 1.1.2.2 thorpej int layer_getattr __P((void *));
105 1.1.2.2 thorpej int layer_inactive __P((void *));
106 1.1.2.2 thorpej int layer_reclaim __P((void *));
107 1.1.2.2 thorpej int layer_print __P((void *));
108 1.1.2.2 thorpej int layer_strategy __P((void *));
109 1.1.2.2 thorpej int layer_bwrite __P((void *));
110 1.1.2.2 thorpej int layer_bmap __P((void *));
111 1.1.2.2 thorpej int layer_lock __P((void *));
112 1.1.2.2 thorpej int layer_unlock __P((void *));
113 1.1.2.2 thorpej int layer_islocked __P((void *));
114 1.1.2.2 thorpej int layer_fsync __P((void *));
115 1.1.2.2 thorpej int layer_lookup __P((void *));
116 1.1.2.2 thorpej int layer_setattr __P((void *));
117 1.1.2.2 thorpej int layer_access __P((void *));
118 1.1.2.2 thorpej int layer_open __P((void *));
119