A2osX/SBIN/CIFSD.S.txt

701 lines
16 KiB
Plaintext
Raw Normal View History

2019-06-13 15:30:28 +00:00
NEW
AUTO 3,1 Enable MASM3 auto line num
.LIST OFF
.OP 65C02 Target CPU, must match CPU level in header
.OR $2000 usualy $2000, but any value > $100 allowed
2020-06-13 19:27:06 +00:00
.TF sbin/cifsd
*--------------------------------------
AUTH .EQ 0
2019-06-13 15:30:28 +00:00
*--------------------------------------
2020-06-13 19:27:06 +00:00
.INB inc/macros.i
.INB inc/a2osx.i
2023-01-17 06:31:23 +00:00
.INB inc/kernel.i
2020-06-13 19:27:06 +00:00
.INB inc/mli.e.i
.INB inc/eth.i
.INB inc/libtcpip.i
2023-01-17 06:31:23 +00:00
.INB inc/net.tcpip.i
2020-06-13 19:27:06 +00:00
.INB inc/net.smb.i
.DO AUTH
.INB inc/libcrypt.i
.FIN
2019-06-14 15:16:48 +00:00
*--------------------------------------
2021-01-12 21:14:13 +00:00
TIMEOUT.MAX .EQ 250 25 sec.
2019-06-13 15:30:28 +00:00
*--------------------------------------
* Zero Page Segment, up to 32 bytes
*--------------------------------------
.DUMMY
.OR ZPBIN
ZS.START
2023-01-17 06:31:23 +00:00
ZPCtxPtr .BS 2
ZPReqPtr .BS 2
ZPReqLen .BS 2
ZPRespPtr .BS 2
ZPPtr1 .BS 2
ZPPtr2 .BS 2
pPath .BS 2
pFD .BS 2
2021-01-12 21:14:13 +00:00
ZS.END .ED
2019-06-13 15:30:28 +00:00
*--------------------------------------
* File Header (16 Bytes)
*--------------------------------------
CS.START cld
jmp (.1,x)
.DA #$61 6502,Level 1 (65c02)
.DA #1 BIN Layout Version 1
2019-06-14 15:16:48 +00:00
.DA #S.PS.F.EVENT
2019-06-13 15:30:28 +00:00
.DA #0
.DA CS.END-CS.START Code Size (without Constants)
.DA DS.END-DS.START Data SegmentSize
.DA #64 Stack Size
.DA #ZS.END-ZS.START Zero Page Size
.DA 0
*--------------------------------------
* Relocation Table
2019-10-03 06:25:27 +00:00
*--------------------------------------
2019-06-13 15:30:28 +00:00
.1 .DA CS.INIT
.DA CS.RUN
2021-01-12 21:14:13 +00:00
.DA CS.DOEVENT
2019-06-13 15:30:28 +00:00
.DA CS.QUIT
2019-06-14 15:16:48 +00:00
L.LIBTCPIP .DA LIBTCPIP
.DO AUTH
L.LIBCRYPT .DA LIBCRYPT
.FIN
2019-06-14 15:16:48 +00:00
L.MSG.USAGE .DA MSG.USAGE
2021-01-14 21:39:36 +00:00
L.MSG.TCPIPERR .DA MSG.TCPIPERR
2019-06-14 15:16:48 +00:00
L.MSG.UNKNOWN .DA MSG.UNKNOWN
2021-01-14 21:39:36 +00:00
L.MSG.CONNECTED .DA MSG.CONNECTED
2021-02-11 22:08:22 +00:00
L.MSG.NOCONN .DA MSG.NOCONN
L.MSG.MOUNTED .DA MSG.MOUNTED
2023-01-17 06:31:23 +00:00
*--------------------------------------
L.NETBIOS.H .DA NETBIOS.H
L.IO.CallBack .DA IO.CallBack
*--------------------------------------
J.IO.Q .DA A2osX.BADCALL
.DA IO.Q.ChMod
.DA IO.Q.FStat
.DA IO.Q.Stat
.DA IO.Q.MKDir
.DA A2osX.BADCALL MKNod
.DA A2osX.BADCALL MKFIFO
.DA A2osX.BADCALL Pipe
.DA IO.Q.OpenDir
.DA IO.Q.ReadDir
.DA IO.Q.CloseDir
.DA A2osX.BADCALL Open
.DA A2osX.BADCALL Close
.DA A2osX.BADCALL Read
.DA A2osX.BADCALL Write
.DA IO.Q.ChOwn
.DA A2osX.BADCALL
.DA A2osX.BADCALL
.DA A2osX.BADCALL
.DA A2osX.BADCALL
.DA A2osX.BADCALL
.DA A2osX.BADCALL
.DA A2osX.BADCALL
.DA A2osX.BADCALL
.DA IO.Q.FOpen
.DA IO.Q.FClose
.DA IO.Q.FRead
.DA IO.Q.FWrite
.DA IO.Q.FFlush
.DA IO.Q.FSeek
.DA IO.Q.FTell
.DA IO.Q.FEOF
.DA IO.Q.Remove
.DA IO.Q.Rename
.DA A2osX.BADCALL
.DA A2osX.BADCALL
.DA A2osX.BADCALL
.DA A2osX.BADCALL
.DA A2osX.BADCALL
.DA A2osX.BADCALL
.DA A2osX.BADCALL
.DA A2osX.BADCALL
.DA A2osX.BADCALL
.DA A2osX.BADCALL
.DA A2osX.BADCALL
.DA IO.Q.ChTyp
.DA IO.Q.ChAux
.DA IO.Q.SetAttr
*--------------------------------------
J.IO.R .DA A2osX.BADCALL
.DA IO.R.ChMod
.DA IO.R.FStat
.DA IO.R.Stat
.DA IO.R.MKDir
.DA A2osX.BADCALL MKNod
.DA A2osX.BADCALL MKFIFO
.DA A2osX.BADCALL Pipe
.DA A2osX.BADCALL IO.R.OpenDir
.DA IO.R.ReadDir
.DA A2osX.BADCALL IO.R.CloseDir
.DA A2osX.BADCALL Open
.DA A2osX.BADCALL Close
.DA A2osX.BADCALL Read
.DA A2osX.BADCALL Write
.DA IO.R.ChOwn
.DA A2osX.BADCALL FPutC...
.DA A2osX.BADCALL
.DA A2osX.BADCALL
.DA A2osX.BADCALL
.DA A2osX.BADCALL
.DA A2osX.BADCALL
.DA A2osX.BADCALL
.DA A2osX.BADCALL ...UngetC
.DA IO.R.FOpen
.DA IO.R.FClose
.DA IO.R.FRead
.DA IO.R.FWrite
.DA IO.R.FFlush
.DA A2osX.BADCALL IO.R.FSeek
.DA A2osX.BADCALL IO.R.FTell
.DA IO.R.FEOF
.DA IO.R.Remove
.DA IO.R.Rename
.DA A2osX.BADCALL
.DA A2osX.BADCALL
.DA A2osX.BADCALL
.DA A2osX.BADCALL
.DA A2osX.BADCALL
.DA A2osX.BADCALL
.DA A2osX.BADCALL
.DA A2osX.BADCALL
.DA A2osX.BADCALL
.DA A2osX.BADCALL
.DA A2osX.BADCALL
.DA IO.R.ChTyp
.DA IO.R.ChAux
.DA IO.R.SetAttr
2019-06-13 15:30:28 +00:00
.DA 0
*--------------------------------------
* Called once at process creation
* Put code for loading LIB here
*--------------------------------------
CS.INIT >LDYA L.LIBTCPIP
>SYSCALL LoadLib
2019-07-07 20:48:57 +00:00
bcs .9
2021-01-12 21:14:13 +00:00
2019-06-13 15:30:28 +00:00
sta hLIBTCPIP
2023-01-17 06:31:23 +00:00
>SYSCALL2 GetMemPtr
>STYA pLIBTCPIP
2021-01-12 21:14:13 +00:00
.DO AUTH
>LDYA L.LIBCRYPT
>SYSCALL LoadLib
bcs .9
sta hLIBCRYPT
.FIN
2021-01-12 21:14:13 +00:00
* clc
2023-01-17 06:31:23 +00:00
.9 rts
2020-06-13 19:27:06 +00:00
*--------------------------------------
* Called until exit with CS
* if RUN exits with CC, RUN entered again
*--------------------------------------
2021-01-12 21:14:13 +00:00
CS.RUN lda hSocket
2023-01-17 06:31:23 +00:00
bne .8
2019-06-14 15:16:48 +00:00
2023-01-17 06:31:23 +00:00
jsr CS.RUN.CheckTCPIP
bcs .9
2021-01-12 21:14:13 +00:00
jsr CS.RUN.CheckArgs
2023-01-17 06:31:23 +00:00
bcs .9
2019-07-12 06:22:32 +00:00
2019-07-07 20:48:57 +00:00
jsr CS.RUN.Connect
2020-06-17 19:05:36 +00:00
bcs .9
2021-01-12 21:14:13 +00:00
2023-01-17 06:31:23 +00:00
jsr INIT.Setup
2021-02-11 22:08:22 +00:00
bcs .9
2021-01-12 21:14:13 +00:00
2021-02-11 22:08:22 +00:00
>PUSHW L.MSG.MOUNTED
2021-05-19 12:44:47 +00:00
2021-02-11 22:08:22 +00:00
lda #2
>SYSCALL ArgV
>PUSHYA
2021-05-19 12:44:47 +00:00
2021-02-11 22:08:22 +00:00
lda #3
>SYSCALL ArgV
>PUSHYA
2021-05-19 12:44:47 +00:00
2021-02-11 22:08:22 +00:00
>PUSHBI 4
>SYSCALL PrintF
2021-01-12 21:14:13 +00:00
2023-01-17 06:31:23 +00:00
.8 lda #0
2020-06-13 19:27:06 +00:00
clc
2019-07-07 20:48:57 +00:00
.9 rts
2021-01-12 21:14:13 +00:00
*--------------------------------------
CS.RUN.CheckTCPIP
>LIBCALL hLIBTCPIP,LIBTCPIP.GETCFG is TCPIP loaded ?
bcs .9
2020-06-13 19:27:06 +00:00
2023-01-17 06:31:23 +00:00
>STYA ZPPtr1
lda (ZPPtr1) Configured ?
2021-01-12 21:14:13 +00:00
bmi .1
>LDYA L.MSG.TCPIPERR
2020-02-28 07:21:46 +00:00
>SYSCALL PutS
2021-01-12 21:14:13 +00:00
2019-06-13 15:30:28 +00:00
lda #E.SYN
sec
2021-01-12 21:14:13 +00:00
.9 rts
.1 lda #AF.INET
>STA.G SA.LOCAL
>STA.G SA.REMOTE
ldy #S.IPCFG.IP+3
2023-01-17 06:31:23 +00:00
.3 lda (ZPPtr1),y
2021-01-12 21:14:13 +00:00
pha
dey
cpy #S.IPCFG.IP-1
bne .3
ldy #SA.LOCAL+S.SOCKADDR.ADDR
.4 pla
sta (pData),y
iny
cpy #SA.LOCAL+S.SOCKADDR.ADDR+4
bne .4
lda #TCP.PORT.CIFS
>STA.G SA.REMOTE+S.SOCKADDR.PORT
iny
lda /TCP.PORT.CIFS
sta (pData),y
clc
2019-06-13 15:30:28 +00:00
rts
*--------------------------------------
CS.RUN.CheckArgs
ldy #S.PS.ARGC
2020-02-28 07:21:46 +00:00
lda (pPS),y
2019-06-13 15:30:28 +00:00
cmp #3
2021-01-12 21:14:13 +00:00
bcs .1
2019-06-14 15:16:48 +00:00
2021-01-12 21:14:13 +00:00
>LDYA L.MSG.USAGE
>SYSCALL PutS
lda #E.SYN
sec
rts
.1 lda #TIMEOUT.MAX
2019-06-14 15:16:48 +00:00
sta TimeOut
2021-01-12 21:14:13 +00:00
.2 >PUSHEA.G SA.REMOTE+S.SOCKADDR.ADDR
2019-06-14 15:16:48 +00:00
lda #1
>SYSCALL ArgV
>PUSHYA
2020-08-23 19:46:37 +00:00
>LIBCALL hLIBTCPIP,LIBTCPIP.HST.GetByName
2021-01-12 21:14:13 +00:00
bcc .3
2019-06-14 15:16:48 +00:00
>SLEEP
lda TimeOut
2021-01-12 21:14:13 +00:00
bne .2
2020-06-13 19:27:06 +00:00
>PUSHW L.MSG.UNKNOWN
2019-06-14 15:16:48 +00:00
lda #1
>SYSCALL ArgV
>PUSHYA
>PUSHBI 2
2020-02-28 07:21:46 +00:00
>SYSCALL PrintF
2021-02-11 22:08:22 +00:00
lda #ERR.SKT.NOCONN
2019-06-14 15:16:48 +00:00
sec
2021-01-12 21:14:13 +00:00
rts
2019-06-14 15:16:48 +00:00
.3 lda #4
2021-01-12 21:14:13 +00:00
>SYSCALL ArgV
bcc .4
2023-01-17 06:31:23 +00:00
.4
2019-06-14 15:16:48 +00:00
.8 clc
2021-01-14 21:39:36 +00:00
CS.RUN.CheckArgs.RTS
2019-06-14 15:16:48 +00:00
rts
2019-06-13 15:30:28 +00:00
*--------------------------------------
2021-05-19 12:44:47 +00:00
CS.RUN.Connect >PUSHBI S.SOCKET.T.SEQPKT
>PUSHBI 0 no protocol
2019-06-14 15:16:48 +00:00
>LIBCALL hLIBTCPIP,LIBTCPIP.Socket
2021-02-11 22:08:22 +00:00
bcs .9
2019-06-14 15:16:48 +00:00
2021-01-12 21:14:13 +00:00
sta hSocket
2019-06-14 15:16:48 +00:00
2021-05-19 12:44:47 +00:00
>PUSHA
2019-07-07 20:48:57 +00:00
>PUSHEA.G SA.LOCAL
2019-06-14 15:16:48 +00:00
>LIBCALL hLIBTCPIP,LIBTCPIP.Bind
bcs .9
2021-01-12 21:14:13 +00:00
lda #TIMEOUT.MAX
sta TimeOut
.1 >SLEEP
2021-05-19 12:44:47 +00:00
>PUSHB hSocket
2021-03-12 12:50:03 +00:00
>PUSHEA.G SA.REMOTE
>LIBCALL hLIBTCPIP,LIBTCPIP.Connect
bcc .8
2021-01-12 21:14:13 +00:00
ldx TimeOut
bne .1
2021-02-11 22:08:22 +00:00
.9 pha
2021-05-19 12:44:47 +00:00
2021-02-11 22:08:22 +00:00
>PUSHW L.MSG.NOCONN
lda #1
>SYSCALL ArgV
>PUSHYA
>PUSHBI 2
pla
2021-01-12 21:14:13 +00:00
sec
rts
2021-01-14 21:39:36 +00:00
.8 >PUSHW L.MSG.CONNECTED
lda #1
>SYSCALL ArgV
2020-06-17 19:05:36 +00:00
>PUSHYA
>PUSHBI 2
2020-08-23 19:46:37 +00:00
>SYSCALL PrintF
2021-02-11 22:08:22 +00:00
rts
2019-06-13 15:30:28 +00:00
*--------------------------------------
2019-06-14 15:16:48 +00:00
CS.DOEVENT lda (pEvent)
bpl .9 is it a TIMER event?
2021-01-12 21:14:13 +00:00
2019-06-14 15:16:48 +00:00
lda TimeOut
beq .9
2021-01-12 21:14:13 +00:00
2019-06-14 15:16:48 +00:00
dec TimeOut
2021-02-11 22:08:22 +00:00
2019-06-14 15:16:48 +00:00
.9 sec do not discard TIMER event
2019-06-13 15:30:28 +00:00
rts
*--------------------------------------
2021-01-12 21:14:13 +00:00
CS.QUIT lda hMount
beq .1
2019-06-13 15:30:28 +00:00
2021-01-12 21:14:13 +00:00
>SYSCALL UMount
2020-06-17 19:05:36 +00:00
2021-01-12 21:14:13 +00:00
.1 lda hSocket
beq .2
2020-06-17 19:05:36 +00:00
2021-01-12 21:14:13 +00:00
>LIBCALL hLIBTCPIP,LIBTCPIP.Shutdown
2020-06-17 19:05:36 +00:00
2023-01-17 06:31:23 +00:00
.2 lda hSMBContext
beq .3
>SYSCALL FreeMem
.3 .DO AUTH
lda hLIBCRYPT
jsr .7
.FIN
2020-06-17 19:05:36 +00:00
lda hLIBTCPIP
.7 beq .8
2021-01-12 21:14:13 +00:00
>SYSCALL UnloadLib
.8 clc
2020-06-17 19:05:36 +00:00
rts
2023-01-17 06:31:23 +00:00
*--------------------------------------
.INB usr/src/sbin/cifsd.s.init
.INB usr/src/sbin/cifsd.s.core
.INB usr/src/sbin/cifsd.s.io
2020-06-17 19:05:36 +00:00
*--------------------------------------
2019-06-13 15:30:28 +00:00
CS.END
*--------------------------------------
* Initialized DATA
*--------------------------------------
2020-06-13 19:27:06 +00:00
LIBTCPIP .AZ "libtcpip"
2019-06-13 15:30:28 +00:00
hLIBTCPIP .BS 1
2023-01-17 06:31:23 +00:00
pLIBTCPIP .BS 2
.DO AUTH
LIBCRYPT .AZ "libcrypt"
hLIBCRYPT .BS 1
.FIN
*--------------------------------------
MSG.USAGE .AZ "Usage : CIFSD <ip|host> sharename mountpoint [[domain\]user]"
2022-11-02 06:54:30 +00:00
MSG.TCPIPERR .CZ "CIFSD:TCP/IP Not initialized properly."
MSG.UNKNOWN .CZ "CIFSD:%s: Unknown host\r\n"
MSG.NOCONN .CZ "CIFSD:No Connection To %s\r\n"
MSG.CONNECTED .CZ "CIFSD:Connected To %s\r\n"
MSG.MOUNTED .CZ "CIFSD:%s Mounted As %s\r\n"
2023-01-17 06:31:23 +00:00
*--------------------------------------
PRODOS.FT.HEX .HS 0406FAFCFDCBCCCFFF
PRODOS.FT.TXT .AZ "txt"
.AZ "bin"
.AZ "asm"
.AZ "bas"
.AZ "var"
.AZ "pix"
.AZ "fon"
.AZ "pak"
.AZ "sys"
PRODOS.FT.END .EQ *-PRODOS.FT.TXT
*--------------------------------------
SMBERR01 .DA #2,#3,#32
MLIERR01 .DA #MLI.E.FNOTFND,#MLI.E.PNOTFND,#MLI.E.OPEN
*--------------------------------------
NETBIOS.H .DA #0 DIRECT TCP TRANSPORT
.DA #0 24 BITS LENGTH
.DA /SMB.NegReq.end-SMB.H
.DA #SMB.NegReq.end-SMB.H
*--------------------------------------
SMB.H .DA #$FF
.AS "SMB"
.DA #S.SMB.H.CMD.NEGOTIATE
.HS 00000000
.DA #0 S.SMB.H.FLAGS
.DA S.SMB.H.FLAGS2.LONGNAMES
.DA 0 PIDHI
.HS 0000000000000000 SECFEAT
.DA 0 RSVD
.DA $FFFF TID
.DA $FFFE PIDLO
.BS 2 UID
.DA 0 MID
*--------------------------------------
SMB.NegReq .DA #0 WORD COUNT
.DA #SMB.NegReq.end-2-* ByteCount
.DA #0
* .DA #2
* .AZ "PC NETWORK PROGRAM 1.0"
* .DA #2
* .AZ "LANMAN1.0"
* .DA #2
* .AZ "Windows for Workgroups 3.1a"
* .DA #2
* .AZ "LM1.2X002"
* .DA #2
* .AZ "LANMAN2.1"
.DA #2
.AZ "NT LM 0.12"
* .DA #2
* .AZ "SMB 2.002"
* .DA #2
* .AZ "SMB 2.???"
SMB.NegReq.end .EQ *
*--------------------------------------
SMB.SessionSetup.H
.DA #13 WORD COUNT
.HS FF000000 NO MORE CMD
.DA 1280 MAX BUFFER
.DA 2 MAX MPX COUNT
.HS 0000 VC NUMBER
.HS 00000000 SESSION KEY
.BS 2 CI PASS LEN (ANSI)
.DA 0 CS PASS LEN (UNICODE)
.HS 00000000
.HS 00000000 CAPABILITIES
SMB.SessionSetup.H.Len .EQ *-SMB.SessionSetup.H
* .BS 2 ByteCount
SMB.SessionSetup.Guest
* .AZ "" Password
.AZ "Guest" Account Name
.AZ "?" Primary Domain
SMB.SessionSetup.Guest.Len .EQ *-SMB.SessionSetup.Guest
SMB.SessionSetup.T
.AZ "A2osX" Native OS
.AZ "A2osX-CIFSD" Native LANMAN
SMB.SessionSetup.T.Len .EQ *-SMB.SessionSetup.T
*--------------------------------------
SMB.TreeConnect.H
.DA #4 WORD COUNT
.HS FF000000 NO MORE CMD
.DA 0
.DA 1 PASSWORD LEN (1 for "\0")
SMB.TreeConnect.H.Len .EQ *-SMB.TreeConnect.H
* .BS 2 ByteCount
* .AZ "" PASSWORD
* .AZ "_temp" PATH
SMB.TreeConnect.T
.AZ "A:" Disk Share
SMB.TreeConnect.T.Len .EQ *-SMB.TreeConnect.T
*--------------------------------------
SMB.ComCreate.H .DA #24 WORD COUNT
.HS FF000000 NO MORE CMD
.HS 00 Reserved
.BS 2 NameLength
.HS 00000000 Flags
.HS 00000000 RootDirectoryFID
.HS 00000010 DesiredAccess = GENERIC_ALL
.HS 0000000000000000 AllocationSize
.HS 00000000 ExtFileAttributes
.HS 00000000 ShareAccess
.BS 4 CreateDisposition
.HS 00000000 CreateOptions
.HS 00000000 ImpersonationLevel
.HS 00 SecurityFlags
SMB.ComCreate.H.Len .EQ *-SMB.ComCreate.H
* .BS 2 ByteCount
* .AZ "path\file"
*--------------------------------------
SMB.ComClose.H .DA #3 WORD COUNT
.BS 2 FID
.HS 00000000 LastTimeModified
.HS 0000 ByteCount
SMB.ComClose.H.Len .EQ *-SMB.ComClose.H
*--------------------------------------
SMB.ComFlush.H .DA #1 WORD COUNT
.BS 2 FID
.HS 0000 ByteCount
SMB.ComFlush.H.Len .EQ *-SMB.ComFlush.H
*--------------------------------------
SMB.ComDelete.H .DA #1 WORD COUNT
.HS 0000 SearchAttributes
SMB.ComDelete.H.Len .EQ *-SMB.ComDelete.H
* .BS 2 ByteCount
* .HS 04 BufferFormat
* .AZ "path\file"
*--------------------------------------
SMB.ComRename.H .DA #1 WORD COUNT
.HS 0000 SearchAttributes
SMB.ComRename.H.Len .EQ *-SMB.ComRename.H
* .BS 2 ByteCount
* .HS 04 BufferFormat
* .AZ "oldpath"
* .HS 04 BufferFormat
* .AZ "newpath"
*--------------------------------------
SMB.ComRead.H .DA #10 WORD COUNT
.HS FF000000 NO MORE CMD
.BS 2 FID
.BS 4 Offset
.BS 2 MaxCountOfBytesToReturn
.HS 0000 MinCountOfBytesToReturn
.HS 00000000 Timeout
.HS 0000 Remaining
SMB.ComRead.H.Len .EQ *-SMB.ComRead.H
* .BS 2 ByteCount
*--------------------------------------
SMB.ComWrite.H .DA #12 WORD COUNT
.HS FF000000 NO MORE CMD
.BS 2 FID
.BS 4 Offset
.HS 00000000 Timeout
.HS 0000
* .HS 0100 WriteMode=WritethroughMode
.HS 0000 Remaining
.HS 0000 Reserved
.BS 2 DataLength
.DA S.SMB.H+SMB.ComWrite.H.Len+2 DataOffset (+2 skip ByteCount)
SMB.ComWrite.H.Len .EQ *-SMB.ComWrite.H
* .BS 2 ByteCount
* DATA.....
*--------------------------------------
SMB.Trans2.H .DA #15 WORD COUNT
.BS 2 TotalParamCount
.DA 0 TotalDataCount
.DA 10 MaxParameterCount
.DA 450 MaxDataCount
.DA #0 MaxSetupCount
.HS 00 Reserved1
.DA 0 Flags
.HS 00000000 Timeout
.HS 0000 Reserved2
.BS 2 ParameterCount
.DA 68 ParameterOffset
.HS 0000 DataCount
.HS 0000 DataOffset
.DA #1 SetupCount
.HS 00 Reserved3
SMB.Trans2.H.Len .EQ *-SMB.Trans2.H
*--------------------------------------
SMB.FindFirst2 .DA 1 TRANS2_FIND_FIRST2
.BS 2 PrmCnt
.HS 000000 Padding
.DA $0037 SearchAttributes
.DA 1024 SearchCount
.DA 2 Flags
.DA SMB_INFO_STANDARD InformationLevel
.HS 00000000 SearchStorageType
* .AZ "path\*"
SMB.FindFirst2.Len .EQ *-SMB.FindFirst2
*--------------------------------------
SMB.FindNext2 .DA 2 TRANS2_FIND_NEXT2
.BS 2 PrmCnt
.HS 000000 Padding
.BS 2 SID
.DA 1024 SearchCount
.DA SMB_INFO_STANDARD InformationLevel
.HS 00000000 ResumeKey
.DA 2+8 Flags
* .AZ "path\*"
SMB.FindNext2.Len .EQ *-SMB.FindNext2
*--------------------------------------
SMB.QueryPathInfo
.DA 5 TRANS2_QUERY_PATH_INFORMATION
.BS 2 PrmCnt
.HS 000000 Padding
.DA SMB_INFO_STANDARD InformationLevel
.HS 00000000 SearchStorageType
* .AZ "filename"
SMB.QueryPathInfo.Len .EQ *-SMB.QueryPathInfo
*--------------------------------------
SMB.CreateDirectory
.DA 13 TRANS2_CREATE_DIRECTORY
.BS 2 PrmCnt
.HS 000000 Padding
.HS 00000000 Reserved
* .AZ "DirName"
SMB.CreateDirectory.Len .EQ *-SMB.CreateDirectory
*--------------------------------------
CIFS.Status .BS 1
CIFS.PID .BS 1
CIFS.Cnt .BS 2
*--------------------------------------
hSocket .BS 1
hSMBContext .BS 1
hMount .BS 1
hReq .BS 1
hResp .BS 1
hBuf .BS 1
hFD .BS 1
hFILE .BS 1
TimeOut .BS 1
bFlag .BS 1
ByteCountOfs .BS 1
StatBuf .BS S.STAT
SaveYA .BS 2
SaveZP .BS ZS.END-ZS.START
2019-06-13 15:30:28 +00:00
*--------------------------------------
.DUMMY
.OR 0
DS.START
2019-06-14 15:16:48 +00:00
SA.LOCAL .BS 1 S.SOCKADDR.AF
2019-06-13 15:30:28 +00:00
.BS 1
.BS 4 S.SOCKADDR.ADDR
.BS 2 S.SOCKADDR.PORT
2019-06-14 15:16:48 +00:00
SA.REMOTE .BS 1 S.SOCKADDR.AF
2019-06-13 15:30:28 +00:00
.BS 1
.BS 4 S.SOCKADDR.ADDR
2019-06-14 15:16:48 +00:00
.BS 2 S.SOCKADDR.PORT
2019-06-13 15:30:28 +00:00
DS.END
.ED
*--------------------------------------
MAN
2020-08-09 19:47:42 +00:00
SAVE usr/src/sbin/cifsd.s
2019-06-13 15:30:28 +00:00
ASM