ntfs_subr.h revision 1.1.2.2 1 1.1.2.2 thorpej /* $NetBSD: ntfs_subr.h,v 1.1.2.2 2002/12/29 19:56:16 thorpej Exp $ */
2 1.1.2.2 thorpej
3 1.1.2.2 thorpej /*-
4 1.1.2.2 thorpej * Copyright (c) 1998, 1999 Semen Ustimenko
5 1.1.2.2 thorpej * All rights reserved.
6 1.1.2.2 thorpej *
7 1.1.2.2 thorpej * Redistribution and use in source and binary forms, with or without
8 1.1.2.2 thorpej * modification, are permitted provided that the following conditions
9 1.1.2.2 thorpej * are met:
10 1.1.2.2 thorpej * 1. Redistributions of source code must retain the above copyright
11 1.1.2.2 thorpej * notice, this list of conditions and the following disclaimer.
12 1.1.2.2 thorpej * 2. Redistributions in binary form must reproduce the above copyright
13 1.1.2.2 thorpej * notice, this list of conditions and the following disclaimer in the
14 1.1.2.2 thorpej * documentation and/or other materials provided with the distribution.
15 1.1.2.2 thorpej *
16 1.1.2.2 thorpej * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
17 1.1.2.2 thorpej * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
18 1.1.2.2 thorpej * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
19 1.1.2.2 thorpej * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
20 1.1.2.2 thorpej * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
21 1.1.2.2 thorpej * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
22 1.1.2.2 thorpej * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
23 1.1.2.2 thorpej * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
24 1.1.2.2 thorpej * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
25 1.1.2.2 thorpej * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
26 1.1.2.2 thorpej * SUCH DAMAGE.
27 1.1.2.2 thorpej *
28 1.1.2.2 thorpej * Id: ntfs_subr.h,v 1.4 1999/05/12 09:43:02 semenu Exp
29 1.1.2.2 thorpej */
30 1.1.2.2 thorpej
31 1.1.2.2 thorpej #define VA_LOADED 0x0001
32 1.1.2.2 thorpej #define VA_PRELOADED 0x0002
33 1.1.2.2 thorpej
34 1.1.2.2 thorpej struct ntvattr {
35 1.1.2.2 thorpej LIST_ENTRY(ntvattr) va_list;
36 1.1.2.2 thorpej
37 1.1.2.2 thorpej u_int32_t va_vflag;
38 1.1.2.2 thorpej struct vnode *va_vp;
39 1.1.2.2 thorpej struct ntnode *va_ip;
40 1.1.2.2 thorpej
41 1.1.2.2 thorpej u_int32_t va_flag;
42 1.1.2.2 thorpej u_int32_t va_type;
43 1.1.2.2 thorpej u_int8_t va_namelen;
44 1.1.2.2 thorpej char va_name[NTFS_MAXATTRNAME];
45 1.1.2.2 thorpej
46 1.1.2.2 thorpej u_int32_t va_compression;
47 1.1.2.2 thorpej u_int32_t va_compressalg;
48 1.1.2.2 thorpej u_int32_t va_datalen;
49 1.1.2.2 thorpej u_int32_t va_allocated;
50 1.1.2.2 thorpej cn_t va_vcnstart;
51 1.1.2.2 thorpej cn_t va_vcnend;
52 1.1.2.2 thorpej u_int16_t va_index;
53 1.1.2.2 thorpej union {
54 1.1.2.2 thorpej struct {
55 1.1.2.2 thorpej cn_t * cn;
56 1.1.2.2 thorpej cn_t * cl;
57 1.1.2.2 thorpej u_long cnt;
58 1.1.2.2 thorpej } vrun;
59 1.1.2.2 thorpej caddr_t datap;
60 1.1.2.2 thorpej struct attr_name *name;
61 1.1.2.2 thorpej struct attr_indexroot *iroot;
62 1.1.2.2 thorpej struct attr_indexalloc *ialloc;
63 1.1.2.2 thorpej } va_d;
64 1.1.2.2 thorpej };
65 1.1.2.2 thorpej #define va_vruncn va_d.vrun.cn
66 1.1.2.2 thorpej #define va_vruncl va_d.vrun.cl
67 1.1.2.2 thorpej #define va_vruncnt va_d.vrun.cnt
68 1.1.2.2 thorpej #define va_datap va_d.datap
69 1.1.2.2 thorpej #define va_a_name va_d.name
70 1.1.2.2 thorpej #define va_a_iroot va_d.iroot
71 1.1.2.2 thorpej #define va_a_ialloc va_d.ialloc
72 1.1.2.2 thorpej
73 1.1.2.2 thorpej int ntfs_procfixups __P(( struct ntfsmount *, u_int32_t, caddr_t, size_t ));
74 1.1.2.2 thorpej int ntfs_parserun __P(( cn_t *, cn_t *, u_int8_t *, u_long, u_long *));
75 1.1.2.2 thorpej int ntfs_runtocn __P(( cn_t *, struct ntfsmount *, u_int8_t *, u_long, cn_t));
76 1.1.2.2 thorpej int ntfs_readntvattr_plain __P(( struct ntfsmount *, struct ntnode *, struct ntvattr *, off_t, size_t, void *,size_t *, struct uio *));
77 1.1.2.2 thorpej int ntfs_readattr_plain __P(( struct ntfsmount *, struct ntnode *, u_int32_t, char *, off_t, size_t, void *,size_t *, struct uio *));
78 1.1.2.2 thorpej int ntfs_readattr __P(( struct ntfsmount *, struct ntnode *, u_int32_t, char *, off_t, size_t, void *, struct uio *));
79 1.1.2.2 thorpej int ntfs_filesize __P(( struct ntfsmount *, struct fnode *, u_int64_t *, u_int64_t *));
80 1.1.2.2 thorpej int ntfs_times __P(( struct ntfsmount *, struct ntnode *, ntfs_times_t *));
81 1.1.2.2 thorpej struct timespec ntfs_nttimetounix __P(( u_int64_t ));
82 1.1.2.2 thorpej int ntfs_ntreaddir __P(( struct ntfsmount *, struct fnode *, u_int32_t, struct attr_indexentry **));
83 1.1.2.2 thorpej int ntfs_runtovrun __P(( cn_t **, cn_t **, u_long *, u_int8_t *));
84 1.1.2.2 thorpej int ntfs_attrtontvattr __P(( struct ntfsmount *, struct ntvattr **, struct attr * ));
85 1.1.2.2 thorpej void ntfs_freentvattr __P(( struct ntvattr * ));
86 1.1.2.2 thorpej int ntfs_loadntvattrs __P(( struct ntfsmount *, struct vnode *, caddr_t, struct ntvattr **));
87 1.1.2.2 thorpej struct ntvattr * ntfs_findntvattr __P(( struct ntfsmount *, struct ntnode *, u_int32_t, cn_t ));
88 1.1.2.2 thorpej int ntfs_ntlookupfile __P((struct ntfsmount *, struct vnode *, struct componentname *, struct vnode **));
89 1.1.2.2 thorpej int ntfs_isnamepermitted __P((struct ntfsmount *, struct attr_indexentry * ));
90 1.1.2.2 thorpej int ntfs_ntvattrrele __P((struct ntvattr * ));
91 1.1.2.2 thorpej int ntfs_ntvattrget __P((struct ntfsmount *, struct ntnode *, u_int32_t, const char *, cn_t , struct ntvattr **));
92 1.1.2.2 thorpej int ntfs_ntlookup __P((struct ntfsmount *, ino_t, struct ntnode **));
93 1.1.2.2 thorpej int ntfs_ntget __P((struct ntnode *));
94 1.1.2.2 thorpej void ntfs_ntref __P((struct ntnode *));
95 1.1.2.2 thorpej void ntfs_ntrele __P((struct ntnode *));
96 1.1.2.2 thorpej void ntfs_ntput __P((struct ntnode *));
97 1.1.2.2 thorpej int ntfs_loadntnode __P(( struct ntfsmount *, struct ntnode * ));
98 1.1.2.2 thorpej int ntfs_writentvattr_plain __P((struct ntfsmount *, struct ntnode *, struct ntvattr *, off_t, size_t, void *, size_t *, struct uio *));
99 1.1.2.2 thorpej int ntfs_writeattr_plain __P((struct ntfsmount *, struct ntnode *, u_int32_t, char *, off_t, size_t, void *, size_t *, struct uio *));
100 1.1.2.2 thorpej void ntfs_toupper_init __P((void));
101 1.1.2.2 thorpej int ntfs_toupper_use __P((struct mount *, struct ntfsmount *));
102 1.1.2.2 thorpej void ntfs_toupper_unuse __P((void));
103 1.1.2.2 thorpej int ntfs_fget __P((struct ntfsmount *, struct ntnode *, int, char *, struct fnode **));
104 1.1.2.2 thorpej void ntfs_frele __P((struct fnode *));
105 1.1.2.2 thorpej
106 1.1.2.2 thorpej /* ntfs_conv.c stuff */
107 1.1.2.2 thorpej ntfs_wget_func_t ntfs_utf8_wget;
108 1.1.2.2 thorpej ntfs_wput_func_t ntfs_utf8_wput;
109 1.1.2.2 thorpej ntfs_wcmp_func_t ntfs_utf8_wcmp;
110