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

Macros

#define LOG_CLASS   "TurnConnection"

Functions

STATUS getHostnameFromUrl (PCHAR url, PCHAR *ppHostname)
STATUS createTurnConnection (PIceServer pTurnServer, TIMER_QUEUE_HANDLE timerQueueHandle, TURN_CONNECTION_DATA_TRANSFER_MODE dataTransferMode, KVS_SOCKET_PROTOCOL protocol, PTurnConnectionCallbacks pTurnConnectionCallbacks, PSocketConnection pTurnSocket, PConnectionListener pConnectionListener, KVS_IP_FAMILY_TYPE turnServerIpFamily, PTurnConnection *ppTurnConnection)
UINT64 turnConnectionGetTime (UINT64 customData)
STATUS freeTurnConnection (PTurnConnection *ppTurnConnection)
STATUS turnConnectionIncomingDataHandler (PTurnConnection pTurnConnection, PBYTE pBuffer, UINT32 bufferLen, PKvsIpAddress pSrc, PKvsIpAddress pDest, PTurnChannelData channelDataList, PUINT32 pChannelDataCount)
STATUS turnConnectionHandleStun (PTurnConnection pTurnConnection, PBYTE pBuffer, UINT32 bufferLen)
STATUS turnConnectionHandleStunError (PTurnConnection pTurnConnection, PBYTE pBuffer, UINT32 bufferLen)
STATUS turnConnectionHandleChannelData (PTurnConnection pTurnConnection, PBYTE pBuffer, UINT32 bufferLen, PTurnChannelData pChannelData, PUINT32 pChannelDataCount, PUINT32 pProcessedDataLen)
STATUS turnConnectionHandleChannelDataTcpMode (PTurnConnection pTurnConnection, PBYTE pBuffer, UINT32 bufferLen, PTurnChannelData pChannelData, PUINT32 pTurnChannelDataCount, PUINT32 pProcessedDataLen)
STATUS turnConnectionAddPeer (PTurnConnection pTurnConnection, PKvsIpAddress pPeerAddress)
STATUS turnConnectionSendData (PTurnConnection pTurnConnection, PBYTE pBuf, UINT32 bufLen, PKvsIpAddress pDestIp)
STATUS turnConnectionStart (PTurnConnection pTurnConnection)
STATUS turnConnectionRefreshAllocation (PTurnConnection pTurnConnection)
STATUS turnConnectionRefreshPermission (PTurnConnection pTurnConnection, PBOOL pNeedRefresh)
STATUS turnConnectionFreePreAllocatedPackets (PTurnConnection pTurnConnection)
STATUS turnConnectionUpdateNonce (PTurnConnection pTurnConnection)
STATUS turnConnectionShutdown (PTurnConnection pTurnConnection, UINT64 waitUntilAllocationFreedTimeout)
BOOL turnConnectionIsShutdownComplete (PTurnConnection pTurnConnection)
BOOL turnConnectionGetRelayAddress (PTurnConnection pTurnConnection, PKvsIpAddress pKvsIpAddress)
STATUS checkTurnPeerConnections (PTurnConnection pTurnConnection)
STATUS turnConnectionTimerCallback (UINT32 timerId, UINT64 currentTime, UINT64 customData)
STATUS turnConnectionGetLongTermKey (PCHAR username, PCHAR realm, PCHAR password, PBYTE pBuffer, UINT32 bufferLen)
STATUS turnConnectionPackageTurnAllocationRequest (PCHAR username, PCHAR realm, PBYTE nonce, UINT16 nonceLen, UINT32 lifetime, PStunPacket *ppStunPacket, KVS_IP_FAMILY_TYPE turnConnectionFamilyType)
PTurnPeer turnConnectionGetPeerWithChannelNumber (PTurnConnection pTurnConnection, UINT16 channelNumber)
PTurnPeer turnConnectionGetPeerWithIp (PTurnConnection pTurnConnection, PKvsIpAddress pKvsIpAddress)
VOID turnConnectionFatalError (PTurnConnection pTurnConnection, STATUS errorStatus)
STATUS getTurnConnectionIpAddress (PTurnConnection pTurnConnection, PKvsIpAddress *ppTurnConnectionIpAddress)

Variables

StateMachineState TURN_CONNECTION_STATE_MACHINE_STATES []
UINT32 TURN_CONNECTION_STATE_MACHINE_STATE_COUNT

Macro Definition Documentation

◆ LOG_CLASS

#define LOG_CLASS   "TurnConnection"

Kinesis Video TurnConnection

Function Documentation

◆ checkTurnPeerConnections()

STATUS checkTurnPeerConnections ( PTurnConnection pTurnConnection)
Here is the call graph for this function:
Here is the caller graph for this function:

◆ createTurnConnection()

STATUS createTurnConnection ( PIceServer pTurnServer,
TIMER_QUEUE_HANDLE timerQueueHandle,
TURN_CONNECTION_DATA_TRANSFER_MODE dataTransferMode,
KVS_SOCKET_PROTOCOL protocol,
PTurnConnectionCallbacks pTurnConnectionCallbacks,
PSocketConnection pTurnSocket,
PConnectionListener pConnectionListener,
KVS_IP_FAMILY_TYPE turnServerIpFamily,
PTurnConnection * ppTurnConnection )
Here is the call graph for this function:
Here is the caller graph for this function:

◆ freeTurnConnection()

STATUS freeTurnConnection ( PTurnConnection * ppTurnConnection)
Here is the call graph for this function:
Here is the caller graph for this function:

◆ getHostnameFromUrl()

STATUS getHostnameFromUrl ( PCHAR url,
PCHAR * ppHostname )
Here is the caller graph for this function:

◆ getTurnConnectionIpAddress()

STATUS getTurnConnectionIpAddress ( PTurnConnection pTurnConnection,
PKvsIpAddress * ppTurnConnectionIpAddress )
Here is the caller graph for this function:

◆ turnConnectionAddPeer()

STATUS turnConnectionAddPeer ( PTurnConnection pTurnConnection,
PKvsIpAddress pPeerAddress )
Here is the call graph for this function:
Here is the caller graph for this function:

◆ turnConnectionFatalError()

VOID turnConnectionFatalError ( PTurnConnection pTurnConnection,
STATUS errorStatus )

◆ turnConnectionFreePreAllocatedPackets()

STATUS turnConnectionFreePreAllocatedPackets ( PTurnConnection pTurnConnection)
Here is the call graph for this function:
Here is the caller graph for this function:

◆ turnConnectionGetLongTermKey()

STATUS turnConnectionGetLongTermKey ( PCHAR username,
PCHAR realm,
PCHAR password,
PBYTE pBuffer,
UINT32 bufferLen )
Here is the caller graph for this function:

◆ turnConnectionGetPeerWithChannelNumber()

PTurnPeer turnConnectionGetPeerWithChannelNumber ( PTurnConnection pTurnConnection,
UINT16 channelNumber )
Here is the caller graph for this function:

◆ turnConnectionGetPeerWithIp()

PTurnPeer turnConnectionGetPeerWithIp ( PTurnConnection pTurnConnection,
PKvsIpAddress pKvsIpAddress )
Here is the call graph for this function:
Here is the caller graph for this function:

◆ turnConnectionGetRelayAddress()

BOOL turnConnectionGetRelayAddress ( PTurnConnection pTurnConnection,
PKvsIpAddress pKvsIpAddress )
Here is the caller graph for this function:

◆ turnConnectionGetTime()

UINT64 turnConnectionGetTime ( UINT64 customData)
Here is the caller graph for this function:

◆ turnConnectionHandleChannelData()

STATUS turnConnectionHandleChannelData ( PTurnConnection pTurnConnection,
PBYTE pBuffer,
UINT32 bufferLen,
PTurnChannelData pChannelData,
PUINT32 pChannelDataCount,
PUINT32 pProcessedDataLen )
Here is the call graph for this function:
Here is the caller graph for this function:

