Annotation of sys/nfs/nfs_var.h, Revision 1.1
1.1 ! nbrk 1: /* $OpenBSD: nfs_var.h,v 1.28 2007/06/21 22:59:49 thib Exp $ */
! 2: /* $NetBSD: nfs_var.h,v 1.3 1996/02/18 11:53:54 fvdl Exp $ */
! 3:
! 4: /*
! 5: * Copyright (c) 1996 Christos Zoulas. All rights reserved.
! 6: *
! 7: * Redistribution and use in source and binary forms, with or without
! 8: * modification, are permitted provided that the following conditions
! 9: * are met:
! 10: * 1. Redistributions of source code must retain the above copyright
! 11: * notice, this list of conditions and the following disclaimer.
! 12: * 2. Redistributions in binary form must reproduce the above copyright
! 13: * notice, this list of conditions and the following disclaimer in the
! 14: * documentation and/or other materials provided with the distribution.
! 15: * 3. All advertising materials mentioning features or use of this software
! 16: * must display the following acknowledgement:
! 17: * This product includes software developed by Christos Zoulas.
! 18: * 4. The name of the author may not be used to endorse or promote products
! 19: * derived from this software without specific prior written permission.
! 20: *
! 21: * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
! 22: * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
! 23: * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
! 24: * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
! 25: * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
! 26: * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
! 27: * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
! 28: * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
! 29: * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
! 30: * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
! 31: */
! 32:
! 33: /*
! 34: * XXX needs <nfs/rpcv2.h> and <nfs/nfs.h> because of typedefs
! 35: */
! 36:
! 37: struct vnode;
! 38: struct uio;
! 39: struct ucred;
! 40: struct proc;
! 41: struct buf;
! 42: struct nfs_diskless;
! 43: struct sockaddr_in;
! 44: struct nfs_dlmount;
! 45: struct vnode;
! 46: struct nfsd;
! 47: struct mbuf;
! 48: struct file;
! 49: struct nfssvc_sock;
! 50: struct nfsmount;
! 51: struct socket;
! 52: struct nfsreq;
! 53: struct vattr;
! 54: struct nameidata;
! 55: struct nfsnode;
! 56: struct sillyrename;
! 57: struct componentname;
! 58: struct nfsd_srvargs;
! 59: struct nfsrv_descript;
! 60: struct nfs_fattr;
! 61: union nethostaddr;
! 62:
! 63: /* nfs_bio.c */
! 64: int nfs_bioread(struct vnode *, struct uio *, int, struct ucred *);
! 65: int nfs_write(void *);
! 66: struct buf *nfs_getcacheblk(struct vnode *, daddr64_t, int, struct proc *);
! 67: int nfs_vinvalbuf(struct vnode *, int, struct ucred *, struct proc *,
! 68: int);
! 69: int nfs_asyncio(struct buf *);
! 70: int nfs_doio(struct buf *, struct proc *);
! 71:
! 72: /* nfs_boot.c */
! 73: int nfs_boot_init(struct nfs_diskless *, struct proc *);
! 74:
! 75: /* nfs_node.c */
! 76: void nfs_nhinit(void);
! 77: int nfs_nget(struct mount *, nfsfh_t *, int, struct nfsnode **);
! 78: int nfs_inactive(void *);
! 79: int nfs_reclaim(void *);
! 80:
! 81: /* nfs_vnops.c */
! 82: int nfs_poll(void *);
! 83: int nfs_null(struct vnode *, struct ucred *, struct proc *);
! 84: int nfs_access(void *);
! 85: int nfs_open(void *);
! 86: int nfs_close(void *);
! 87: int nfs_getattr(void *);
! 88: int nfs_setattr(void *);
! 89: int nfs_setattrrpc(struct vnode *, struct vattr *, struct ucred *,
! 90: struct proc *);
! 91: int nfs_lookup(void *);
! 92: int nfs_read(void *);
! 93: int nfs_readlink(void *);
! 94: int nfs_readlinkrpc(struct vnode *, struct uio *, struct ucred *);
! 95: int nfs_readrpc(struct vnode *, struct uio *);
! 96: int nfs_writerpc(struct vnode *, struct uio *, int *, int *);
! 97: int nfs_mknodrpc(struct vnode *, struct vnode **, struct componentname *,
! 98: struct vattr *);
! 99: int nfs_mknod(void *);
! 100: int nfs_create(void *);
! 101: int nfs_remove(void *);
! 102: int nfs_removeit(struct sillyrename *);
! 103: int nfs_removerpc(struct vnode *, char *, int, struct ucred *,
! 104: struct proc *);
! 105: int nfs_rename(void *);
! 106: int nfs_renameit(struct vnode *, struct componentname *,
! 107: struct sillyrename *);
! 108: int nfs_renamerpc(struct vnode *, char *, int, struct vnode *, char *, int,
! 109: struct ucred *, struct proc *);
! 110: int nfs_link(void *);
! 111: int nfs_symlink(void *);
! 112: int nfs_mkdir(void *);
! 113: int nfs_rmdir(void *);
! 114: int nfs_readdir(void *);
! 115: int nfs_readdirrpc(struct vnode *, struct uio *, struct ucred *, int *);
! 116: int nfs_readdirplusrpc(struct vnode *, struct uio *, struct ucred *, int *);
! 117: int nfs_sillyrename(struct vnode *, struct vnode *,
! 118: struct componentname *);
! 119: int nfs_lookitup(struct vnode *, char *, int, struct ucred *,
! 120: struct proc *, struct nfsnode **);
! 121: int nfs_commit(struct vnode *, u_quad_t, int, struct proc *);
! 122: int nfs_bmap(void *);
! 123: int nfs_strategy(void *);
! 124: int nfs_mmap(void *);
! 125: int nfs_fsync(void *);
! 126: int nfs_flush(struct vnode *, struct ucred *, int, struct proc *, int);
! 127: int nfs_pathconf(void *);
! 128: int nfs_advlock(void *);
! 129: int nfs_print(void *);
! 130: int nfs_blkatoff(void *);
! 131: int nfs_valloc(void *);
! 132: int nfs_vfree(void *);
! 133: int nfs_truncate(void *);
! 134: int nfs_update(void *);
! 135: int nfs_bwrite(void *);
! 136: int nfs_writebp(struct buf *, int);
! 137: int nfsspec_access(void *);
! 138: int nfsspec_read(void *);
! 139: int nfsspec_write(void *);
! 140: int nfsspec_close(void *);
! 141: int nfsfifo_read(void *);
! 142: int nfsfifo_write(void *);
! 143: int nfsfifo_close(void *);
! 144: int nfsfifo_reclaim(void *);
! 145:
! 146: #define nfs_ioctl ((int (*)(void *))enoioctl)
! 147: #define nfs_revoke vop_generic_revoke
! 148: #define nfs_lock vop_generic_lock
! 149: #define nfs_unlock vop_generic_unlock
! 150: #define nfs_islocked vop_generic_islocked
! 151:
! 152: /* nfs_serv.c */
! 153: int nfsrv3_access(struct nfsrv_descript *, struct nfssvc_sock *,
! 154: struct proc *, struct mbuf **);
! 155: int nfsrv_getattr(struct nfsrv_descript *, struct nfssvc_sock *,
! 156: struct proc *, struct mbuf **);
! 157: int nfsrv_setattr(struct nfsrv_descript *, struct nfssvc_sock *,
! 158: struct proc *, struct mbuf **);
! 159: int nfsrv_lookup(struct nfsrv_descript *, struct nfssvc_sock *,
! 160: struct proc *, struct mbuf **);
! 161: int nfsrv_readlink(struct nfsrv_descript *, struct nfssvc_sock *,
! 162: struct proc *, struct mbuf **);
! 163: int nfsrv_read(struct nfsrv_descript *, struct nfssvc_sock *,
! 164: struct proc *, struct mbuf **);
! 165: int nfsrv_write(struct nfsrv_descript *, struct nfssvc_sock *,
! 166: struct proc *, struct mbuf **);
! 167: int nfsrv_writegather(struct nfsrv_descript **, struct nfssvc_sock *,
! 168: struct proc *, struct mbuf **);
! 169: void nfsrvw_coalesce(struct nfsrv_descript *, struct nfsrv_descript *);
! 170: int nfsrv_create(struct nfsrv_descript *, struct nfssvc_sock *,
! 171: struct proc *, struct mbuf **);
! 172: int nfsrv_mknod(struct nfsrv_descript *, struct nfssvc_sock *,
! 173: struct proc *, struct mbuf **);
! 174: int nfsrv_remove(struct nfsrv_descript *, struct nfssvc_sock *,
! 175: struct proc *, struct mbuf **);
! 176: int nfsrv_rename(struct nfsrv_descript *, struct nfssvc_sock *,
! 177: struct proc *, struct mbuf **);
! 178: int nfsrv_link(struct nfsrv_descript *, struct nfssvc_sock *,
! 179: struct proc *, struct mbuf **);
! 180: int nfsrv_symlink(struct nfsrv_descript *, struct nfssvc_sock *,
! 181: struct proc *, struct mbuf **);
! 182: int nfsrv_mkdir(struct nfsrv_descript *, struct nfssvc_sock *,
! 183: struct proc *, struct mbuf **);
! 184: int nfsrv_rmdir(struct nfsrv_descript *, struct nfssvc_sock *,
! 185: struct proc *, struct mbuf **);
! 186: int nfsrv_readdir(struct nfsrv_descript *, struct nfssvc_sock *,
! 187: struct proc *, struct mbuf **);
! 188: int nfsrv_readdirplus(struct nfsrv_descript *, struct nfssvc_sock *,
! 189: struct proc *, struct mbuf **);
! 190: int nfsrv_commit(struct nfsrv_descript *, struct nfssvc_sock *,
! 191: struct proc *, struct mbuf **);
! 192: int nfsrv_statfs(struct nfsrv_descript *, struct nfssvc_sock *,
! 193: struct proc *, struct mbuf **);
! 194: int nfsrv_fsinfo(struct nfsrv_descript *, struct nfssvc_sock *,
! 195: struct proc *, struct mbuf **);
! 196: int nfsrv_pathconf(struct nfsrv_descript *, struct nfssvc_sock *,
! 197: struct proc *, struct mbuf **);
! 198: int nfsrv_null(struct nfsrv_descript *, struct nfssvc_sock *,
! 199: struct proc *, struct mbuf **);
! 200: int nfsrv_noop(struct nfsrv_descript *, struct nfssvc_sock *,
! 201: struct proc *, struct mbuf **);
! 202: int nfsrv_access(struct vnode *, int, struct ucred *, int, struct proc *,
! 203: int);
! 204:
! 205: /* nfs_socket.c */
! 206: int nfs_connect(struct nfsmount *, struct nfsreq *);
! 207: int nfs_reconnect(struct nfsreq *);
! 208: void nfs_disconnect(struct nfsmount *);
! 209: int nfs_send(struct socket *, struct mbuf *, struct mbuf *,
! 210: struct nfsreq *);
! 211: int nfs_receive(struct nfsreq *, struct mbuf **, struct mbuf **);
! 212: int nfs_reply(struct nfsreq *);
! 213: int nfs_request(struct vnode *, struct mbuf *, int, struct proc *,
! 214: struct ucred *, struct mbuf **, struct mbuf **,
! 215: caddr_t *);
! 216: int nfs_rephead(int, struct nfsrv_descript *, struct nfssvc_sock *, int,
! 217: u_quad_t *, struct mbuf **, struct mbuf **, caddr_t *);
! 218: void nfs_timer(void *);
! 219: int nfs_sigintr(struct nfsmount *, struct nfsreq *, struct proc *);
! 220: int nfs_sndlock(int *, struct nfsreq *);
! 221: void nfs_sndunlock(int *);
! 222: int nfs_rcvlock(struct nfsreq *);
! 223: void nfs_rcvunlock(int *);
! 224: int nfs_getreq(struct nfsrv_descript *, struct nfsd *, int);
! 225: int nfs_msg(struct proc *, char *, char *);
! 226: void nfsrv_rcv(struct socket *, caddr_t, int);
! 227: int nfsrv_getstream(struct nfssvc_sock *, int);
! 228: int nfsrv_dorec(struct nfssvc_sock *, struct nfsd *,
! 229: struct nfsrv_descript **);
! 230: void nfsrv_wakenfsd(struct nfssvc_sock *);
! 231:
! 232: /* nfs_srvcache.c */
! 233: void nfsrv_initcache(void );
! 234: int nfsrv_getcache(struct nfsrv_descript *, struct nfssvc_sock *,
! 235: struct mbuf **);
! 236: void nfsrv_updatecache(struct nfsrv_descript *, int, struct mbuf *);
! 237: void nfsrv_cleancache(void);
! 238:
! 239: /* nfs_subs.c */
! 240: struct mbuf *nfsm_reqh(struct vnode *, u_long, int, caddr_t *);
! 241: struct mbuf *nfsm_rpchead(struct ucred *, int, int, int, int, char *, int,
! 242: char *, struct mbuf *, int, struct mbuf **,
! 243: u_int32_t *);
! 244: int nfsm_mbuftouio(struct mbuf **, struct uio *, int, caddr_t *);
! 245: int nfsm_uiotombuf(struct uio *, struct mbuf **, int, caddr_t *);
! 246: int nfsm_disct(struct mbuf **, caddr_t *, int, int, caddr_t *);
! 247: int nfs_adv(struct mbuf **, caddr_t *, int, int);
! 248: int nfsm_strtmbuf(struct mbuf **, char **, char *, long);
! 249: int nfs_vfs_init(struct vfsconf *);
! 250: int nfs_loadattrcache(struct vnode **, struct mbuf **, caddr_t *,
! 251: struct vattr *);
! 252: int nfs_getattrcache(struct vnode *, struct vattr *);
! 253: int nfs_namei(struct nameidata *, fhandle_t *, int, struct nfssvc_sock *,
! 254: struct mbuf *, struct mbuf **, caddr_t *, struct vnode **,
! 255: struct proc *, int);
! 256: void nfsm_adj(struct mbuf *, int, int);
! 257: void nfsm_srvwcc(struct nfsrv_descript *, int, struct vattr *, int,
! 258: struct vattr *, struct mbuf **, char **);
! 259: void nfsm_srvpostopattr(struct nfsrv_descript *, int, struct vattr *,
! 260: struct mbuf **, char **);
! 261: void nfsm_srvfattr(struct nfsrv_descript *, struct vattr *,
! 262: struct nfs_fattr *);
! 263: int nfsrv_fhtovp(fhandle_t *, int, struct vnode **, struct ucred *,
! 264: struct nfssvc_sock *, struct mbuf *, int *, int);
! 265: int netaddr_match(int, union nethostaddr *, struct mbuf *);
! 266: void nfs_clearcommit(struct mount *);
! 267: int nfs_in_committed_range(struct vnode *, struct buf *);
! 268: int nfs_in_tobecommitted_range(struct vnode *, struct buf *);
! 269: void nfs_add_committed_range(struct vnode *, struct buf *);
! 270: void nfs_del_committed_range(struct vnode *, struct buf *);
! 271: void nfs_add_tobecommitted_range(struct vnode *, struct buf *);
! 272: void nfs_del_tobecommitted_range(struct vnode *, struct buf *);
! 273: void nfs_merge_commit_ranges(struct vnode *);
! 274: int nfsrv_errmap(struct nfsrv_descript *, int);
! 275: void nfsrvw_sort(gid_t *, int);
! 276: void nfsrv_setcred(struct ucred *, struct ucred *);
! 277:
! 278: /* nfs_syscalls.c */
! 279: int sys_nfssvc(struct proc *, void *, register_t *);
! 280: int nfssvc_addsock(struct file *, struct mbuf *);
! 281: int nfssvc_nfsd(struct nfsd_srvargs *, caddr_t, struct proc *);
! 282: void nfsrv_zapsock(struct nfssvc_sock *);
! 283: void nfsrv_slpderef(struct nfssvc_sock *);
! 284: void nfsrv_init(int);
! 285: int nfssvc_iod(struct proc *);
! 286: void start_nfsio(void *);
! 287: void nfs_getset_niothreads(int);
! 288: int nfs_getauth(struct nfsmount *, struct nfsreq *, struct ucred *,
! 289: char **, int *, char *, int *, NFSKERBKEY_T);
! 290: int nfs_getnickauth(struct nfsmount *, struct ucred *, char **, int *,
! 291: char *, int);
! 292: int nfs_savenickauth(struct nfsmount *, struct ucred *, int, NFSKERBKEY_T,
! 293: struct mbuf **, char **, struct mbuf *);
! 294:
! 295: /* nfs_kq.c */
! 296: int nfs_kqfilter(void *);
! 297:
CVSweb