#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];
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 */
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.
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 */
* 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);
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);