◆ turnConnectionHandleChannelDataTcpMode()

STATUS turnConnectionHandleChannelDataTcpMode ( PTurnConnection pTurnConnection,
PBYTE pBuffer,
UINT32 bufferLen,
PTurnChannelData pChannelData,
PUINT32 pTurnChannelDataCount,
PUINT32 pProcessedDataLen )
Here is the call graph for this function:
Here is the caller graph for this function:

◆ turnConnectionHandleStun()

STATUS turnConnectionHandleStun ( PTurnConnection pTurnConnection,
PBYTE pBuffer,
UINT32 bufferLen )
Here is the call graph for this function:
Here is the caller graph for this function:

◆ turnConnectionHandleStunError()

STATUS turnConnectionHandleStunError ( PTurnConnection pTurnConnection,
PBYTE pBuffer,
UINT32 bufferLen )
Here is the call graph for this function:
Here is the caller graph for this function:

◆ turnConnectionIncomingDataHandler()

STATUS turnConnectionIncomingDataHandler ( PTurnConnection pTurnConnection,
PBYTE pBuffer,
UINT32 bufferLen,
PKvsIpAddress pSrc,
PKvsIpAddress pDest,
PTurnChannelData channelDataList,
PUINT32 pChannelDataCount )
Here is the call graph for this function:
Here is the caller graph for this function:

◆ turnConnectionIsShutdownComplete()

BOOL turnConnectionIsShutdownComplete ( PTurnConnection pTurnConnection)
Here is the caller graph for this function:

◆ turnConnectionPackageTurnAllocationRequest()

STATUS turnConnectionPackageTurnAllocationRequest ( PCHAR username,
PCHAR realm,
PBYTE nonce,
UINT16 nonceLen,
UINT32 lifetime,
PStunPacket * ppStunPacket,
KVS_IP_FAMILY_TYPE turnConnectionFamilyType )
Here is the call graph for this function:
Here is the caller graph for this function:

◆ turnConnectionRefreshAllocation()

STATUS turnConnectionRefreshAllocation ( PTurnConnection pTurnConnection)
Here is the call graph for this function:
Here is the caller graph for this function:

◆ turnConnectionRefreshPermission()

STATUS turnConnectionRefreshPermission ( PTurnConnection pTurnConnection,
PBOOL pNeedRefresh )
Here is the call graph for this function:
Here is the caller graph for this function:

◆ turnConnectionSendData()

STATUS turnConnectionSendData ( PTurnConnection pTurnConnection,
PBYTE pBuf,
UINT32 bufLen,
PKvsIpAddress pDestIp )
Here is the call graph for this function:
Here is the caller graph for this function:

◆ turnConnectionShutdown()

STATUS turnConnectionShutdown ( PTurnConnection pTurnConnection,
UINT64 waitUntilAllocationFreedTimeout )
Here is the caller graph for this function:

◆ turnConnectionStart()

STATUS turnConnectionStart ( PTurnConnection pTurnConnection)
Here is the call graph for this function:
Here is the caller graph for this function:

◆ turnConnectionTimerCallback()

STATUS turnConnectionTimerCallback ( UINT32 timerId,
UINT64 currentTime,
UINT64 customData )
Here is the call graph for this function:
Here is the caller graph for this function:

◆ turnConnectionUpdateNonce()

STATUS turnConnectionUpdateNonce ( PTurnConnection pTurnConnection)
Here is the call graph for this function:
Here is the caller graph for this function:

Variable Documentation

◆ TURN_CONNECTION_STATE_MACHINE_STATE_COUNT

UINT32 TURN_CONNECTION_STATE_MACHINE_STATE_COUNT
extern

◆ TURN_CONNECTION_STATE_MACHINE_STATES

StateMachineState TURN_CONNECTION_STATE_MACHINE_STATES[]
extern

Static definitions of the states