18 #ifndef _PAL_PLAT_SOCKET_H 19 #define _PAL_PLAT_SOCKET_H 151 #if PAL_NET_TCP_AND_TLS_SUPPORT // The functionality below is supported only if TCP is supported. 153 #if PAL_NET_SERVER_SOCKET_API 175 #endif // PAL_NET_SERVER_SOCKET_API 211 #endif //PAL_NET_TCP_AND_TLS_SUPPORT 223 #if PAL_NET_DNS_SUPPORT 224 #if (PAL_DNS_API_VERSION == 0) || (PAL_DNS_API_VERSION == 1) 233 #elif (PAL_DNS_API_VERSION == 2) 238 palStatus_t pal_plat_getAddressInfoAsync(pal_asyncAddressInfo_t* info);
243 palStatus_t pal_plat_cancelAddressInfoAsync(palDNSQuery_t queryHandle);
245 #error "Please specify the platform PAL_DNS_API_VERSION 0, 1, or 2." 246 #endif // PAL_DNS_API_VERSION 248 #endif // PAL_NET_DNS_SUPPORT 275 #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.
uint16_t pal_plat_getStaggerEstimate(uint16_t data_amount)
This function returns the stagger estimate for registration in seconds.
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.
palSocketOptionLevelName_t
Socket protocol level options supported by PAL.
Definition: pal_network.h:95
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.
uint8_t pal_plat_getRttEstimate()
This function returns the round-trip estimate for packet in seconds.
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:108
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:270
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:55
palSocketDomain_t
Network domains supported by PAL.
Definition: pal_network.h:60
Definition: pal_network.h:48
palStatus_t pal_plat_setSocketOptionsWithLevel(palSocket_t socket, palSocketOptionLevelName_t optionLevel, int optionName, const void *optionValue, palSocketLength_t optionLength)
Set the value for a socket option on a network socket.