Amazon Kinesis Webrtc C SDK
Loading...
Searching...
No Matches
Network.c File Reference
#include "../Include_i.h"
Include dependency graph for Network.c:

Macros

#define LOG_CLASS   "Network"

Functions

STATUS getLocalhostIpAddresses (PKvsIpAddress destIpList, PUINT32 pDestIpListLen, IceSetInterfaceFilterFunc filter, UINT64 customData)
STATUS createSocket (KVS_IP_FAMILY_TYPE familyType, KVS_SOCKET_PROTOCOL protocol, UINT32 sendBufSize, PINT32 pOutSockFd)
STATUS closeSocket (INT32 sockfd)
STATUS socketBind (PKvsIpAddress pHostIpAddress, INT32 sockfd)
STATUS socketConnect (PKvsIpAddress pPeerAddress, INT32 sockfd)
STATUS socketWrite (INT32 sockfd, const void *pBuffer, SIZE_T length)
BOOL isIpAddr (PCHAR hostname, UINT16 length)
STATUS getIpAddrFromDnsHostname (PCHAR hostname, PCHAR address, UINT16 lengthSrc, UINT16 maxLenDst)
STATUS getDualStackIpAddrFromDnsHostname (PCHAR hostname, PCHAR ipv4Address, PCHAR ipv6Address, UINT16 lengthSrc, UINT16 maxLenV4Dst, UINT16 maxLenV6Dst)
STATUS getIpWithHostName (PCHAR hostname, PDualKvsIpAddresses destIps)
STATUS getIpAddrStr (PKvsIpAddress pKvsIpAddress, PCHAR pBuffer, UINT32 bufferLen)
STATUS getIpAddrPortStr (PKvsIpAddress pKvsIpAddress, PCHAR pBuffer, UINT32 bufferLen)
BOOL isSameIpAddress (PKvsIpAddress pAddr1, PKvsIpAddress pAddr2, BOOL checkPort)
INT32 getErrorCode (VOID)
PCHAR getErrorString (INT32 error)

Macro Definition Documentation

◆ LOG_CLASS

#define LOG_CLASS   "Network"

Kinesis Video Producer Host Info

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:

◆ getDualStackIpAddrFromDnsHostname()

STATUS getDualStackIpAddrFromDnsHostname ( PCHAR hostname,
PCHAR ipv4Address,
PCHAR ipv6Address,
UINT16 lengthSrc,
UINT16 maxLenV4Dst,
UINT16 maxLenV6Dst )
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:

◆ getIpAddrFromDnsHostname()

STATUS getIpAddrFromDnsHostname ( PCHAR hostname,
PCHAR address,
UINT16 lengthSrc,
UINT16 maxLenDst )
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 )
Here is the caller graph for this function:

◆ 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: