Add the DragonFly cvs id and perform general cleanups on cvs/rcs/sccs ids. Most
[dragonfly.git] / sys / vfs / nwfs / nwfs_subr.h
1 /*
2  * Copyright (c) 1999, Boris Popov
3  * All rights reserved.
4  *
5  * Redistribution and use in source and binary forms, with or without
6  * modification, are permitted provided that the following conditions
7  * are met:
8  * 1. Redistributions of source code must retain the above copyright
9  *    notice, this list of conditions and the following disclaimer.
10  * 2. Redistributions in binary form must reproduce the above copyright
11  *    notice, this list of conditions and the following disclaimer in the
12  *    documentation and/or other materials provided with the distribution.
13  * 3. All advertising materials mentioning features or use of this software
14  *    must display the following acknowledgement:
15  *    This product includes software developed by Boris Popov.
16  * 4. Neither the name of the author nor the names of any co-contributors
17  *    may be used to endorse or promote products derived from this software
18  *    without specific prior written permission.
19  *
20  * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
21  * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
22  * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
23  * ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
24  * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
25  * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
26  * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
27  * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
28  * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
29  * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
30  * SUCH DAMAGE.
31  *
32  * $FreeBSD: src/sys/nwfs/nwfs_subr.h,v 1.2.2.1 2000/04/17 08:34:20 bp Exp $
33  * $DragonFly: src/sys/vfs/nwfs/nwfs_subr.h,v 1.2 2003/06/17 04:28:54 dillon Exp $
34  */
35 #ifndef _NWFS_SUBR_H_
36 #define _NWFS_SUBR_H_
37
38 extern int nwfs_debuglevel;
39
40 #ifdef MALLOC_DECLARE
41 MALLOC_DECLARE(M_NWFSDATA);
42 #endif
43
44 struct ncp_conn;
45 struct ncp_nlstables;
46 struct ncp_open_info;
47 struct nw_entry_info;
48 struct nw_search_info;
49 struct nwmount;
50 struct proc;
51 struct timespec;
52 struct ucred;
53 struct vattr;
54 struct vnode;
55
56 int  ncp_initsearch(struct vnode *dvp,struct proc *p,struct ucred *cred);
57 int  ncp_search_for_file_or_subdir(struct nwmount *nmp,struct nw_search_seq *seq,
58                 struct nw_entry_info *target,
59                 struct proc *p,struct ucred *cred);
60 int  ncp_lookup(struct vnode *dvp, int len, char *name, struct nw_entry_info *fap,
61                 struct proc *p,struct ucred *cred);
62 int  ncp_lookup_volume(struct ncp_conn *conn, char *volname, 
63                 u_char *volNum, u_int32_t *dirEnt,
64                 struct proc *p,struct ucred *cred);
65 int  ncp_close_file(struct ncp_conn *conn, ncp_fh *fh,
66                 struct proc *p,struct ucred *cred);
67 int  ncp_open_create_file_or_subdir(struct nwmount *nmp,struct vnode *dvp, int namelen,char *name,
68                 int open_create_mode, u_int32_t create_attributes,
69                 int desired_acc_rights, struct ncp_open_info *nop,
70                 struct proc *p,struct ucred *cred);
71 int  ncp_DeleteNSEntry(struct nwmount *nmp, 
72                 u_int32_t dirent, int namelen, char *name,
73                 struct proc *p,struct ucred *cred);
74 int  ncp_nsrename(struct ncp_conn *conn, int volume, int ns, int oldtype, 
75         struct ncp_nlstables *nt,
76         nwdirent fdir, char *old_name, int oldlen,
77         nwdirent tdir, char *new_name, int newlen,
78         struct proc *p, struct ucred *cred);
79 int  ncp_obtain_info(struct nwmount *nmp, u_int32_t dirent,
80                 int namelen, char *path, struct nw_entry_info *target,
81                 struct proc *p,struct ucred *cred);
82 int  ncp_modify_file_or_subdir_dos_info(struct nwmount *nmp, struct vnode *vp, 
83                 u_int32_t info_mask,
84                 struct nw_modify_dos_info *info,
85                 struct proc *p,struct ucred *cred);
86 int  ncp_setattr(struct vnode *,struct vattr *,struct ucred *,struct proc *);
87 int  ncp_get_namespaces(struct ncp_conn *conn, u_int32_t volume, int *nsf,
88                 struct proc *p,struct ucred *cred);
89 int  ncp_get_volume_info_with_number(struct ncp_conn *conn, 
90                 int n, struct ncp_volume_info *target,
91                 struct proc *p,struct ucred *cred);
92
93 void ncp_unix2dostime (struct timespec *tsp, int tz, u_int16_t *ddp, 
94              u_int16_t *dtp, u_int8_t *dhp);
95 void ncp_dos2unixtime (u_int dd, u_int dt, u_int dh, int tz, struct timespec *tsp);
96
97 #endif /* !_NWFS_SUBR_H_ */