OpenAFS
OpenAFS distributed network file system
|
00001 /* 00002 * Copyright 2000, International Business Machines Corporation and others. 00003 * All Rights Reserved. 00004 * 00005 * This software has been released under the terms of the IBM Public 00006 * License. For details, see the LICENSE file in the top-level source 00007 * directory or online at http://www.openafs.org/dl/license10.html 00008 */ 00009 00010 #ifndef OPENAFS_WINNT_AFSD_SMB_IOCTL_H 00011 #define OPENAFS_WINNT_AFSD_SMB_IOCTL_H 1 00012 00013 #include <cm_ioctl.h> 00014 #include <smb_iocons.h> 00015 00016 /* magic file name for ioctl opens */ 00017 #define SMB_IOCTL_FILENAME CM_IOCTL_FILENAME 00018 #define SMB_IOCTL_FILENAME_NOSLASH CM_IOCTL_FILENAME_NOSLASH 00019 00020 /* max parms for ioctl, in either direction */ 00021 #define SMB_IOCTL_MAXDATA CM_IOCTL_MAXDATA 00022 #define SMB_IOCTL_MAXPROCS CM_IOCTL_MAXPROCS 00023 00024 struct smb_fid; 00025 struct smb_user; 00026 struct smb_vc; 00027 00028 /* ioctl parameter, while being assembled and/or processed */ 00029 typedef struct smb_ioctl { 00030 /* fid pointer */ 00031 struct smb_fid *fidp; 00032 00033 /* uid pointer */ 00034 struct smb_user *uidp; 00035 00036 /* pathname associated with the Tree ID */ 00037 clientchar_t *tidPathp; 00038 00039 /* prefix for subst drives */ 00040 cm_space_t *prefix; 00041 00042 cm_ioctl_t ioctl; 00043 } smb_ioctl_t; 00044 00045 /* procedure implementing an ioctl */ 00046 typedef long (smb_ioctlProc_t)(smb_ioctl_t *, struct cm_user *userp, afs_uint32 flags); 00047 00048 extern void 00049 smb_InitIoctl(void); 00050 00051 extern void 00052 smb_SetupIoctlFid(struct smb_fid *fidp, cm_space_t *prefix); 00053 00054 extern afs_int32 00055 smb_IoctlRead(struct smb_fid *fidp, struct smb_vc *vcp, 00056 struct smb_packet *inp, struct smb_packet *outp); 00057 00058 extern afs_int32 00059 smb_IoctlWrite(struct smb_fid *fidp, struct smb_vc *vcp, 00060 struct smb_packet *inp, struct smb_packet *outp); 00061 00062 extern afs_int32 00063 smb_IoctlV3Write(struct smb_fid *fidp, struct smb_vc *vcp, 00064 struct smb_packet *inp, struct smb_packet *outp); 00065 00066 extern afs_int32 00067 smb_IoctlV3Read(struct smb_fid *fidp, struct smb_vc *vcp, 00068 struct smb_packet *inp, struct smb_packet *outp); 00069 00070 extern afs_int32 00071 smb_IoctlReadRaw(struct smb_fid *fidp, struct smb_vc *vcp, 00072 struct smb_packet *inp, struct smb_packet *outp); 00073 00074 extern afs_int32 00075 smb_IoctlPrepareRead(struct smb_fid *fidp, smb_ioctl_t *ioctlp, 00076 cm_user_t *userp, afs_uint32 pflags); 00077 00078 extern afs_int32 00079 smb_ParseIoctlPath(smb_ioctl_t *ioctlp, cm_user_t *userp, cm_req_t *reqp, 00080 cm_scache_t **scpp, afs_uint32 flags); 00081 00082 extern afs_int32 00083 smb_ParseIoctlParent(smb_ioctl_t *ioctlp, cm_user_t *userp, cm_req_t *reqp, 00084 cm_scache_t **scpp, clientchar_t *leafp); 00085 00086 extern afs_int32 00087 smb_IoctlSetToken(struct smb_ioctl *ioctlp, struct cm_user *userp, afs_uint32 flags); 00088 00089 extern afs_int32 00090 smb_IoctlGetSMBName(smb_ioctl_t *ioctlp, cm_user_t *userp, afs_uint32 flags); 00091 00092 extern afs_int32 smb_IoctlGetACL(smb_ioctl_t *ioctlp, cm_user_t *userp, afs_uint32 flags); 00093 00094 extern afs_int32 smb_IoctlGetFileCellName(smb_ioctl_t *ioctlp, cm_user_t *userp, afs_uint32 flags); 00095 00096 extern afs_int32 smb_IoctlSetACL(smb_ioctl_t *ioctlp, cm_user_t *userp, afs_uint32 flags); 00097 00098 extern afs_int32 smb_IoctlFlushAllVolumes(smb_ioctl_t *ioctlp, cm_user_t *userp, afs_uint32 flags); 00099 00100 extern afs_int32 smb_IoctlFlushVolume(smb_ioctl_t *ioctlp, cm_user_t *userp, afs_uint32 flags); 00101 00102 extern afs_int32 smb_IoctlFlushFile(smb_ioctl_t *ioctlp, cm_user_t *userp, afs_uint32 flags); 00103 00104 extern afs_int32 smb_IoctlSetVolumeStatus(smb_ioctl_t *ioctlp, cm_user_t *userp, afs_uint32 flags); 00105 00106 extern afs_int32 smb_IoctlGetVolumeStatus(smb_ioctl_t *ioctlp, cm_user_t *userp, afs_uint32 flags); 00107 00108 extern afs_int32 smb_IoctlGetFid(smb_ioctl_t *ioctlp, cm_user_t *userp, afs_uint32 flags); 00109 00110 extern afs_int32 smb_IoctlGetOwner(smb_ioctl_t *ioctlp, cm_user_t *userp, afs_uint32 flags); 00111 00112 extern afs_int32 smb_IoctlWhereIs(smb_ioctl_t *ioctlp, cm_user_t *userp, afs_uint32 flags); 00113 00114 extern afs_int32 smb_IoctlStatMountPoint(smb_ioctl_t *ioctlp, cm_user_t *userp, afs_uint32 flags); 00115 00116 extern afs_int32 smb_IoctlDeleteMountPoint(smb_ioctl_t *ioctlp, cm_user_t *userp, afs_uint32 flags); 00117 00118 extern afs_int32 smb_IoctlCheckServers(smb_ioctl_t *ioctlp, cm_user_t *userp, afs_uint32 flags); 00119 00120 extern afs_int32 smb_IoctlGag(smb_ioctl_t *ioctlp, cm_user_t *userp, afs_uint32 flags); 00121 00122 extern afs_int32 smb_IoctlCheckVolumes(smb_ioctl_t *ioctlp, cm_user_t *userp, afs_uint32 flags); 00123 00124 extern afs_int32 smb_IoctlSetCacheSize(smb_ioctl_t *ioctlp, cm_user_t *userp, afs_uint32 flags); 00125 00126 extern afs_int32 smb_IoctlGetCacheParms(smb_ioctl_t *ioctlp, cm_user_t *userp, afs_uint32 flags); 00127 00128 extern afs_int32 smb_IoctlGetCell(smb_ioctl_t *ioctlp, cm_user_t *userp, afs_uint32 flags); 00129 00130 extern afs_int32 smb_IoctlNewCell(smb_ioctl_t *ioctlp, cm_user_t *userp, afs_uint32 flags); 00131 00132 extern afs_int32 smb_IoctlNewCell2(smb_ioctl_t *ioctlp, cm_user_t *userp, afs_uint32 flags); 00133 00134 extern afs_int32 smb_IoctlGetWsCell(smb_ioctl_t *ioctlp, cm_user_t *userp, afs_uint32 flags); 00135 00136 extern afs_int32 smb_IoctlSysName(smb_ioctl_t *ioctlp, cm_user_t *userp, afs_uint32 flags); 00137 00138 extern afs_int32 smb_IoctlGetCellStatus(smb_ioctl_t *ioctlp, cm_user_t *userp, afs_uint32 flags); 00139 00140 extern afs_int32 smb_IoctlSetCellStatus(smb_ioctl_t *ioctlp, cm_user_t *userp, afs_uint32 flags); 00141 00142 extern afs_int32 smb_IoctlSetSPrefs(smb_ioctl_t *ioctlp, cm_user_t *userp, afs_uint32 flags); 00143 00144 extern afs_int32 smb_IoctlGetSPrefs(smb_ioctl_t *ioctlp, cm_user_t *userp, afs_uint32 flags); 00145 00146 extern afs_int32 smb_IoctlStoreBehind(smb_ioctl_t *ioctlp, cm_user_t *userp, afs_uint32 flags); 00147 00148 extern afs_int32 smb_IoctlCreateMountPoint(smb_ioctl_t *ioctlp, cm_user_t *userp, afs_uint32 flags); 00149 00150 extern afs_int32 cm_CleanFile(cm_scache_t *scp, cm_user_t *userp, cm_req_t *reqp); 00151 00152 extern afs_int32 cm_FlushFile(cm_scache_t *scp, cm_user_t *userp, cm_req_t *reqp); 00153 00154 extern afs_int32 cm_FlushVolume(cm_user_t *, cm_req_t *reqp, afs_uint32 cell, afs_uint32 volume); 00155 00156 extern afs_int32 cm_FlushParent(cm_scache_t *scp, cm_user_t *userp, cm_req_t *reqp); 00157 00158 extern afs_int32 smb_IoctlTraceControl(smb_ioctl_t *ioctlp, cm_user_t *userp, afs_uint32 flags); 00159 00160 extern afs_int32 smb_IoctlSetToken(smb_ioctl_t *ioctlp, cm_user_t *userp, afs_uint32 flags); 00161 00162 extern afs_int32 smb_IoctlGetTokenIter(smb_ioctl_t *ioctlp, cm_user_t *userp, afs_uint32 flags); 00163 00164 extern afs_int32 smb_IoctlGetToken(smb_ioctl_t *ioctlp, cm_user_t *userp, afs_uint32 flags); 00165 00166 extern afs_int32 smb_IoctlDelToken(smb_ioctl_t *ioctlp, cm_user_t *userp, afs_uint32 flags); 00167 00168 extern afs_int32 smb_IoctlDelAllToken(smb_ioctl_t *ioctlp, cm_user_t *userp, afs_uint32 flags); 00169 00170 extern afs_int32 smb_IoctlSymlink(smb_ioctl_t *ioctlp, cm_user_t *userp, afs_uint32 flags); 00171 00172 extern afs_int32 smb_IoctlIslink(smb_ioctl_t *ioctlp, cm_user_t *userp, afs_uint32 flags); 00173 00174 extern afs_int32 smb_IoctlListlink(smb_ioctl_t *ioctlp, cm_user_t *userp, afs_uint32 flags); 00175 00176 extern afs_int32 smb_IoctlDeletelink(smb_ioctl_t *ioctlp, cm_user_t *userp, afs_uint32 flags); 00177 00178 extern afs_int32 smb_IoctlMakeSubmount(smb_ioctl_t *ioctlp, cm_user_t *userp, afs_uint32 flags); 00179 00180 extern afs_int32 smb_IoctlGetRxkcrypt(smb_ioctl_t *ioctlp, cm_user_t *userp, afs_uint32 flags); 00181 00182 extern afs_int32 smb_IoctlSetRxkcrypt(smb_ioctl_t *ioctlp, cm_user_t *userp, afs_uint32 flags); 00183 00184 extern afs_int32 smb_IoctlShutdown(smb_ioctl_t *ioctlp, cm_user_t *userp, afs_uint32 flags); 00185 00186 extern afs_int32 smb_IoctlFreemountAddCell(smb_ioctl_t *ioctlp, cm_user_t *userp, afs_uint32 flags); 00187 00188 extern afs_int32 smb_IoctlFreemountRemoveCell(smb_ioctl_t *ioctlp, cm_user_t *userp, afs_uint32 flags); 00189 00190 extern afs_int32 smb_IoctlMemoryDump(smb_ioctl_t *ioctlp, cm_user_t *userp, afs_uint32 flags); 00191 00192 extern afs_int32 smb_IoctlRxStatProcess(smb_ioctl_t *ioctlp, cm_user_t *userp, afs_uint32 flags); 00193 00194 extern afs_int32 smb_IoctlRxStatPeer(smb_ioctl_t *ioctlp, cm_user_t *userp, afs_uint32 flags); 00195 00196 extern afs_int32 smb_IoctlUUIDControl(struct smb_ioctl * ioctlp, struct cm_user *userp, afs_uint32 flags); 00197 00198 extern afs_int32 smb_IoctlPathAvailability(struct smb_ioctl * ioctlp, struct cm_user *userp, afs_uint32 flags); 00199 00200 extern afs_int32 smb_IoctlGetFileType(smb_ioctl_t *ioctlp, cm_user_t *userp, afs_uint32 flags); 00201 00202 extern afs_int32 smb_IoctlVolStatTest(struct smb_ioctl *ioctlp, struct cm_user *userp, afs_uint32 flags); 00203 00204 extern afs_int32 smb_IoctlUnicodeControl(struct smb_ioctl *ioctlp, struct cm_user * userp, afs_uint32 flags); 00205 00206 extern afs_int32 smb_IoctlSetOwner(struct smb_ioctl *ioctlp, struct cm_user *userp, afs_uint32 flags); 00207 00208 extern afs_int32 smb_IoctlSetGroup(struct smb_ioctl *ioctlp, struct cm_user *userp, afs_uint32 flags); 00209 00210 extern afs_int32 smb_IoctlGetUnixMode(struct smb_ioctl *ioctlp, struct cm_user *userp, afs_uint32 flags); 00211 00212 extern afs_int32 smb_IoctlSetUnixMode(struct smb_ioctl *ioctlp, struct cm_user *userp, afs_uint32 flags); 00213 00214 extern afs_int32 smb_IoctlGetVerifyData(struct smb_ioctl *ioctlp, struct cm_user *userp, afs_uint32 flags); 00215 00216 extern afs_int32 smb_IoctlSetVerifyData(struct smb_ioctl *ioctlp, struct cm_user *userp, afs_uint32 flags); 00217 00218 #endif /* OPENAFS_WINNT_AFSD_SMB_IOCTL_H */