A2osX/.Docs/LIBTCPIP.md

158 lines
2.5 KiB
Markdown
Raw Normal View History

*** Auto generated by docgen.cmd ***
2017-03-30 09:03:23 +00:00
2018-06-18 08:44:02 +00:00
# ARP.Clear
Clear ARP Cache
**In:**
**Out:**
# ARP.Query
Query ARP Cache and returns HW address
**In:**
PUSHW PTR to MAC (to fill)
PUSHW PTR to IP
**Out:**
CC: hit: MAC filled
CS: missed
# ARP.Add
Add a static ARP cache record
**In:**
PUSHW PTR to MAC
PUSHW PTR to IP
# ARP.GetCAche
Return a Ptr to ARP Cache Table
**In:**
**Out:**
Y,A = PTR to ARP.CACHE
# DNS.Clear
Clear DNS Cache
**In:**
**Out:**
# DNS.Query
Query DNS for specified host
**In:**
PUSHW = PTR to IP to fill with cached data
* PUSHW = hostname PTR to PSTR
**Out:**
CC: hit: IP filled with address
CS: missed
# DNS.Add
Add a static DNS record
**In:**
PUSHW = PTR to IP
PUSHW = hostname CSTR to Add
# DNS.GetCAche
Return a Ptr to DNS Cache Table
**In:**
**Out:**
Y,A = PTR to DNS.CACHE
# SKT.New
2018-09-17 15:42:38 +00:00
Create a new socket
## C
`hSOCKET skt.new(void *template);`
## ASM
**In:**
2018-09-20 15:33:05 +00:00
`>PUSHW template`
2018-09-17 15:42:38 +00:00
`>LIBCALL hLIBTCPIP,LIBTCPIP.SKT.New`
**Out:**
CC: A = hSOCKET
CS: A = EC
2018-06-18 08:44:02 +00:00
2018-07-24 06:24:23 +00:00
# SKT.Close
2018-06-18 08:44:02 +00:00
Close socket
**In:**
A = hSocket
**Out:**
2018-07-24 06:24:23 +00:00
# SKT.Get
2018-06-18 08:44:02 +00:00
Get Ptr to socket
**In:**
A = hSocket
**Out:**
Y,A = pS.SOCKET
# SKT.GetTable
Get socket table
**In:**
**Out:**
Y,A = pS.SOCKET
2018-07-24 06:24:23 +00:00
# SKT.Accept
2018-06-18 08:44:02 +00:00
Check for an incoming connection
**In:**
A = hListeningSocket
**Out:**
A = hSocket
2018-07-24 06:24:23 +00:00
# SKT.MkNod
2018-09-17 15:42:38 +00:00
## C
2018-09-20 15:33:05 +00:00
`hFD skt.mknod(hSOCKET s);`
2018-09-17 15:42:38 +00:00
## ASM
**In:**
2018-09-20 15:33:05 +00:00
`lda s`
2018-09-17 15:42:38 +00:00
`>LIBCALL hLIBTCPIP,LIBTCPIP.SKT.MkNod`
**Out:**
CC: A = hFD
CS: A = EC
2018-06-18 08:44:02 +00:00
2018-09-05 11:31:49 +00:00
# SKT.Read (STREAM)
2018-09-11 21:15:15 +00:00
## C
`int skt.read(hFD fd, void *buf, int count);`
## ASM
**In:**
`>PUSHWI count`
`>PUSHW buf`
`lda fd`
2018-09-17 15:42:38 +00:00
`>LIBCALL hLIBTCPIP,LIBTCPIP.skt.read`
2018-09-05 11:31:49 +00:00
**Out:**
2018-09-11 21:15:15 +00:00
CC: Y,A = bytes read
CS: A = EC
2018-09-05 11:31:49 +00:00
# SKT.Write (STREAM)
2018-09-11 21:15:15 +00:00
## C
`int skt.write(hFD fd, const void *buf, int count);`
## ASM
**In:**
`>PUSHWI count`
`>PUSHW buf`
`lda fd`
2018-09-17 15:42:38 +00:00
`>LIBCALL hLIBTCPIP,LIBTCPIP.skt.write`
2018-09-11 21:15:15 +00:00
**Out:**
CC: Y,A = bytes written
CS: A = EC
2018-06-18 08:44:02 +00:00
2018-09-05 11:31:49 +00:00
# SKT.Rcvd (DGRAM,RAW)
2018-06-18 08:44:02 +00:00
**In:**
A = hSocket
**Out:**
A = hFrame
2018-09-05 11:31:49 +00:00
# SKT.Send (DGRAM,RAW)
2018-09-17 15:42:38 +00:00
## C
`int skt.send(hFD fd, const void *buf, int count);`
## ASM
**In:**
`>PUSHWI count`
`>PUSHW buf`
`lda fd`
`>LIBCALL hLIBTCPIP,LIBTCPIP.skt.send`
**Out:**
CC: Y,A = bytes written
CS: A = EC