2 * Copyright (c) 1999, Boris Popov
5 * Redistribution and use in source and binary forms, with or without
6 * modification, are permitted provided that the following conditions
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.
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
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.3 2003/06/25 03:56:08 dillon Exp $
38 extern int nwfs_debuglevel
;
41 MALLOC_DECLARE(M_NWFSDATA
);
48 struct nw_search_info
;
57 int ncp_initsearch(struct vnode
*dvp
,struct thread
*td
,struct ucred
*cred
);
58 int ncp_search_for_file_or_subdir(struct nwmount
*nmp
,struct nw_search_seq
*seq
,
59 struct nw_entry_info
*target
,
60 struct thread
*td
,struct ucred
*cred
);
61 int ncp_lookup(struct vnode
*dvp
, int len
, char *name
, struct nw_entry_info
*fap
,
62 struct thread
*td
,struct ucred
*cred
);
63 int ncp_lookup_volume(struct ncp_conn
*conn
, char *volname
,
64 u_char
*volNum
, u_int32_t
*dirEnt
,
65 struct thread
*td
,struct ucred
*cred
);
66 int ncp_close_file(struct ncp_conn
*conn
, ncp_fh
*fh
,
67 struct thread
*td
,struct ucred
*cred
);
68 int 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
,
71 struct thread
*td
,struct ucred
*cred
);
72 int ncp_DeleteNSEntry(struct nwmount
*nmp
,
73 u_int32_t dirent
, int namelen
, char *name
,
74 struct thread
*td
,struct ucred
*cred
);
75 int 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
,
79 struct thread
*td
, struct ucred
*cred
);
80 int ncp_obtain_info(struct nwmount
*nmp
, u_int32_t dirent
,
81 int namelen
, char *path
, struct nw_entry_info
*target
,
82 struct thread
*td
,struct ucred
*cred
);
83 int ncp_modify_file_or_subdir_dos_info(struct nwmount
*nmp
, struct vnode
*vp
,
85 struct nw_modify_dos_info
*info
,
86 struct thread
*td
,struct ucred
*cred
);
87 int ncp_setattr(struct vnode
*,struct vattr
*,struct ucred
*,struct thread
*);
88 int ncp_get_namespaces(struct ncp_conn
*conn
, u_int32_t volume
, int *nsf
,
89 struct thread
*td
,struct ucred
*cred
);
90 int ncp_get_volume_info_with_number(struct ncp_conn
*conn
,
91 int n
, struct ncp_volume_info
*target
,
92 struct thread
*td
,struct ucred
*cred
);
94 void ncp_unix2dostime (struct timespec
*tsp
, int tz
, u_int16_t
*ddp
,
95 u_int16_t
*dtp
, u_int8_t
*dhp
);
96 void ncp_dos2unixtime (u_int dd
, u_int dt
, u_int dh
, int tz
, struct timespec
*tsp
);
98 #endif /* !_NWFS_SUBR_H_ */