A2osX/.Docs/LIBTCPIP.md
2018-10-04 08:13:44 +02:00

3.6 KiB

*** Auto generated by docgen.cmd ***

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.Socket

Create a new socket

C

hFD socket(short int type, short int protocol);

ASM

In:
>PUSHB protocol
lda type
>LIBCALL hLIBTCPIP,LIBTCPIP.socket
Out:
CC: A = hSOCKET
CS: A = EC

SKT.bind

bind a name to a 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

Iinitiate a connection on a 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

Listen for connections on a socket

C

int listen(hFD fd);

ASM

In:
lda fd
>LIBCALL hLIBTCPIP,LIBTCPIP.listen
Out:
CS: A = EC

SKT.Accept

Accept a connection on a socket

C

hFD Accept(hFD fd);

ASM

In:
lda fd
>LIBCALL hLIBTCPIP,LIBTCPIP.accept
Out:
A = hSocket

SKT.Close

Close socket

C

int close(int fd);

ASM

In:
lda fd
>LIBCALL hLIBTCPIP,LIBTCPIP.close
Out:

SKT.Read (STREAM)

C

int skt.read(hFD fd, void *buf, int count);

ASM

In:
>PUSHWI count
>PUSHW buf
lda fd
>LIBCALL hLIBTCPIP,LIBTCPIP.skt.read
Out:
CC: Y,A = bytes read
CS: A = EC

SKT.Write (STREAM)

C

int skt.write(hFD fd, const void *buf, int count);

ASM

In:
>PUSHWI count
>PUSHW buf
lda fd
>LIBCALL hLIBTCPIP,LIBTCPIP.skt.write
Out:
CC: Y,A = bytes written
CS: A = EC

SKT.Recv (RAW,DGRAM,SEQPACKET)

SKT.RecvFrom (RAW,DGRAM,SEQPACKET)

hMem recv(hFD fd);
hMem recvfrom(hFD fd, struct sockaddr *addr);

ASM

In:
>PUSHW addr (RecvFrom)
lda fd
>LIBCALL hLIBTCPIP,LIBTCPIP.skt.Recv
Out:
CC: A = hMem
CS: A = EC

SKT.Send (RAW,DGRAM,SEQPACKET)

SKT.SendTo (RAW,DGRAM,SEQPACKET)

C

int skt.send(hFD fd, const void *buf, int count);
int skt.sendto(hFD fd, const void *buf, int count, const struct sockaddr *addr);

ASM

In:
>PUSHW addr (SendTo)
>PUSHWI count
>PUSHW buf
lda fd
>LIBCALL hLIBTCPIP,LIBTCPIP.skt.send
Out:
CC: Y,A = bytes written
CS: A = EC

SKT.GetTable

Get socket table

C

void * skt.gettable();

ASM

In:
>LIBCALL hLIBTCPIP,LIBTCPIP.skt.GetTable
Out: