win95-initial-port-20010430
[openafs.git] / src / WINNT / afsd / smb.h
index 201bafd..0bba634 100644 (file)
 #ifndef __SMB_H_ENV__
 #define __SMB_H_ENV__ 1
 
+#ifdef DJGPP
+#include "netbios95.h"
+#endif /* DJGPP */
+
 /* basic core protocol SMB structure */
 typedef struct smb {
        unsigned char id[4];
@@ -74,6 +78,10 @@ typedef struct smb_packet {
        unsigned char oddByte;
        unsigned short ncb_length;
        unsigned char flags;
+#ifdef DJGPP
+        dos_ptr dos_pkt;
+        unsigned int dos_pkt_sel;
+#endif /* DJGPP */
 } smb_packet_t;
 
 /* smb_packet flags */
@@ -87,6 +95,11 @@ typedef struct myncb {
        NCB ncb;                        /* ncb to use */
         struct myncb *nextp;           /* when on free list */
         long magic;
+#ifdef DJGPP
+        dos_ptr dos_ncb;
+        smb_packet_t *orig_pkt;
+        unsigned int dos_ncb_sel;
+#endif /* DJGPP */
 } smb_ncb_t;
 
 /* structures representing environments from kernel / SMB network.
@@ -209,7 +222,7 @@ typedef struct smb_fid {
        int curr_chunk;                 /* chunk being read */
        int prev_chunk;                 /* previous chunk read */
        int raw_writers;                /* pending async raw writes */
-       HANDLE raw_write_event;         /* signal this when raw_writers zero */
+       EVENT_HANDLE raw_write_event;   /* signal this when raw_writers zero */
 } smb_fid_t;
 
 #define SMB_FID_OPENREAD               1       /* open for reading */
@@ -279,11 +292,16 @@ typedef struct smb_dispatch {
                                                 * the response was already
                                                 * sent.
                                                  */
+#define SMB_MAX_PATH                    256     /* max path length */
 
 /* prototypes */
 
 extern void smb_Init(osi_log_t *logp, char *smbNamep, int useV3, int LANadapt,
-       int nThreads, void *aMBfunc);
+       int nThreads
+#ifndef DJGPP
+        , void *aMBfunc
+#endif
+  );
 
 extern void smb_LargeSearchTimeFromUnixTime(FILETIME *largeTimep, long unixTime);
 
@@ -402,8 +420,13 @@ extern unsigned char *smb_ParseVblBlock(unsigned char *inp, char **chainpp, int
 
 extern int smb_SUser(cm_user_t *userp);
 
+#ifndef DJGPP
 extern long smb_ReadData(smb_fid_t *fidp, osi_hyper_t *offsetp, long count,
        char *op, cm_user_t *userp, long *readp);
+#else /* DJGPP */
+extern long smb_ReadData(smb_fid_t *fidp, osi_hyper_t *offsetp, long count,
+       char *op, cm_user_t *userp, long *readp, int dosflag);
+#endif /* !DJGPP */
 
 extern BOOL smb_IsLegalFilename(char *filename);