Go to the source code of this file.
|
STATUS | getLocalhostIpAddresses (PKvsIpAddress, PUINT32, IceSetInterfaceFilterFunc, UINT64) |
|
STATUS | createSocketPair (INT32(*)[2]) |
|
STATUS | createSocket (KVS_IP_FAMILY_TYPE, KVS_SOCKET_PROTOCOL, UINT32, PINT32) |
|
STATUS | closeSocket (INT32) |
|
STATUS | socketBind (PKvsIpAddress, INT32) |
|
STATUS | socketConnect (PKvsIpAddress, INT32) |
|
STATUS | socketWrite (INT32, const void *, SIZE_T) |
|
STATUS | getIpWithHostName (PCHAR, PKvsIpAddress) |
|
BOOL | isIpAddr (PCHAR, UINT16) |
|
STATUS | getIpAddrStr (PKvsIpAddress, PCHAR, UINT32) |
|
BOOL | isSameIpAddress (PKvsIpAddress, PKvsIpAddress, BOOL) |
|
INT32 | getErrorCode (VOID) |
|
PCHAR | getErrorString (INT32) |
|
◆ EAI_SYSTEM
◆ IPV4_TEMPLATE
#define IPV4_TEMPLATE "%d.%d.%d.%d" |
◆ IPV6_TEMPLATE
#define IPV6_TEMPLATE "%04x:%04x:%04x:%04x:%04x:%04x:%04x:%04x" |
◆ KVS_GET_IP_ADDRESS_PORT
#define KVS_GET_IP_ADDRESS_PORT |
( |
|
a | ) |
((UINT16) getInt16((a)->port)) |
◆ KVS_IP_ADDRESS_STRING_BUFFER_LEN
#define KVS_IP_ADDRESS_STRING_BUFFER_LEN 46 |
◆ KVS_MAX_IPV4_ADDRESS_STRING_LEN
#define KVS_MAX_IPV4_ADDRESS_STRING_LEN 15 |
◆ KVS_SOCKET_IN_PROGRESS
#define KVS_SOCKET_IN_PROGRESS EINPROGRESS |
◆ MAX_LOCAL_NETWORK_INTERFACE_COUNT
#define MAX_LOCAL_NETWORK_INTERFACE_COUNT 128 |
◆ NO_SIGNAL_SEND
#define NO_SIGNAL_SEND MSG_NOSIGNAL |
◆ POLL
◆ KVS_SOCKET_PROTOCOL
Enumerator |
---|
KVS_SOCKET_PROTOCOL_NONE | |
KVS_SOCKET_PROTOCOL_TCP | |
KVS_SOCKET_PROTOCOL_UDP | |
◆ closeSocket()
STATUS closeSocket |
( |
INT32 |
sockfd | ) |
|
- Parameters
-
- | INT32 - IN - INT32 for the socketfd |
- Returns
- - STATUS status of execution
◆ createSocket()
- Parameters
-
- | KVS_IP_FAMILY_TYPE - IN - Family for the socket. Must be one of KVS_IP_FAMILY_TYPE |
- | KVS_SOCKET_PROTOCOL - IN - either tcp or udp |
- | UINT32 - IN - send buffer size in bytes |
- | PINT32 - OUT - PINT32 for the socketfd |
- Returns
- - STATUS status of execution
◆ createSocketPair()
STATUS createSocketPair |
( |
INT32(*) |
pSocketPair[2] | ) |
|
- Parameters
-
- | INT32 (*)[2] - OUT - Array for the socket pair fds |
- Returns
- - STATUS status of execution
◆ getErrorCode()
INT32 getErrorCode |
( |
VOID |
| ) |
|
- Returns
- - INT32 error code
◆ getErrorString()
PCHAR getErrorString |
( |
INT32 |
error | ) |
|
- Parameters
-
- Returns
- - PCHAR string associated with error code
◆ getIpAddrStr()
STATUS getIpAddrStr |
( |
PKvsIpAddress |
pKvsIpAddress, |
|
|
PCHAR |
pBuffer, |
|
|
UINT32 |
bufferLen |
|
) |
| |
◆ getIpWithHostName()
STATUS getIpWithHostName |
( |
PCHAR |
hostname, |
|
|
PKvsIpAddress |
destIp |
|
) |
| |
- Parameters
-
- | PCHAR - IN - hostname to resolve |
- | PKvsIpAddress - OUT - resolved ip address |
- Returns
- - STATUS status of execution
◆ getLocalhostIpAddresses()
- Parameters
-
- | PKvsIpAddress - IN/OUT - array for getLocalhostIpAddresses to store any local ips it found. The ip address and port will be in network byte order. |
- | UINT32 - IN/OUT - length of the array, upon return it will be updated to the actual number of ips in the array |
- | IceSetInterfaceFilterFunc - IN - set to custom interface filter callback |
- | UINT64 - IN - Set to custom data that can be used in the callback later |
- Returns
- - STATUS status of execution
◆ isIpAddr()
BOOL isIpAddr |
( |
PCHAR |
hostname, |
|
|
UINT16 |
length |
|
) |
| |
- Parameters
-
- | PCHAR - IN - IP address string to verify if it is IPv4 or IPv6 format |
- | UINT16 - IN - Length of string |
- | BOOL - OUT - Evaluates to TRUE if the provided string is IPv4/IPv6. False otherwise |
- Returns
- - STATUS status of execution
◆ isSameIpAddress()
◆ socketBind()
- Parameters
-
- | PKvsIpAddress - IN - address for the socket to bind. PKvsIpAddress->port will be changed to the actual port number |
- | INT32 - IN - valid socket fd |
- Returns
- - STATUS status of execution
◆ socketConnect()
STATUS socketConnect |
( |
PKvsIpAddress |
pPeerAddress, |
|
|
INT32 |
sockfd |
|
) |
| |
- Parameters
-
- | PKvsIpAddress - IN - address for the socket to connect. |
- | INT32 - IN - valid socket fd |
- Returns
- - STATUS status of execution
◆ socketWrite()
STATUS socketWrite |
( |
INT32 |
sockfd, |
|
|
const void * |
pBuffer, |
|
|
SIZE_T |
length |
|
) |
| |
- Parameters
-
- | INT32 - Socket to write to |
- | const void * - buffer of data to write |
- | SIZE_T - length of buffer |
- Returns
- - STATUS status of execution