home *** CD-ROM | disk | FTP | other *** search
- /*
- Unix SMB/Netbios implementation.
- Version 1.8.
- Copyright (C) Jeremy Allison 1994
-
- This program is free software; you can redistribute it and/or modify
- it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
-
- This program is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- GNU General Public License for more details.
-
- You should have received a copy of the GNU General Public License
- along with this program; if not, write to the Free Software
- Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
- */
-
- #ifndef _TRANS2_H_
- #define _TRANS2_H_
-
- /* Define the structures needed for the trans2 calls. */
-
- /*******************************************************
- For DosFindFirst/DosFindNext - level 1
-
- MAXFILENAMELEN = 255;
- FDATE == uint16
- FTIME == uint16
- ULONG == uint32
- USHORT == uint16
-
- typedef struct _FILEFINDBUF {
- Byte offset Type name description
- -------------+-------+-------------------+--------------
- 0 FDATE fdateCreation;
- 2 FTIME ftimeCreation;
- 4 FDATE fdateLastAccess;
- 6 FTIME ftimeLastAccess;
- 8 FDATE fdateLastWrite;
- 10 FTIME ftimeLastWrite;
- 12 ULONG cbFile file length in bytes
- 16 ULONG cbFileAlloc size of file allocation unit
- 20 USHORT attrFile
- 22 UCHAR cchName length of name to follow (not including zero)
- 23 UCHAR achName[MAXFILENAMELEN]; Null terminated name
- } FILEFINDBUF;
- *********************************************************/
-
- #define l1_fdateCreation 0
- #define l1_fdateLastAccess 4
- #define l1_fdateLastWrite 8
- #define l1_cbFile 12
- #define l1_cbFileAlloc 16
- #define l1_attrFile 20
- #define l1_cchName 22
- #define l1_achName 23
-
- /**********************************************************
- For DosFindFirst/DosFindNext - level 2
-
- typedef struct _FILEFINDBUF2 {
- Byte offset Type name description
- -------------+-------+-------------------+--------------
- 0 FDATE fdateCreation;
- 2 FTIME ftimeCreation;
- 4 FDATE fdateLastAccess;
- 6 FTIME ftimeLastAccess;
- 8 FDATE fdateLastWrite;
- 10 FTIME ftimeLastWrite;
- 12 ULONG cbFile file length in bytes
- 16 ULONG cbFileAlloc size of file allocation unit
- 20 USHORT attrFile
- 22 ULONG cbList Extended attribute list (always 0)
- 26 UCHAR cchName length of name to follow (not including zero)
- 27 UCHAR achName[MAXFILENAMELEN]; Null terminated name
- } FILEFINDBUF2;
- *************************************************************/
-
- #define l2_fdateCreation 0
- #define l2_fdateLastAccess 4
- #define l2_fdateLastWrite 8
- #define l2_cbFile 12
- #define l2_cbFileAlloc 16
- #define l2_attrFile 20
- #define l2_cbList 22
- #define l2_cchName 26
- #define l2_achName 27
-
- /**********************************************************
- For DosQueryPathInfo/DosQueryFileInfo/DosSetPathInfo/
- DosSetFileInfo - level 1
-
- typedef struct _FILESTATUS {
- Byte offset Type name description
- -------------+-------+-------------------+--------------
- 0 FDATE fdateCreation;
- 2 FTIME ftimeCreation;
- 4 FDATE fdateLastAccess;
- 6 FTIME ftimeLastAccess;
- 8 FDATE fdateLastWrite;
- 10 FTIME ftimeLastWrite;
- 12 ULONG cbFile file length in bytes
- 16 ULONG cbFileAlloc size of file allocation unit
- 20 USHORT attrFile
- } FILESTATUS;
- *************************************************************/
-
- /* Use the l1_ defines from DosFindFirst */
-
- /**********************************************************
- For DosQueryPathInfo/DosQueryFileInfo/DosSetPathInfo/
- DosSetFileInfo - level 2
-
- typedef struct _FILESTATUS2 {
- Byte offset Type name description
- -------------+-------+-------------------+--------------
- 0 FDATE fdateCreation;
- 2 FTIME ftimeCreation;
- 4 FDATE fdateLastAccess;
- 6 FTIME ftimeLastAccess;
- 8 FDATE fdateLastWrite;
- 10 FTIME ftimeLastWrite;
- 12 ULONG cbFile file length in bytes
- 16 ULONG cbFileAlloc size of file allocation unit
- 20 USHORT attrFile
- 22 ULONG cbList Length of EA's (0)
- } FILESTATUS2;
- *************************************************************/
-
- /* Use the l2_ #defines from DosFindFirst */
-
- /**********************************************************
- For DosQFSInfo/DosSetFSInfo - level 1
-
- typedef struct _FSALLOCATE {
- Byte offset Type name description
- -------------+-------+-------------------+--------------
- 0 ULONG idFileSystem id of file system
- 4 ULONG cSectorUnit number of sectors per allocation unit
- 8 ULONG cUnit number of allocation units
- 12 ULONG cUnitAvail Available allocation units
- 16 USHORT cbSector bytes per sector
- } FSALLOCATE;
- *************************************************************/
-
- #define l1_idFileSystem 0
- #define l1_cSectorUnit 4
- #define l1_cUnit 8
- #define l1_cUnitAvail 12
- #define l1_cbSector 16
-
- /**********************************************************
- For DosQFSInfo/DosSetFSInfo - level 2
-
- typedef struct _FSINFO {
- Byte offset Type name description
- -------------+-------+-------------------+--------------
- 0 FDATE vol_fdateCreation
- 2 FTIME vol_ftimeCreation
- 4 UCHAR vol_cch length of volume name (excluding NULL)
- 5 UCHAR vol_szVolLabel[12] volume name
- } FSINFO;
- *************************************************************/
-
- #define l2_vol_fdateCreation 0
- #define l2_vol_cch 4
- #define l2_vol_szVolLabel 5
-
- /* Function prototypes */
-
- int lanman2_match( char *, char *, int);
-
- int call_trans2open(char *inbuf, char *outbuf, int bufsize, int cnum,
- char **pparams, char **ppdata);
-
- int call_trans2findfirst(char *inbuf, char *outbuf, int bufsize, int cnum,
- char **pparams, char **ppdata);
-
- int call_trans2setfsinfo(char *inbuf, char *outbuf, int length, int bufsize,
- int cnum, char **pparams, char **pdata);
-
- int call_trans2qpathinfo(char *inbuf, char *outbuf, int length, int bufsize,
- int cnum, char **pparams, char **pdata);
-
- int call_trans2setpathinfo(char *inbuf, char *outbuf, int length, int bufsize,
- int cnum, char **pparams, char **pdata);
-
- int call_trans2qfileinfo(char *inbuf, char *outbuf, int length, int bufsize,
- int cnum, char **pparams, char **pdata);
-
- int call_trans2setfileinfo(char *inbuf, char *outbuf, int length, int bufsize,
- int cnum, char **pparams, char **pdata);
-
- int call_trans2mkdir(char *inbuf, char *outbuf, int length, int bufsize,
- int cnum, char **pparams, char **pdata);
-
- int call_trans2findnotifyfirst(char *inbuf, char *outbuf, int length, int bufsize,
- int cnum, char **pparams, char **pdata);
-
- int call_trans2findnotifynext(char *inbuf, char *outbuf, int length, int bufsize,
- int cnum, char **pparams, char **pdata);
-
- int reply_findnclose(char *inbuf,char *outbuf,int length,int bufsize);
-
- int reply_findclose(char *inbuf,char *outbuf,int length,int bufsize);
-
- #endif
-
-