TCP/IP Protocol Stack (CPS) Function List

Initialization/Termination

CPS_Startup Enables CPS library use.
CPS_Cleanup Ends CPS library use.

Setup

CPS_GetThreadPriority Gets the thread priority generated internally by the CPS library.
CPS_SetThreadPriority Sets the thread priority generated internally in the CPS library.
CPS_SocRegister Sets the socket structure that the CPS library uses in the current thread.
CPS_SocUnRegister Unregisters the socket structure that the CPS library uses in the current thread.
CPS_SocUse Allows the current thread to receive services for TCP/IP reception features (e.g., TCP state machine).
CPS_SocRelease Prevents the current thread from receiving services for TCP/IP reception features (e.g., TCP state machine).
CPS_SocDup Allows output to the socket of the current thread from the specified thread.
CPS_SetUdpCallback Sets the callback function to be called when UDP packets are received.

Socket

CPS_SocBind Allocates own port, partner's port, and partner's address to socket.
CPS_SocDatagramMode Sets the socket to UDP mode.
CPS_SocPingMode Sets the socket to PING mode.
CPS_SocRead Performs PING/UDP/TCP reception.
CPS_SocConsume Clears data from the receive buffer.
CPS_SocGetLength Returns the number of data sets inside the receive buffer.
CPS_SocWrite Outputs PING/UDP/TCP.
CPS_TcpConnect Establishes an active TCP connection.
CPS_TcpListen Establishes a passive TCP connection.
CPS_SocWho Gets information about the communication partner.
CPS_TcpShutdown Actively disconnects the TCP connection.
CPS_TcpClose Ends TCP connection.
CPS_TcpAck Sends ACK handshake packet.
CPS_SocGetEport Gets the new ephemeral port number.
CPS_GetProperSize Returns the value used to request the optimal TCP transmission packet size at that time.

Socket Input/Output Assistance

CPS_SocGetChar Waits for a single character entry, and then returns that character.
CPS_SocGets Inputs one line.
CPS_SocPutChar Outputs a single character.
CPS_SocPuts Outputs a character string.
CPS_SocPrintf Outputs a character string with format control.
CPS_SocFlush Sends the data stored in a buffer using a socket input/output assistance function.

Resolve Name

CPS_Resolve Queries the DNS server, and changes the name to IP address.
CPS_RevResolve Queries the DNS server, and changes the IP address to a name.
CPS_NbResolve Changes NetBios names in the same network to IP addresses.
CPS_EncodeNbName Uses NetBios name as a workstation and converts to a format that is used with the NetBios Name query feature.

SSL

CPS_SetSsl Sets the SSL mode to enable/disable.
CPS_SetRootCa Sets the root certificate.
CPS_SetMyCert Sets own server certificate and private key information.
CPS_SslAddRandomSeed Sets the random number pool to be used by the SSL random number generator.
CPS_SetSslHandshakePriority Sets the execution priority to use during SSL handshaking for portions that take a long time to calculate.
CPS_GetSslHandshakePriority Gets the execution priority to use during SSL handshaking for portions that take a long time to calculate.

Utilities

CPS_htons Converts the host byte order value to a network byte order value.
CPS_htonl Converts the host byte order value to a network byte order value.
CPS_MK_IPv4 Creates a u32 IPv4 address.
CPS_CV_IPv4 This allows u32 IPv4 addresses to be used as printf parameters for the purpose of converting them to a character string expression.

Structures and Types

CPSSoc Structure that defines the socket.
CPSSocBuf Buffer structure set in CPSSoc.
CPSSslConnection Structure that defines the SSL connection.
CPSCaInfo Structure that defines information related to certificates.
CPSCertificate Defines the certificate presented to the partner.
CPSPrivateKey Defines the information relating to the certificate's private key.
CPSConfig Structure that defines the configuration information passed to CPS_Startup().
CPS Library Types Description of types used with the CPS Library.

Constants

Constants for CPS Description of constants used with the CPS Library.
Constants for SSL Description of constants used with the SSL Library.
CPS_STT_* Description of types used to indicate socket status in the CPS Library.
CPS_NOIP_REASON_* Description of constants that indicate the reason an IP address is not set in the CPS Library.
CPS_CERT_* Description regarding the definition of error information that is passed to the callback function called during authentication.

Global Variables

CPS*(global variable) Description of global variables used with the CPS library.