1 #ifndef _NCPLIB_H
2 #define _NCPLIB_H
3
4 #include <linux/fs.h>
5 #include <linux/ncp.h>
6 #include <linux/ncp_fs.h>
7 #include <linux/ncp_fs_sb.h>
8 #include <linux/types.h>
9 #include <linux/errno.h>
10 #include <linux/malloc.h>
11 #include <linux/stat.h>
12 #include <linux/fcntl.h>
13 #include <asm/segment.h>
14 #include <asm/string.h>
15
16 #include <linux/ncp.h>
17
18 int
19 ncp_negotiate_buffersize(struct ncp_server *server, int size,
20 int *target);
21 int
22 ncp_get_encryption_key(struct ncp_server *server,
23 char *target);
24 int
25 ncp_get_bindery_object_id(struct ncp_server *server,
26 int object_type, char *object_name,
27 struct ncp_bindery_object *target);
28 int
29 ncp_login_encrypted(struct ncp_server *server,
30 struct ncp_bindery_object *object,
31 unsigned char *key,
32 unsigned char *passwd);
33 int
34 ncp_login_user(struct ncp_server *server,
35 unsigned char *username,
36 unsigned char *password);
37 int
38 ncp_get_volume_info_with_number(struct ncp_server *server, int n,
39 struct ncp_volume_info *target);
40
41 int
42 ncp_get_volume_number(struct ncp_server *server, const char *name,
43 int *target);
44
45 int
46 ncp_file_search_init(struct ncp_server *server,
47 int dir_handle, const char *path,
48 struct ncp_filesearch_info *target);
49
50 int
51 ncp_file_search_continue(struct ncp_server *server,
52 struct ncp_filesearch_info *fsinfo,
53 int attributes, const char *path,
54 struct ncp_file_info *target);
55
56 int
57 ncp_get_finfo(struct ncp_server *server,
58 int dir_handle, const char *path, const char *name,
59 struct ncp_file_info *target);
60
61 int
62 ncp_open_file(struct ncp_server *server,
63 int dir_handle, const char *path,
64 int attr, int access,
65 struct ncp_file_info *target);
66 int
67 ncp_close_file(struct ncp_server *server, const char *file_id);
68
69 int
70 ncp_create_newfile(struct ncp_server *server,
71 int dir_handle, const char *path,
72 int attr,
73 struct ncp_file_info *target);
74
75 int
76 ncp_create_file(struct ncp_server *server,
77 int dir_handle, const char *path,
78 int attr,
79 struct ncp_file_info *target);
80
81 int
82 ncp_erase_file(struct ncp_server *server,
83 int dir_handle, const char *path,
84 int attr);
85
86 int
87 ncp_rename_file(struct ncp_server *server,
88 int old_handle, const char *old_path,
89 int attr,
90 int new_handle, const char *new_path);
91
92 int
93 ncp_create_directory(struct ncp_server *server,
94 int dir_handle, const char *path,
95 int inherit_mask);
96
97 int
98 ncp_delete_directory(struct ncp_server *server,
99 int dir_handle, const char *path);
100
101 int
102 ncp_rename_directory(struct ncp_server *server,
103 int dir_handle,
104 const char *old_path, const char *new_path);
105
106 int
107 ncp_read(struct ncp_server *server, const char *file_id,
108 __u32 offset, __u16 to_read,
109 char *target, int *bytes_read);
110
111 int
112 ncp_write(struct ncp_server *server, const char *file_id,
113 __u32 offset, __u16 to_write,
114 const char *source, int *bytes_written);
115
116 int
117 ncp_do_lookup(struct ncp_server *server,
118 struct nw_info_struct *dir,
119 char *path,
120 struct nw_info_struct *target);
121
122 int
123 ncp_modify_file_or_subdir_dos_info(struct ncp_server *server,
124 struct nw_info_struct *file,
125 __u32 info_mask,
126 struct nw_modify_dos_info *info);
127
128 int
129 ncp_del_file_or_subdir(struct ncp_server *server,
130 struct nw_info_struct *dir, char *name);
131
132 int
133 ncp_open_create_file_or_subdir(struct ncp_server *server,
134 struct nw_info_struct *dir, char *name,
135 int open_create_mode,
136 __u32 create_attributes,
137 int desired_acc_rights,
138 struct nw_file_info *target);
139
140 int
141 ncp_initialize_search(struct ncp_server *server,
142 struct nw_info_struct *dir,
143 struct nw_search_sequence *target);
144
145 int
146 ncp_search_for_file_or_subdir(struct ncp_server *server,
147 struct nw_search_sequence *seq,
148 struct nw_info_struct *target);
149
150 int
151 ncp_ren_or_mov_file_or_subdir(struct ncp_server *server,
152 struct nw_info_struct *old_dir, char *old_name,
153 struct nw_info_struct *new_dir, char *new_name);
154
155
156 #endif