Kernel 0.9.2

This commit is contained in:
Rémy GIBERT 2018-09-26 17:36:32 +02:00
parent a0d15ed1c8
commit fb84fb6796
3 changed files with 70 additions and 4 deletions

View File

@ -51,6 +51,9 @@ LIBTCPIP.SKT.Read .EQ 44
LIBTCPIP.SKT.Write .EQ 46 LIBTCPIP.SKT.Write .EQ 46
LIBTCPIP.SKT.Rcvd .EQ 48 LIBTCPIP.SKT.Rcvd .EQ 48
LIBTCPIP.SKT.Send .EQ 50 LIBTCPIP.SKT.Send .EQ 50
LIBTCPIP.SKT.RcvdFrom .EQ 52
LIBTCPIP.SKT.SendTo .EQ 54
*-------------------------------------- *--------------------------------------
ERR.SKT.OOS .EQ $BF ERR.SKT.OOS .EQ $BF
ERR.SKT.BUSY .EQ $BE ERR.SKT.BUSY .EQ $BE
@ -107,11 +110,16 @@ S.DNSCACHE.IP .EQ 8
* *
S.DNSCACHE .EQ 12 S.DNSCACHE .EQ 12
*-------------------------------------- *--------------------------------------
S.SOCKADDR.IP .EQ 0
S.SOCKADDR.IP .EQ 4
*
S.SOCKADDR .EQ 6
*--------------------------------------
S.SOCKET.SOCK .EQ 0 S.SOCKET.SOCK .EQ 0
S.SOCKET.SOCK.DGRAM .EQ 1 S.SOCKET.SOCK.RAW .EQ 0
S.SOCKET.SOCK.STREAM .EQ 2 S.SOCKET.SOCK.DGRAM .EQ 2
S.SOCKET.SOCK.RAW .EQ 3 S.SOCKET.SOCK.STREAM .EQ 4
S.SOCKET.SOCK_SEQPACKET .EQ 6
S.SOCKET.SO .EQ 1 S.SOCKET.SO .EQ 1
S.SOCKET.SO.DEBUG .EQ $01 S.SOCKET.SO.DEBUG .EQ $01
S.SOCKET.SO.ACCEPTCONN .EQ $02 S.SOCKET.SO.ACCEPTCONN .EQ $02

View File

@ -3,6 +3,62 @@ PREFIX /A2OSX.BUILD
AUTO 4,1 AUTO 4,1
.LIST OFF .LIST OFF
*/-------------------------------------- */--------------------------------------
* # SKT.Socket
* Create a new socket
* ## C
* `hSOCKET socket(int type, int protocol);`
* ## ASM
* **In:**
* `>PUSHW protocol`
* `lda type`
* `>LIBCALL hLIBTCPIP,LIBTCPIP.socket`
* **Out:**
* CC: A = hSOCKET
* CS: A = EC
*\--------------------------------------
*/--------------------------------------
* # SKT.bind
* Create a new socket
* ## C
* `int bind(hFD fd, const struct sockaddr *addr);`
* ## ASM
* **In:**
* `>PUSHW addr`
* `lda fd`
* `>LIBCALL hLIBTCPIP,LIBTCPIP.socket`
* **Out:**
* CC: A = hSOCKET
* CS: A = EC
*\--------------------------------------
*/--------------------------------------
* # SKT.connect
* Create a new socket
* ## C
* `int connect(hFD fd, const struct sockaddr *addr);`
* ## ASM
* **In:**
* `>PUSHW addr`
* `lda fd`
* `>LIBCALL hLIBTCPIP,LIBTCPIP.socket`
* **Out:**
* CC: A = hSOCKET
* CS: A = EC
*\--------------------------------------
*/--------------------------------------
* # SKT.listen
* Create a new socket
* ## C
* `int listen(hFD fd);`
* ## ASM
* **In:**
* `>PUSHW addr`
* `lda fd`
* `>LIBCALL hLIBTCPIP,LIBTCPIP.socket`
* **Out:**
* CC: A = hSOCKET
* CS: A = EC
*\--------------------------------------
*/--------------------------------------
* # SKT.New * # SKT.New
* Create a new socket * Create a new socket
* ## C * ## C

View File

@ -347,6 +347,8 @@ FRM.QUEUE.Retry .BS K.FRMQUEUE.SIZE
FRM.QUEUE.LenL .BS K.FRMQUEUE.SIZE FRM.QUEUE.LenL .BS K.FRMQUEUE.SIZE
FRM.QUEUE.LenH .BS K.FRMQUEUE.SIZE FRM.QUEUE.LenH .BS K.FRMQUEUE.SIZE
*-------------------------------------- *--------------------------------------
SKT.TABLE .BS K.SKTTABLE.SIZE
*--------------------------------------
RefCount .DA #0 RefCount .DA #0
hSocketTable .BS 1 hSocketTable .BS 1
DYNPORT.LAST .DA K.DYNPORT.START DYNPORT.LAST .DA K.DYNPORT.START