01.06.2013 Views

IPC@CHIP Documentation - SC12 @CHIP-RTOS V1.10

IPC@CHIP Documentation - SC12 @CHIP-RTOS V1.10

IPC@CHIP Documentation - SC12 @CHIP-RTOS V1.10

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

Related Topics<br />

Top of list<br />

Index page<br />

CB_SOCKET_ERROR = $0040;<br />

CB_RESET = $0080;<br />

CB_CLOSE_COMPLT = $0100;<br />

API_REGISTERCALLBACK For C language callback functions<br />

Interrupt 0xAC service 0x21: API_GET_SOCKET_ERROR, Get last socket error.<br />

Parameters<br />

AH<br />

BX<br />

Returns the last error which occurred on the specified socket.<br />

0x21 (= API_GET_SOCKET_ERROR)<br />

Socket descriptor<br />

Return Value<br />

Top of list<br />

Index page<br />

DX =0: success AX: contains last socket error code<br />

Interrupt 0xAC service 0x22: API_GET_TCP_STATE, Find TCP socket and return state.<br />

Search for a TCP socket at a given local port number, returning the socket state, IP address and port number<br />

of the remote peer (if any).<br />

Parameters<br />

AH<br />

BX<br />

ES:DI<br />

0x22 (= API_GET_TCP_STATE)<br />

Local port (e.g. htons(23) for telnet)<br />

Pointer to storage 32 Bit remote IP address<br />

Return Value<br />

AL: contains last TCP socket state (see below)<br />

If AL!=20 and AL bigger or equal 2 (a TCP connection is established), the storage at ES:DI holds the 32 bit IP<br />

address of the connected remote peer<br />

CX contains remote peer port number<br />

Page 123 / 400

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!