Amazon Kinesis Webrtc C SDK
Loading...
Searching...
No Matches
Network.h File Reference
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Macros

#define MAX_LOCAL_NETWORK_INTERFACE_COUNT   128
#define KVS_IP_ADDRESS_STRING_BUFFER_LEN   46
#define KVS_IPV6_ADDRESS_DECORATOR_STR_LEN   8
#define KVS_IP_ADDRESS_PORT_STRING_BUFFER_LEN   (KVS_IP_ADDRESS_STRING_BUFFER_LEN + KVS_IPV6_ADDRESS_DECORATOR_STR_LEN)
#define KVS_MAX_IPV4_ADDRESS_STRING_LEN   15
#define KVS_GET_IP_ADDRESS_PORT(a)
#define NO_SIGNAL_SEND   MSG_NOSIGNAL
#define EAI_SYSTEM   -11
#define KVS_SOCKET_IN_PROGRESS   EINPROGRESS
#define POLL   poll

Enumerations

enum  KVS_SOCKET_PROTOCOL { KVS_SOCKET_PROTOCOL_NONE , KVS_SOCKET_PROTOCOL_TCP , KVS_SOCKET_PROTOCOL_UDP }

Functions

STATUS getLocalhostIpAddresses (PKvsIpAddress, PUINT32, IceSetInterfaceFilterFunc, UINT64)
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, PDualKvsIpAddresses)
BOOL isIpAddr (PCHAR, UINT16)
STATUS getIpAddrStr (PKvsIpAddress, PCHAR, UINT32)
STATUS getIpAddrPortStr (PKvsIpAddress, PCHAR, UINT32)
BOOL isSameIpAddress (PKvsIpAddress, PKvsIpAddress, BOOL)
INT32 getErrorCode (VOID)
PCHAR getErrorString (INT32)

Macro Definition Documentation

◆ EAI_SYSTEM

#define EAI_SYSTEM   -11

◆ KVS_GET_IP_ADDRESS_PORT

#define KVS_GET_IP_ADDRESS_PORT ( a)
Value:
((UINT16) getInt16((a)->port))

◆ KVS_IP_ADDRESS_PORT_STRING_BUFFER_LEN

#define KVS_IP_ADDRESS_PORT_STRING_BUFFER_LEN   (KVS_IP_ADDRESS_STRING_BUFFER_LEN + KVS_IPV6_ADDRESS_DECORATOR_STR_LEN)

◆ KVS_IP_ADDRESS_STRING_BUFFER_LEN

#define KVS_IP_ADDRESS_STRING_BUFFER_LEN   46

◆ KVS_IPV6_ADDRESS_DECORATOR_STR_LEN

#define KVS_IPV6_ADDRESS_DECORATOR_STR_LEN   8

◆ 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

#define POLL   poll

Enumeration Type Documentation

◆ KVS_SOCKET_PROTOCOL

Enumerator
KVS_SOCKET_PROTOCOL_NONE 
KVS_SOCKET_PROTOCOL_TCP 
KVS_SOCKET_PROTOCOL_UDP 

Function Documentation

◆ closeSocket()

STATUS closeSocket ( INT32 sockfd)
Parameters
-INT32 - IN - INT32 for the socketfd
Returns
- STATUS status of execution
Here is the call graph for this function:
Here is the caller graph for this function:

◆ createSocket()

STATUS createSocket ( KVS_IP_FAMILY_TYPE familyType,
KVS_SOCKET_PROTOCOL protocol,
UINT32 sendBufSize,
PINT32 pOutSockFd )
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
Here is the call graph for this function:
Here is the caller graph for this function:

◆ getErrorCode()

INT32 getErrorCode ( VOID )
Returns
- INT32 error code
Here is the caller graph for this function:

◆ getErrorString()

PCHAR getErrorString ( INT32 error)
Parameters
-INT32 - IN - error code
Returns
- PCHAR string associated with error code
Here is the caller graph for this function:

◆ getIpAddrPortStr()

STATUS getIpAddrPortStr ( PKvsIpAddress pKvsIpAddress,
PCHAR pBuffer,
UINT32 bufferLen )
Here is the call graph for this function:
Here is the caller graph for this function:

◆ getIpAddrStr()

STATUS getIpAddrStr ( PKvsIpAddress pKvsIpAddress,
PCHAR pBuffer,
UINT32 bufferLen )

◆ getIpWithHostName()

STATUS getIpWithHostName ( PCHAR hostname,
PDualKvsIpAddresses destIps )
Parameters
-PCHAR - IN - hostname to resolve
-PKvsIpAddress - OUT - resolved IP address
Returns
- STATUS status of execution
Here is the call graph for this function:
Here is the caller graph for this function:

◆ getLocalhostIpAddresses()

STATUS getLocalhostIpAddresses ( PKvsIpAddress destIpList,
PUINT32 pDestIpListLen,
IceSetInterfaceFilterFunc filter,
UINT64 customData )
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
Here is the caller graph for this function:

◆ 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
Here is the caller graph for this function:

◆ isSameIpAddress()

BOOL isSameIpAddress ( PKvsIpAddress pAddr1,
PKvsIpAddress pAddr2,
BOOL checkPort )
Here is the caller graph for this function:

◆ socketBind()

STATUS socketBind ( PKvsIpAddress pHostIpAddress,
INT32 sockfd )
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
Here is the call graph for this function:
Here is the caller graph for this function:

◆ 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
Here is the call graph for this function:
Here is the caller graph for this function:

◆ 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
Here is the call graph for this function:
Here is the caller graph for this function: