proc->thread stage 4: rework the VFS and DEVICE subsystems to take thread
[dragonfly.git] / sys / vfs / nwfs / nwfs_subr.h
CommitLineData
984263bc
MD
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 $
dadab5e9 33 * $DragonFly: src/sys/vfs/nwfs/nwfs_subr.h,v 1.3 2003/06/25 03:56:08 dillon Exp $
984263bc
MD
34 */
35#ifndef _NWFS_SUBR_H_
36#define _NWFS_SUBR_H_
37
38extern int nwfs_debuglevel;
39
40#ifdef MALLOC_DECLARE
41MALLOC_DECLARE(M_NWFSDATA);
42#endif
43
44struct ncp_conn;
45struct ncp_nlstables;
46struct ncp_open_info;
47struct nw_entry_info;
48struct nw_search_info;
49struct nwmount;
50struct proc;
dadab5e9 51struct thread;
984263bc
MD
52struct timespec;
53struct ucred;
54struct vattr;
55struct vnode;
56
dadab5e9 57int ncp_initsearch(struct vnode *dvp,struct thread *td,struct ucred *cred);
984263bc
MD
58int ncp_search_for_file_or_subdir(struct nwmount *nmp,struct nw_search_seq *seq,
59 struct nw_entry_info *target,
dadab5e9 60 struct thread *td,struct ucred *cred);
984263bc 61int ncp_lookup(struct vnode *dvp, int len, char *name, struct nw_entry_info *fap,
dadab5e9 62 struct thread *td,struct ucred *cred);
984263bc
MD
63int ncp_lookup_volume(struct ncp_conn *conn, char *volname,
64 u_char *volNum, u_int32_t *dirEnt,
dadab5e9 65 struct thread *td,struct ucred *cred);
984263bc 66int ncp_close_file(struct ncp_conn *conn, ncp_fh *fh,
dadab5e9 67 struct thread *td,struct ucred *cred);
984263bc
MD
68int ncp_open_create_file_or_subdir(struct nwmount *nmp,struct vnode *dvp, int namelen,char *name,
69 int open_create_mode, u_int32_t create_attributes,
70 int desired_acc_rights, struct ncp_open_info *nop,
dadab5e9 71 struct thread *td,struct ucred *cred);
984263bc
MD
72int ncp_DeleteNSEntry(struct nwmount *nmp,
73 u_int32_t dirent, int namelen, char *name,
dadab5e9 74 struct thread *td,struct ucred *cred);
984263bc
MD
75int ncp_nsrename(struct ncp_conn *conn, int volume, int ns, int oldtype,
76 struct ncp_nlstables *nt,
77 nwdirent fdir, char *old_name, int oldlen,
78 nwdirent tdir, char *new_name, int newlen,
dadab5e9 79 struct thread *td, struct ucred *cred);
984263bc
MD
80int ncp_obtain_info(struct nwmount *nmp, u_int32_t dirent,
81 int namelen, char *path, struct nw_entry_info *target,
dadab5e9 82 struct thread *td,struct ucred *cred);
984263bc
MD
83int ncp_modify_file_or_subdir_dos_info(struct nwmount *nmp, struct vnode *vp,
84 u_int32_t info_mask,
85 struct nw_modify_dos_info *info,
dadab5e9
MD
86 struct thread *td,struct ucred *cred);
87int ncp_setattr(struct vnode *,struct vattr *,struct ucred *,struct thread *);
984263bc 88int ncp_get_namespaces(struct ncp_conn *conn, u_int32_t volume, int *nsf,
dadab5e9 89 struct thread *td,struct ucred *cred);
984263bc
MD
90int ncp_get_volume_info_with_number(struct ncp_conn *conn,
91 int n, struct ncp_volume_info *target,
dadab5e9 92 struct thread *td,struct ucred *cred);
984263bc
MD
93
94void ncp_unix2dostime (struct timespec *tsp, int tz, u_int16_t *ddp,
95 u_int16_t *dtp, u_int8_t *dhp);
96void ncp_dos2unixtime (u_int dd, u_int dt, u_int dh, int tz, struct timespec *tsp);
97
98#endif /* !_NWFS_SUBR_H_ */