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
11 #define __SMB_H_ENV__ 1
14 #include "netbios95.h"
19 /* basic core protocol SMB structure */
26 unsigned char errHigh;
29 unsigned short res[6];
35 unsigned char vdata[1];
40 #define SMB_FLAGS2_KNOWS_LONG_NAMES 0x0001
41 #define SMB_FLAGS2_KNOWS_EAS 0x0002
42 #define SMB_FLAGS2_SECURITY_SIGNATURE 0x0004
43 #define SMB_FLAGS2_RESERVED1 0x0008
44 #define SMB_FLAGS2_IS_LONG_NAME 0x0040
45 #define SMB_FLAGS2_EXT_SEC 0x0800
46 #define SMB_FLAGS2_DFS 0x1000
47 #define SMB_FLAGS2_PAGING_IO 0x2000
48 #define SMB_FLAGS2_ERR_STATUS 0x4000
49 #define SMB_FLAGS2_UNICODE 0x8000
51 /* Information Levels */
52 #define SMB_INFO_STANDARD 1
53 #define SMB_INFO_QUERY_EA_SIZE 2
54 #define SMB_INFO_QUERY_EAS_FROM_LIST 3
55 #define SMB_INFO_QUERY_ALL_EAS 4
56 #define SMB_INFO_IS_NAME_VALID 6
58 #define SMB_QUERY_FILE_BASIC_INFO 0x101
59 #define SMB_QUERY_FILE_STANDARD_INFO 0x102
60 #define SMB_QUERY_FILE_EA_INFO 0x103
61 #define SMB_QUERY_FILE_NAME_INFO 0x104
62 #define SMB_QUERY_FILE_ALL_INFO 0x107
63 #define SMB_QUERY_FILE_ALT_NAME_INFO 0x108
64 #define SMB_QUERY_FILE_STREAM_INFO 0x109
65 #define SMB_QUERY_FILE_COMPRESSION_INFO 0x10B
66 #define SMB_QUERY_FILE_UNIX_BASIC 0x200
67 #define SMB_QUERY_FILE_UNIX_LINK 0x201
69 #define SMB_SET_FILE_UNIX_BASIC 0x200
70 #define SMB_SET_FILE_UNIX_LINK 0x201
71 #define SMB_SET_FILE_UNIX_HLINK 0x203
74 #define SMB_NOPCODES 256 /* # of opcodes in the dispatch table */
77 #define SMB_THREADSPERVC 4 /* threads per VC */
79 /* flags for functions */
80 #define SMB_FLAG_CREATE 1 /* create the structure if necessary */
82 /* max # of bytes we'll receive in an incoming SMB message */
83 /* the maximum is 2^18-1 for NBT and 2^25-1 for Raw transport messages */
84 /* we will use something smaller but large enough to be efficient */
85 #define SMB_PACKETSIZE 32768 /* was 8400 */
86 /* raw mode is considered obsolete and cannot be used with message signing */
87 #define SMB_MAXRAWSIZE 65536
89 /* Negotiate protocol constants */
91 #define NEGOTIATE_SECURITY_USER_LEVEL 0x01
92 #define NEGOTIATE_SECURITY_CHALLENGE_RESPONSE 0x02
93 #define NEGOTIATE_SECURITY_SIGNATURES_ENABLED 0x04
94 #define NEGOTIATE_SECURITY_SIGNATURES_REQUIRED 0x08
97 #define NTNEGOTIATE_CAPABILITY_RAWMODE 0x00000001L
98 #define NTNEGOTIATE_CAPABILITY_MPXMODE 0x00000002L
99 #define NTNEGOTIATE_CAPABILITY_UNICODE 0x00000004L
100 #define NTNEGOTIATE_CAPABILITY_LARGEFILES 0x00000008L
101 #define NTNEGOTIATE_CAPABILITY_NTSMB 0x00000010L
102 #define NTNEGOTIATE_CAPABILITY_RPCAPI 0x00000020L
103 #define NTNEGOTIATE_CAPABILITY_NTSTATUS 0x00000040L
104 #define NTNEGOTIATE_CAPABILITY_LEVEL_II_OPLOCKS 0x00000080L
105 #define NTNEGOTIATE_CAPABILITY_LOCK_AND_READ 0x00000100L
106 #define NTNEGOTIATE_CAPABILITY_NTFIND 0x00000200L
107 #define NTNEGOTIATE_CAPABILITY_DFS 0x00001000L
108 #define NTNEGOTIATE_CAPABILITY_NT_INFO_PASSTHRU 0x00002000L
109 #define NTNEGOTIATE_CAPABILITY_BULK_TRANSFER 0x20000000L
110 #define NTNEGOTIATE_CAPABILITY_COMPRESSED 0x40000000L
111 #define NTNEGOTIATE_CAPABILITY_EXTENDED_SECURITY 0x80000000L
113 /* a packet structure for receiving SMB messages; locked by smb_globalLock.
114 * Most of the work involved is in handling chained requests and responses.
116 * When handling input, inWctp points to the current request's wct field (and
117 * the other parameters and request data can be found from this field). The
118 * opcode, unfortunately, isn't available there, so is instead copied to the
119 * packet's inCom field. It is initially set to com, but each chained
120 * operation sets it, also.
121 * The function smb_AdvanceInput advances an input packet to the next request
122 * in the chain. The inCom field is set to 0xFF when there are no more
123 * requests. The inCount field is 0 if this is the first request, and
124 * otherwise counts which request it is.
126 * When handling output, we also have to chain all of the responses together.
127 * The function smb_GetResponsePacket will setup outWctp to point to the right
130 #define SMB_PACKETMAGIC 0x7436353 /* magic # for packets */
131 typedef struct smb_packet {
132 char data[SMB_PACKETSIZE];
133 struct smb_packet *nextp; /* in free list, or whatever */
135 cm_space_t *spacep; /* use this for stripping last component */
136 NCB *ncbp; /* use this for sending */
138 unsigned long resumeCode;
139 unsigned short inCount;
140 unsigned short fid; /* for calls bundled with openAndX */
143 unsigned char oddByte;
144 unsigned short ncb_length;
148 unsigned int dos_pkt_sel;
152 /* smb_packet flags */
153 #define SMB_PACKETFLAG_PROFILE_UPDATE_OK 1
154 #define SMB_PACKETFLAG_NOSEND 2
155 #define SMB_PACKETFLAG_SUSPENDED 4
157 /* a structure for making Netbios calls; locked by smb_globalLock */
158 #define SMB_NCBMAGIC 0x2334344
159 typedef struct myncb {
160 NCB ncb; /* ncb to use */
161 struct myncb *nextp; /* when on free list */
165 smb_packet_t *orig_pkt;
166 unsigned int dos_ncb_sel;
170 /* structures representing environments from kernel / SMB network.
171 * Most have their own locks, but the tree connection fields and
172 * reference counts are locked by the smb_rctLock. Those fields will
173 * be marked in comments.
176 /* one per virtual circuit */
177 typedef struct smb_vc {
178 struct smb_vc *nextp; /* not used */
179 unsigned long refCount; /* the reference count */
180 long flags; /* the flags, if any; locked by mx */
181 osi_mutex_t mx; /* the mutex */
182 long vcID; /* VC id */
183 unsigned short lsn; /* the NCB LSN associated with this */
184 unsigned short uidCounter; /* session ID counter */
185 unsigned short tidCounter; /* tree ID counter */
186 unsigned short fidCounter; /* file handle ID counter */
187 struct smb_tid *tidsp; /* the first child in the tid list */
188 struct smb_user *usersp; /* the first child in the user session list */
189 struct smb_fid *fidsp; /* the first child in the open file list */
190 struct smb_user *justLoggedOut; /* ready for profile upload? */
191 time_t logoffTime; /* tick count when logged off */
192 unsigned char errorCount;
195 char encKey[MSV1_0_CHALLENGE_LENGTH]; /* MSV1_0_CHALLENGE_LENGTH is 8 */
196 void * secCtx; /* security context when negotiating SMB extended auth
197 * valid when SMB_VCFLAG_AUTH_IN_PROGRESS is set
201 /* have we negotiated ... */
202 #define SMB_VCFLAG_USEV3 1 /* ... version 3 of the protocol */
203 #define SMB_VCFLAG_USECORE 2 /* ... the core protocol */
204 #define SMB_VCFLAG_USENT 4 /* ... NT LM 0.12 or beyond */
205 #define SMB_VCFLAG_STATUS32 8 /* use 32-bit NT status codes */
206 #define SMB_VCFLAG_REMOTECONN 0x10 /* bad: remote conns not allowed */
207 #define SMB_VCFLAG_ALREADYDEAD 0x20 /* do not get tokens from this vc */
208 #define SMB_VCFLAG_SESSX_RCVD 0x40 /* we received at least one session setups on this vc */
209 #define SMB_VCFLAG_AUTH_IN_PROGRESS 0x80 /* a SMB NT extended authentication is in progress */
211 /* one per user session */
212 typedef struct smb_user {
213 struct smb_user *nextp; /* next sibling */
214 unsigned long refCount; /* ref count */
215 long flags; /* flags; locked by mx */
217 long userID; /* the session identifier */
218 struct smb_vc *vcp; /* back ptr to virtual circuit */
219 struct smb_username *unp; /* user name struct */
222 typedef struct smb_username {
223 struct smb_username *nextp; /* next sibling */
224 unsigned long refCount; /* ref count */
225 long flags; /* flags; locked by mx */
227 struct cm_user *userp; /* CM user structure */
228 char *name; /* user name */
229 char *machine; /* machine name */
232 #define SMB_USERFLAG_DELETE 1 /* delete struct when ref count zero */
234 #define SMB_MAX_USERNAME_LENGTH 256
236 /* one per tree-connect */
237 typedef struct smb_tid {
238 struct smb_tid *nextp; /* next sibling */
239 unsigned long refCount;
241 osi_mutex_t mx; /* for non-tree-related stuff */
242 unsigned short tid; /* the tid */
243 struct smb_vc *vcp; /* back ptr */
244 struct cm_user *userp; /* user logged in at the
245 * tree connect level (base) */
246 char *pathname; /* pathname derived from sharename */
249 #define SMB_TIDFLAG_DELETE 1 /* delete struct when ref count zero */
250 #define SMB_TIDFLAG_IPC 2 /* IPC$ */
252 /* one per process ID */
253 typedef struct smb_pid {
254 struct smb_pid *nextp; /* next sibling */
255 unsigned long refCount;
257 osi_mutex_t mx; /* for non-tree-related stuff */
258 unsigned short pid; /* the pid */
259 struct smb_tid *tidp; /* back ptr */
262 /* ioctl parameter, while being assembled and/or processed */
263 typedef struct smb_ioctl {
265 char *inDatap; /* ioctl func's current position
266 * in input parameter block */
267 char *inAllocp; /* allocated input parameter block */
268 long inCopied; /* # of input bytes copied in so far
270 cm_space_t *prefix; /* prefix for subst drives */
271 char *tidPathp; /* Pathname associated with Tree ID */
274 char *outDatap; /* output results assembled so far */
275 char *outAllocp; /* output results assembled so far */
276 long outCopied; /* # of output bytes copied back so far
283 struct smb_fid *fidp;
289 /* flags for smb_ioctl_t */
290 #define SMB_IOCTLFLAG_DATAIN 1 /* reading data from client to server */
291 #define SMB_IOCTLFLAG_LOGON 2 /* got tokens from integrated logon */
293 /* one per file ID; these are really file descriptors */
294 typedef struct smb_fid {
296 unsigned long refCount;
298 osi_mutex_t mx; /* for non-tree-related stuff */
299 unsigned short fid; /* the file ID */
300 struct smb_vc *vcp; /* back ptr */
301 struct cm_scache *scp; /* scache of open file */
302 long offset; /* our file pointer */
303 smb_ioctl_t *ioctlp; /* ptr to ioctl structure */
304 /* Under NT, we may need to know the
305 * parent directory and pathname used
306 * to open the file, either to delete
307 * the file on close, or to do a
308 * change notification */
309 struct cm_scache *NTopen_dscp; /* parent directory (NT) */
310 char *NTopen_pathp; /* path used in open (NT) */
311 char *NTopen_wholepathp; /* entire path, not just last name */
312 int curr_chunk; /* chunk being read */
313 int prev_chunk; /* previous chunk read */
314 int raw_writers; /* pending async raw writes */
315 EVENT_HANDLE raw_write_event; /* signal this when raw_writers zero */
318 #define SMB_FID_OPENREAD 1 /* open for reading */
319 #define SMB_FID_OPENWRITE 2 /* open for writing */
320 #define SMB_FID_DELETE 4 /* delete struct on ref count 0 */
321 #define SMB_FID_IOCTL 8 /* a file descriptor for the
322 * magic ioctl file */
323 #define SMB_FID_OPENDELETE 0x10 /* open for deletion (NT) */
324 #define SMB_FID_DELONCLOSE 0x20 /* marked for deletion */
326 * Now some special flags to work around a bug in NT Client
328 #define SMB_FID_LENGTHSETDONE 0x40 /* have done 0-length write */
329 #define SMB_FID_MTIMESETDONE 0x80 /* have set modtime via Tr2 */
330 #define SMB_FID_LOOKSLIKECOPY (SMB_FID_LENGTHSETDONE | SMB_FID_MTIMESETDONE)
331 #define SMB_FID_NTOPEN 0x100 /* have dscp and pathp */
334 * SMB file attributes (32-bit)
336 #define SMB_ATTR_READONLY 0x0001
337 #define SMB_ATTR_HIDDEN 0x0002 /* hidden file for the purpose of dir listings */
338 #define SMB_ATTR_SYSTEM 0x0004
339 #define SMB_ATTR_VOLUMEID 0x0008 /* obsolete */
340 #define SMB_ATTR_DIRECTORY 0x0010
341 #define SMB_ATTR_ARCHIVE 0x0020
342 #define SMB_ATTR_DEVICE 0x0040
343 #define SMB_ATTR_NORMAL 0x0080 /* normal file. Only valid if used alone */
344 #define SMB_ATTR_TEMPORARY 0x0100
345 #define SMB_ATTR_SPARSE_FILE 0x0200
346 #define SMB_ATTR_REPARSE_POINT 0x0400
347 #define SMB_ATTR_COMPRESSED 0x0800 /* file or dir is compressed */
348 #define SMB_ATTR_OFFLINE 0x1000
349 #define SMB_ATTR_NOT_CONTENT_INDEXED 0x2000
350 #define SMB_ATTR_ENCRYPTED 0x4000
352 /* for tracking in-progress directory searches */
353 typedef struct smb_dirSearch {
354 osi_queue_t q; /* queue of all outstanding cookies */
355 osi_mutex_t mx; /* just in case the caller screws up */
356 unsigned long refCount; /* reference count */
357 long cookie; /* value returned to the caller */
358 struct cm_scache *scp; /* vnode of the dir we're searching */
359 time_t lastTime; /* last time we used this */
360 long flags; /* flags (see below);
361 * locked by smb_globalLock */
362 unsigned short attribute; /* search attribute
363 * (used for extended protocol) */
364 char mask[256]; /* search mask for V3 */
367 #define SMB_DIRSEARCH_DELETE 1 /* delete struct when ref count zero */
368 #define SMB_DIRSEARCH_HITEOF 2 /* perhaps useful for advisory later */
369 #define SMB_DIRSEARCH_SMALLID 4 /* cookie can only be 8 bits, not 16 */
370 #define SMB_DIRSEARCH_BULKST 8 /* get bulk stat info */
372 /* type for patching directory listings */
373 typedef struct smb_dirListPatch {
375 char *dptr; /* ptr to attr, time, data, sizel, sizeh */
376 long flags; /* flags. See below */
378 cm_dirEntry_t *dep; /* temp */
379 } smb_dirListPatch_t;
381 /* dirListPatch Flags */
382 #define SMB_DIRLISTPATCH_DOTFILE 1
383 /* the file referenced is a dot file
384 * Note: will not be set if smb_hideDotFiles is false
387 /* waiting lock list elements */
388 typedef struct smb_waitingLock {
393 time_t timeRemaining;
397 extern smb_waitingLock_t *smb_allWaitingLocks;
399 typedef long (smb_proc_t)(smb_vc_t *vcp, smb_packet_t *inp, smb_packet_t *outp);
401 typedef struct smb_dispatch {
402 smb_proc_t *procp; /* proc to call */
403 int flags; /* flags describing function */
406 #define SMB_DISPATCHFLAG_CHAINED 1 /* this is an _AND_X function */
407 #define SMB_DISPATCHFLAG_NORESPONSE 2 /* don't send the response
408 * packet, typically because
409 * the response was already
412 #define SMB_MAX_PATH 256 /* max path length */
416 extern void smb_Init(osi_log_t *logp, char *smbNamep, int useV3, int LANadapt,
423 extern void smb_LargeSearchTimeFromUnixTime(FILETIME *largeTimep, time_t unixTime);
425 extern void smb_UnixTimeFromLargeSearchTime(time_t *unixTimep, FILETIME *largeTimep);
427 extern void smb_SearchTimeFromUnixTime(time_t *dosTimep, time_t unixTime);
429 extern void smb_UnixTimeFromSearchTime(time_t *unixTimep, time_t searchTime);
431 extern void smb_DosUTimeFromUnixTime(time_t *dosUTimep, time_t unixTime);
433 extern void smb_UnixTimeFromDosUTime(time_t *unixTimep, time_t dosUTime);
435 extern smb_vc_t *smb_FindVC(unsigned short lsn, int flags, int lana);
437 extern void smb_ReleaseVC(smb_vc_t *vcp);
439 extern void smb_ReleaseVCNoLock(smb_vc_t *vcp);
441 extern smb_tid_t *smb_FindTID(smb_vc_t *vcp, unsigned short tid, int flags);
443 extern void smb_ReleaseTID(smb_tid_t *tidp);
445 extern smb_user_t *smb_FindUID(smb_vc_t *vcp, unsigned short uid, int flags);
447 extern smb_username_t *smb_FindUserByName(char *usern, char *machine, int flags);
449 extern smb_user_t *smb_FindUserByNameThisSession(smb_vc_t *vcp, char *usern);
451 extern smb_username_t *smb_FindUserByName(char *usern, char *machine, int flags);
453 extern smb_user_t *smb_FindUserByNameThisSession(smb_vc_t *vcp, char *usern);
455 extern void smb_ReleaseUID(smb_user_t *uidp);
457 extern cm_user_t *smb_GetUser(smb_vc_t *vcp, smb_packet_t *inp);
459 extern long smb_LookupTIDPath(smb_vc_t *vcp, unsigned short tid, char ** tidPathp);
461 extern smb_fid_t *smb_FindFID(smb_vc_t *vcp, unsigned short fid, int flags);
463 extern void smb_ReleaseFID(smb_fid_t *fidp);
465 extern int smb_FindShare(smb_vc_t *vcp, smb_user_t *uidp, char *shareName, char **pathNamep);
467 extern int smb_FindShareCSCPolicy(char *shareName);
469 extern smb_dirSearch_t *smb_FindDirSearchNL(long cookie);
471 extern void smb_DeleteDirSearch(smb_dirSearch_t *dsp);
473 extern void smb_ReleaseDirSearch(smb_dirSearch_t *dsp);
475 extern smb_dirSearch_t *smb_FindDirSearch(long cookie);
477 extern smb_dirSearch_t *smb_NewDirSearch(int isV3);
479 extern smb_packet_t *smb_CopyPacket(smb_packet_t *packetp);
481 extern void smb_FreePacket(smb_packet_t *packetp);
483 extern unsigned char *smb_GetSMBData(smb_packet_t *smbp, int *nbytesp);
485 extern void smb_SetSMBDataLength(smb_packet_t *smbp, unsigned int dsize);
487 extern unsigned int smb_GetSMBParm(smb_packet_t *smbp, int parm);
489 extern unsigned int smb_GetSMBOffsetParm(smb_packet_t *smbp, int parm, int offset);
491 extern void smb_SetSMBParm(smb_packet_t *smbp, int slot, unsigned int parmValue);
493 extern void smb_SetSMBParmLong(smb_packet_t *smbp, int slot, unsigned int parmValue);
495 extern void smb_SetSMBParmDouble(smb_packet_t *smbp, int slot, char *parmValuep);
497 extern void smb_SetSMBParmByte(smb_packet_t *smbp, int slot, unsigned int parmValue);
499 extern void smb_StripLastComponent(char *outPathp, char **lastComponentp,
502 extern unsigned char *smb_ParseASCIIBlock(unsigned char *inp, char **chainpp);
504 extern unsigned char *smb_ParseVblBlock(unsigned char *inp, char **chainpp,
507 extern smb_packet_t *smb_GetResponsePacket(smb_vc_t *vcp, smb_packet_t *inp);
509 extern void smb_SendPacket(smb_vc_t *vcp, smb_packet_t *inp);
511 extern void smb_MapCoreError(long code, smb_vc_t *vcp, unsigned short *scodep,
512 unsigned char *classp);
514 extern void smb_MapNTError(long code, unsigned long *NTStatusp);
516 extern void smb_HoldVC(smb_vc_t *vcp);
518 extern void smb_HoldVCNoLock(smb_vc_t *vcp);
520 /* some globals, too */
521 extern char *smb_localNamep;
522 extern int loggedOut;
523 extern time_t loggedOutTime;
524 extern char *loggedOutName;
525 extern smb_user_t *loggedOutUserp;
527 extern osi_log_t *smb_logp;
529 extern osi_rwlock_t smb_globalLock;
531 extern osi_rwlock_t smb_rctLock;
533 extern int smb_LogoffTokenTransfer;
534 extern time_t smb_LogoffTransferTimeout;
536 extern int smb_maxVCPerServer; /* max # of VCs per server */
537 extern int smb_maxMpxRequests; /* max # of mpx requests */
539 extern int smb_StoreAnsiFilenames;
540 extern int smb_hideDotFiles;
541 extern unsigned int smb_IsDotFile(char *lastComp);
543 /* the following are used for smb auth */
544 extern int smb_authType; /* Type of SMB authentication to be used. One from below. */
546 #define SMB_AUTH_NONE 0
547 #define SMB_AUTH_NTLM 1
548 #define SMB_AUTH_EXTENDED 2
550 extern HANDLE smb_lsaHandle; /* LSA handle obtained during smb_init if using SMB auth */
551 extern ULONG smb_lsaSecPackage; /* LSA security package id. Set during smb_init */
552 extern char smb_ServerDomainName[];
553 extern int smb_ServerDomainNameLength;
554 extern char smb_ServerOS[];
555 extern int smb_ServerOSLength;
556 extern char smb_ServerLanManager[];
557 extern int smb_ServerLanManagerLength;
558 extern GUID smb_ServerGUID;
559 extern LSA_STRING smb_lsaLogonOrigin;
561 /* used for getting a challenge for SMB auth */
562 typedef struct _MSV1_0_LM20_CHALLENGE_REQUEST {
563 MSV1_0_PROTOCOL_MESSAGE_TYPE MessageType;
564 } MSV1_0_LM20_CHALLENGE_REQUEST, *PMSV1_0_LM20_CHALLENGE_REQUEST;
566 typedef struct _MSV1_0_LM20_CHALLENGE_RESPONSE {
567 MSV1_0_PROTOCOL_MESSAGE_TYPE MessageType;
568 UCHAR ChallengeToClient[MSV1_0_CHALLENGE_LENGTH];
569 } MSV1_0_LM20_CHALLENGE_RESPONSE, *PMSV1_0_LM20_CHALLENGE_RESPONSE;
572 extern long smb_AuthenticateUserLM(smb_vc_t *vcp, char * accountName, char * primaryDomain, char * ciPwd, unsigned ciPwdLength, char * csPwd, unsigned csPwdLength);
574 extern long smb_GetNormalizedUsername(char * usern, const char * accountName, const char * domainName);
576 extern void smb_FormatResponsePacket(smb_vc_t *vcp, smb_packet_t *inp,
579 extern char *myCrt_Dispatch(int i);
581 extern char *myCrt_2Dispatch(int i);
583 extern char *myCrt_RapDispatch(int i);
585 extern unsigned int smb_Attributes(cm_scache_t *scp);
587 extern int smb_ChainFID(int fid, smb_packet_t *inp);
589 extern smb_fid_t *smb_FindFID(smb_vc_t *vcp, unsigned short fid, int flags);
591 extern void smb_ReleaseFID(smb_fid_t *fidp);
593 extern unsigned char *smb_ParseDataBlock(unsigned char *inp, char **chainpp, int *lengthp);
595 extern unsigned char *smb_ParseASCIIBlock(unsigned char *inp, char **chainpp);
597 extern unsigned char *smb_ParseVblBlock(unsigned char *inp, char **chainpp, int *lengthp);
599 extern int smb_SUser(cm_user_t *userp);
602 extern long smb_ReadData(smb_fid_t *fidp, osi_hyper_t *offsetp, long count,
603 char *op, cm_user_t *userp, long *readp);
605 extern long smb_ReadData(smb_fid_t *fidp, osi_hyper_t *offsetp, long count,
606 char *op, cm_user_t *userp, long *readp, int dosflag);
609 extern long smb_Rename(smb_vc_t *vcp, smb_packet_t *inp, char *oldPathp, char *newPathp, int attrs);
611 extern long smb_Link(smb_vc_t *vcp, smb_packet_t *inp, char *oldPathp, char *newPathp);
613 extern BOOL smb_IsLegalFilename(char *filename);
615 extern char *smb_GetSharename(void);
617 extern DWORD smb_ServerExceptionFilter(void);
619 /* include other include files */
621 #include "smb_ioctl.h"
622 #include "smb_iocons.h"
624 cm_user_t *smb_FindOrCreateUser(smb_vc_t *vcp, char *usern);
627 extern void smb_LogPacket(smb_packet_t *packet);
628 #endif /* NOTSERVICE */
629 #endif /* whole file */