18 #ifndef _PAL_PLAT_SOCKET_H 19 #define _PAL_PLAT_SOCKET_H 141 #if PAL_NET_TCP_AND_TLS_SUPPORT // The functionality below is supported only if TCP is supported. 143 #if PAL_NET_SERVER_SOCKET_API 165 #endif // PAL_NET_SERVER_SOCKET_API 201 #endif //PAL_NET_TCP_AND_TLS_SUPPORT 213 #if PAL_NET_DNS_SUPPORT 214 #if (PAL_DNS_API_VERSION == 0) || (PAL_DNS_API_VERSION == 1) 223 #elif (PAL_DNS_API_VERSION == 2) 228 palStatus_t pal_plat_getAddressInfoAsync(pal_asyncAddressInfo_t* info);
233 palStatus_t pal_plat_cancelAddressInfoAsync(palDNSQuery_t queryHandle);
235 #error "Please specify the platform PAL_DNS_API_VERSION 0, 1, or 2." 236 #endif // PAL_DNS_API_VERSION 238 #endif // PAL_NET_DNS_SUPPORT 243 #endif //_PAL_PLAT_SOCKET_H PAL. This file contains the general API to initiate and destroy the PAL component. This is part of the PAL service API.
palStatus_t pal_plat_isNonBlocking(palSocket_t socket, bool *isNonBlocking)
Check if a socket is non-blocking.
palStatus_t pal_plat_asynchronousSocket(palSocketDomain_t domain, palSocketType_t type, bool nonBlockingSocket, uint32_t interfaceNum, palAsyncSocketCallback_t callback, void *callbackArgument, palSocket_t *socket)
Get an asynchronous network socket.
PAL network. This file contains the network APIs and it is a part of the PAL service API...
palStatus_t pal_plat_getNumberOfNetInterfaces(uint32_t *numInterfaces)
Get the number of current network interfaces.
uint32_t palSocketLength_t
The length of data.
Definition: pal_network.h:43
void * palSocket_t
PAL socket handle type.
Definition: pal_network.h:44
palStatus_t pal_plat_sendTo(palSocket_t socket, const void *buffer, size_t length, const palSocketAddress_t *to, palSocketLength_t toLength, size_t *bytesSent)
Send a payload to an address using a specific socket.
palStatus_t pal_plat_registerNetworkInterface(void *networkInterfaceContext, uint32_t *interfaceIndex)
Register a network interface for use with PAL sockets.
palStatus_t pal_plat_setSocketOptions(palSocket_t socket, int optionName, const void *optionValue, palSocketLength_t optionLength)
Set options for a network socket.
palStatus_t pal_plat_socketsTerminate(void *context)
Socket termination.
palSocketType_t
Socket types supported by PAL.
Definition: pal_network.h:73
Definition: pal_network.h:53
palStatus_t pal_plat_receiveFrom(palSocket_t socket, void *buffer, size_t length, palSocketAddress_t *from, palSocketLength_t *fromLength, size_t *bytesReceived)
Receive a payload from a socket.
palStatus_t pal_plat_close(palSocket_t *socket)
Close a network socket.
palStatus_t pal_plat_socketsInit(void *context)
Initialize sockets.
void(* connectionStatusCallback)(palNetworkStatus_t status, void *client_arg)
Definition: pal_network.h:101
palStatus_t pal_plat_getNetInterfaceInfo(uint32_t interfaceNum, palNetInterfaceInfo_t *interfaceInfo)
Get information regarding a socket at a specific interface number.
void(* palAsyncSocketCallback_t)(void *)
The type of the callback function passed when creating asynchronous sockets.
Definition: pal_network.h:253
palStatus_t pal_plat_unregisterNetworkInterface(uint32_t interfaceIndex)
palStatus_t pal_plat_bind(palSocket_t socket, palSocketAddress_t *myAddress, palSocketLength_t addressLength)
Bind a socket to a local address.
int32_t palStatus_t
Definition: pal_types.h:49
palSocketDomain_t
Network domains supported by PAL.
Definition: pal_network.h:60
Definition: pal_network.h:48