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

Macros

#define LOG_CLASS   "TurnConnection"
 

Functions

STATUS createTurnConnection (PIceServer pTurnServer, TIMER_QUEUE_HANDLE timerQueueHandle, TURN_CONNECTION_DATA_TRANSFER_MODE dataTransferMode, KVS_SOCKET_PROTOCOL protocol, PTurnConnectionCallbacks pTurnConnectionCallbacks, PSocketConnection pTurnSocket, PConnectionListener pConnectionListener, 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)
 
PTurnPeer turnConnectionGetPeerWithChannelNumber (PTurnConnection pTurnConnection, UINT16 channelNumber)
 
PTurnPeer turnConnectionGetPeerWithIp (PTurnConnection pTurnConnection, PKvsIpAddress pKvsIpAddress)
 
VOID turnConnectionFatalError (PTurnConnection pTurnConnection, STATUS errorStatus)
 

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

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