2 * Copyright 2000, International Business Machines Corporation and others.
5 * This software has been released under the terms of the IBM Public
6 * License. For details, see the LICENSE file in the top-level source
7 * directory or online at http://www.openafs.org/dl/license10.html
10 #ifndef __SMB_IOCTL_H_ENV__
11 #define __SMB_IOCTL_H_ENV__ 1
14 #include <smb_iocons.h>
16 /* magic file name for ioctl opens */
17 #define SMB_IOCTL_FILENAME CM_IOCTL_FILENAME
18 #define SMB_IOCTL_FILENAME_NOSLASH CM_IOCTL_FILENAME_NOSLASH
20 /* max parms for ioctl, in either direction */
21 #define SMB_IOCTL_MAXDATA CM_IOCTL_MAXDATA
22 #define SMB_IOCTL_MAXPROCS CM_IOCTL_MAXPROCS
28 /* ioctl parameter, while being assembled and/or processed */
29 typedef struct smb_ioctl {
34 struct smb_user *uidp;
36 /* pathname associated with the Tree ID */
37 clientchar_t *tidPathp;
39 /* prefix for subst drives */
45 /* procedure implementing an ioctl */
46 typedef long (smb_ioctlProc_t)(smb_ioctl_t *, struct cm_user *userp);
52 smb_SetupIoctlFid(struct smb_fid *fidp, cm_space_t *prefix);
55 smb_IoctlRead(struct smb_fid *fidp, struct smb_vc *vcp,
56 struct smb_packet *inp, struct smb_packet *outp);
59 smb_IoctlWrite(struct smb_fid *fidp, struct smb_vc *vcp,
60 struct smb_packet *inp, struct smb_packet *outp);
63 smb_IoctlV3Write(struct smb_fid *fidp, struct smb_vc *vcp,
64 struct smb_packet *inp, struct smb_packet *outp);
67 smb_IoctlV3Read(struct smb_fid *fidp, struct smb_vc *vcp,
68 struct smb_packet *inp, struct smb_packet *outp);
71 smb_IoctlReadRaw(struct smb_fid *fidp, struct smb_vc *vcp,
72 struct smb_packet *inp, struct smb_packet *outp);
75 smb_IoctlPrepareRead(struct smb_fid *fidp, smb_ioctl_t *ioctlp, cm_user_t *userp);
78 smb_ParseIoctlPath(smb_ioctl_t *ioctlp, cm_user_t *userp, cm_req_t *reqp,
79 cm_scache_t **scpp, afs_uint32 flags);
82 smb_ParseIoctlParent(smb_ioctl_t *ioctlp, cm_user_t *userp, cm_req_t *reqp,
83 cm_scache_t **scpp, clientchar_t *leafp);
86 smb_IoctlSetToken(struct smb_ioctl *ioctlp, struct cm_user *userp);
89 smb_IoctlGetSMBName(smb_ioctl_t *ioctlp, cm_user_t *userp);
91 extern afs_int32 smb_IoctlGetACL(smb_ioctl_t *ioctlp, cm_user_t *userp);
93 extern afs_int32 smb_IoctlGetFileCellName(smb_ioctl_t *ioctlp, cm_user_t *userp);
95 extern afs_int32 smb_IoctlSetACL(smb_ioctl_t *ioctlp, cm_user_t *userp);
97 extern afs_int32 smb_IoctlFlushAllVolumes(smb_ioctl_t *ioctlp, cm_user_t *userp);
99 extern afs_int32 smb_IoctlFlushVolume(smb_ioctl_t *ioctlp, cm_user_t *userp);
101 extern afs_int32 smb_IoctlFlushFile(smb_ioctl_t *ioctlp, cm_user_t *userp);
103 extern afs_int32 smb_IoctlSetVolumeStatus(smb_ioctl_t *ioctlp, cm_user_t *userp);
105 extern afs_int32 smb_IoctlGetVolumeStatus(smb_ioctl_t *ioctlp, cm_user_t *userp);
107 extern afs_int32 smb_IoctlGetFid(smb_ioctl_t *ioctlp, cm_user_t *userp);
109 extern afs_int32 smb_IoctlGetOwner(smb_ioctl_t *ioctlp, cm_user_t *userp);
111 extern afs_int32 smb_IoctlWhereIs(smb_ioctl_t *ioctlp, cm_user_t *userp);
113 extern afs_int32 smb_IoctlStatMountPoint(smb_ioctl_t *ioctlp, cm_user_t *userp);
115 extern afs_int32 smb_IoctlDeleteMountPoint(smb_ioctl_t *ioctlp, cm_user_t *userp);
117 extern afs_int32 smb_IoctlCheckServers(smb_ioctl_t *ioctlp, cm_user_t *userp);
119 extern afs_int32 smb_IoctlGag(smb_ioctl_t *ioctlp, cm_user_t *userp);
121 extern afs_int32 smb_IoctlCheckVolumes(smb_ioctl_t *ioctlp, cm_user_t *userp);
123 extern afs_int32 smb_IoctlSetCacheSize(smb_ioctl_t *ioctlp, cm_user_t *userp);
125 extern afs_int32 smb_IoctlGetCacheParms(smb_ioctl_t *ioctlp, cm_user_t *userp);
127 extern afs_int32 smb_IoctlGetCell(smb_ioctl_t *ioctlp, cm_user_t *userp);
129 extern afs_int32 smb_IoctlNewCell(smb_ioctl_t *ioctlp, cm_user_t *userp);
131 extern afs_int32 smb_IoctlGetWsCell(smb_ioctl_t *ioctlp, cm_user_t *userp);
133 extern afs_int32 smb_IoctlSysName(smb_ioctl_t *ioctlp, cm_user_t *userp);
135 extern afs_int32 smb_IoctlGetCellStatus(smb_ioctl_t *ioctlp, cm_user_t *userp);
137 extern afs_int32 smb_IoctlSetCellStatus(smb_ioctl_t *ioctlp, cm_user_t *userp);
139 extern afs_int32 smb_IoctlSetSPrefs(smb_ioctl_t *ioctlp, cm_user_t *userp);
141 extern afs_int32 smb_IoctlGetSPrefs(smb_ioctl_t *ioctlp, cm_user_t *userp);
143 extern afs_int32 smb_IoctlStoreBehind(smb_ioctl_t *ioctlp, cm_user_t *userp);
145 extern afs_int32 smb_IoctlCreateMountPoint(smb_ioctl_t *ioctlp, cm_user_t *userp);
147 extern afs_int32 cm_CleanFile(cm_scache_t *scp, cm_user_t *userp, cm_req_t *reqp);
149 extern afs_int32 cm_FlushFile(cm_scache_t *scp, cm_user_t *userp, cm_req_t *reqp);
151 extern afs_int32 cm_FlushVolume(cm_user_t *, cm_req_t *reqp, afs_uint32 cell, afs_uint32 volume);
153 extern afs_int32 cm_FlushParent(cm_scache_t *scp, cm_user_t *userp, cm_req_t *reqp);
155 extern afs_int32 smb_IoctlTraceControl(smb_ioctl_t *ioctlp, cm_user_t *userp);
157 extern afs_int32 smb_IoctlSetToken(smb_ioctl_t *ioctlp, cm_user_t *userp);
159 extern afs_int32 smb_IoctlGetTokenIter(smb_ioctl_t *ioctlp, cm_user_t *userp);
161 extern afs_int32 smb_IoctlGetToken(smb_ioctl_t *ioctlp, cm_user_t *userp);
163 extern afs_int32 smb_IoctlDelToken(smb_ioctl_t *ioctlp, cm_user_t *userp);
165 extern afs_int32 smb_IoctlDelAllToken(smb_ioctl_t *ioctlp, cm_user_t *userp);
167 extern afs_int32 smb_IoctlSymlink(smb_ioctl_t *ioctlp, cm_user_t *userp);
169 extern afs_int32 smb_IoctlIslink(smb_ioctl_t *ioctlp, cm_user_t *userp);
171 extern afs_int32 smb_IoctlListlink(smb_ioctl_t *ioctlp, cm_user_t *userp);
173 extern afs_int32 smb_IoctlDeletelink(smb_ioctl_t *ioctlp, cm_user_t *userp);
175 extern afs_int32 smb_IoctlMakeSubmount(smb_ioctl_t *ioctlp, cm_user_t *userp);
177 extern afs_int32 smb_IoctlGetRxkcrypt(smb_ioctl_t *ioctlp, cm_user_t *userp);
179 extern afs_int32 smb_IoctlSetRxkcrypt(smb_ioctl_t *ioctlp, cm_user_t *userp);
181 extern afs_int32 smb_IoctlShutdown(smb_ioctl_t *ioctlp, cm_user_t *userp);
183 extern afs_int32 smb_IoctlFreemountAddCell(smb_ioctl_t *ioctlp, cm_user_t *userp);
185 extern afs_int32 smb_IoctlFreemountRemoveCell(smb_ioctl_t *ioctlp, cm_user_t *userp);
187 extern afs_int32 smb_IoctlMemoryDump(smb_ioctl_t *ioctlp, cm_user_t *userp);
189 extern afs_int32 smb_IoctlRxStatProcess(smb_ioctl_t *ioctlp, cm_user_t *userp);
191 extern afs_int32 smb_IoctlRxStatPeer(smb_ioctl_t *ioctlp, cm_user_t *userp);
193 extern afs_int32 smb_IoctlUUIDControl(struct smb_ioctl * ioctlp, struct cm_user *userp);
195 extern afs_int32 smb_IoctlPathAvailability(struct smb_ioctl * ioctlp, struct cm_user *userp);
197 extern afs_int32 smb_IoctlGetFileType(smb_ioctl_t *ioctlp, cm_user_t *userp);
199 extern afs_int32 smb_IoctlVolStatTest(struct smb_ioctl *ioctlp, struct cm_user *userp);
201 extern afs_int32 smb_IoctlUnicodeControl(struct smb_ioctl *ioctlp, struct cm_user * userp);
203 extern afs_int32 smb_IoctlSetOwner(struct smb_ioctl *ioctlp, struct cm_user *userp);
205 extern afs_int32 smb_IoctlSetGroup(struct smb_ioctl *ioctlp, struct cm_user *userp);
207 #endif /* __SMB_IOCTL_H_ENV__ */