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

Go to the source code of this file.

Classes

struct  SctpContext
 Singleton context for SCTP global state. More...
struct  SctpSessionCallbacks
struct  SctpSession

Macros

#define SCTP_MTU   1188
#define SCTP_MAX_STREAMS   300
#define SCTP_ASSOCIATION_DEFAULT_PORT   5000
#define SCTP_DCEP_HEADER_LENGTH   12
#define SCTP_DCEP_LABEL_LEN_OFFSET   8
#define SCTP_DCEP_LABEL_OFFSET   12
#define SCTP_MAX_ALLOWABLE_PACKET_LENGTH   (SCTP_DCEP_HEADER_LENGTH + MAX_DATA_CHANNEL_NAME_LEN + MAX_DATA_CHANNEL_PROTOCOL_LEN + 2)
#define SCTP_SESSION_ACTIVE   0
#define SCTP_SESSION_SHUTDOWN_INITIATED   1
#define SCTP_SESSION_SHUTDOWN_COMPLETED   2
#define DEFAULT_SCTP_SHUTDOWN_TIMEOUT   2 * HUNDREDS_OF_NANOS_IN_A_SECOND
#define DEFAULT_USRSCTP_TEARDOWN_POLLING_INTERVAL   (10 * HUNDREDS_OF_NANOS_IN_A_MILLISECOND)
#define SCTP_TIMER_INTERVAL   (100 * HUNDREDS_OF_NANOS_IN_A_MILLISECOND)
#define SCTP_TIMER_START_DELAY   (100 * HUNDREDS_OF_NANOS_IN_A_MILLISECOND)
#define SCTP_CONTEXT_REFERENCE_WAIT_TIMEOUT   (5 * HUNDREDS_OF_NANOS_IN_A_SECOND)
#define SCTP_MAX_PATH_RETRANSMITS   5
#define SCTP_MAX_ASSOCIATION_RETRANSMITS   10
#define SCTP_RTO_MAX   60000

Typedefs

typedef VOID(* SctpSessionOutboundPacketFunc) (UINT64, PBYTE, UINT32)
typedef STATUS(* SctpSessionDataChannelOpenFunc) (UINT64, UINT32, PBYTE, UINT32, PRtcDataChannelInit)
typedef VOID(* SctpSessionDataChannelMessageFunc) (UINT64, UINT32, BOOL, PBYTE, UINT32)
typedef VOID(* SctpSessionDataChannelAckFunc) (UINT64, UINT32)
typedef struct SctpContext SctpContext
 Singleton context for SCTP global state.
typedef struct SctpContext * PSctpContext
typedef struct SctpSessionCallbacks * PSctpSessionCallbacks
typedef struct SctpSession * PSctpSession

Enumerations

enum  {
  SCTP_PPID_DCEP = 50 , SCTP_PPID_STRING = 51 , SCTP_PPID_BINARY = 53 , SCTP_PPID_STRING_EMPTY = 56 ,
  SCTP_PPID_BINARY_EMPTY = 57
}
enum  { DCEP_DATA_CHANNEL_OPEN = 0x03 , DCEP_DATA_CHANNEL_ACK = 0x02 }
enum  DATA_CHANNEL_TYPE { DCEP_DATA_CHANNEL_RELIABLE_ORDERED = (BYTE) 0x00 , DCEP_DATA_CHANNEL_RELIABLE_UNORDERED = (BYTE) 0x80 , DCEP_DATA_CHANNEL_REXMIT = (BYTE) 0x01 , DCEP_DATA_CHANNEL_TIMED = (BYTE) 0x02 }

Functions

STATUS initSctpSession ()
VOID deinitSctpSession ()
STATUS createSctpSession (PSctpSessionCallbacks, TIMER_QUEUE_HANDLE, PSctpSession *)
STATUS freeSctpSession (PSctpSession *)
STATUS putSctpPacket (PSctpSession, PBYTE, UINT32)
STATUS sctpSessionWriteMessage (PSctpSession, UINT32, BOOL, PBYTE, UINT32, PRtcDataChannelInit, BOOL)
VOID sctpSessionSetSendInfo (struct sctp_sendv_spa *, UINT32, BOOL, PRtcDataChannelInit, BOOL)
VOID dcepParseChannelParameters (PBYTE, PRtcDataChannelInit)
STATUS sctpSessionWriteDcep (PSctpSession, UINT32, PCHAR, UINT32, PRtcDataChannelInit)
STATUS handleDcepPacket (PSctpSession, UINT32, PBYTE, SIZE_T)
INT32 onSctpOutboundPacket (PVOID, PVOID, ULONG, UINT8, UINT8)
INT32 onSctpInboundPacket (struct socket *, union sctp_sockstore, PVOID, ULONG, struct sctp_rcvinfo, INT32, PVOID)
STATUS sctpTimerCallback (UINT32, UINT64, UINT64)

Macro Definition Documentation

◆ DEFAULT_SCTP_SHUTDOWN_TIMEOUT

#define DEFAULT_SCTP_SHUTDOWN_TIMEOUT   2 * HUNDREDS_OF_NANOS_IN_A_SECOND

◆ DEFAULT_USRSCTP_TEARDOWN_POLLING_INTERVAL

#define DEFAULT_USRSCTP_TEARDOWN_POLLING_INTERVAL   (10 * HUNDREDS_OF_NANOS_IN_A_MILLISECOND)

◆ SCTP_ASSOCIATION_DEFAULT_PORT

#define SCTP_ASSOCIATION_DEFAULT_PORT   5000

◆ SCTP_CONTEXT_REFERENCE_WAIT_TIMEOUT

#define SCTP_CONTEXT_REFERENCE_WAIT_TIMEOUT   (5 * HUNDREDS_OF_NANOS_IN_A_SECOND)

◆ SCTP_DCEP_HEADER_LENGTH

#define SCTP_DCEP_HEADER_LENGTH   12

◆ SCTP_DCEP_LABEL_LEN_OFFSET

#define SCTP_DCEP_LABEL_LEN_OFFSET   8

◆ SCTP_DCEP_LABEL_OFFSET

#define SCTP_DCEP_LABEL_OFFSET   12

◆ SCTP_MAX_ALLOWABLE_PACKET_LENGTH

#define SCTP_MAX_ALLOWABLE_PACKET_LENGTH   (SCTP_DCEP_HEADER_LENGTH + MAX_DATA_CHANNEL_NAME_LEN + MAX_DATA_CHANNEL_PROTOCOL_LEN + 2)

◆ SCTP_MAX_ASSOCIATION_RETRANSMITS

#define SCTP_MAX_ASSOCIATION_RETRANSMITS   10

◆ SCTP_MAX_PATH_RETRANSMITS

#define SCTP_MAX_PATH_RETRANSMITS   5

◆ SCTP_MAX_STREAMS

#define SCTP_MAX_STREAMS   300

◆ SCTP_MTU

#define SCTP_MTU   1188

◆ SCTP_RTO_MAX

#define SCTP_RTO_MAX   60000

◆ SCTP_SESSION_ACTIVE

#define SCTP_SESSION_ACTIVE   0

◆ SCTP_SESSION_SHUTDOWN_COMPLETED

#define SCTP_SESSION_SHUTDOWN_COMPLETED   2

◆ SCTP_SESSION_SHUTDOWN_INITIATED

#define SCTP_SESSION_SHUTDOWN_INITIATED   1

◆ SCTP_TIMER_INTERVAL

#define SCTP_TIMER_INTERVAL   (100 * HUNDREDS_OF_NANOS_IN_A_MILLISECOND)

◆ SCTP_TIMER_START_DELAY

#define SCTP_TIMER_START_DELAY   (100 * HUNDREDS_OF_NANOS_IN_A_MILLISECOND)

Typedef Documentation

◆ PSctpContext

typedef struct SctpContext * PSctpContext

◆ PSctpSession

typedef struct SctpSession * PSctpSession

◆ PSctpSessionCallbacks

◆ SctpContext

typedef struct SctpContext SctpContext

Singleton context for SCTP global state.

◆ SctpSessionDataChannelAckFunc

typedef VOID(* SctpSessionDataChannelAckFunc) (UINT64, UINT32)

◆ SctpSessionDataChannelMessageFunc

typedef VOID(* SctpSessionDataChannelMessageFunc) (UINT64, UINT32, BOOL, PBYTE, UINT32)

◆ SctpSessionDataChannelOpenFunc

typedef STATUS(* SctpSessionDataChannelOpenFunc) (UINT64, UINT32, PBYTE, UINT32, PRtcDataChannelInit)

◆ SctpSessionOutboundPacketFunc

typedef VOID(* SctpSessionOutboundPacketFunc) (UINT64, PBYTE, UINT32)

Enumeration Type Documentation

◆ anonymous enum

anonymous enum
Enumerator
SCTP_PPID_DCEP 
SCTP_PPID_STRING 
SCTP_PPID_BINARY 
SCTP_PPID_STRING_EMPTY 
SCTP_PPID_BINARY_EMPTY 

◆ anonymous enum

anonymous enum
Enumerator
DCEP_DATA_CHANNEL_OPEN 
DCEP_DATA_CHANNEL_ACK 

◆ DATA_CHANNEL_TYPE

Enumerator
DCEP_DATA_CHANNEL_RELIABLE_ORDERED 
DCEP_DATA_CHANNEL_RELIABLE_UNORDERED 
DCEP_DATA_CHANNEL_REXMIT 
DCEP_DATA_CHANNEL_TIMED 

Function Documentation

◆ createSctpSession()

STATUS createSctpSession ( PSctpSessionCallbacks pSctpSessionCallbacks,
TIMER_QUEUE_HANDLE timerQueueHandle,
PSctpSession * ppSctpSession )
Here is the call graph for this function:

◆ dcepParseChannelParameters()

VOID dcepParseChannelParameters ( PBYTE data,
PRtcDataChannelInit pRtcDataChannelInit )
Here is the caller graph for this function:

◆ deinitSctpSession()

VOID deinitSctpSession ( )
Here is the call graph for this function:
Here is the caller graph for this function:

◆ freeSctpSession()

STATUS freeSctpSession ( PSctpSession * ppSctpSession)
Here is the caller graph for this function:

◆ handleDcepPacket()

STATUS handleDcepPacket ( PSctpSession pSctpSession,
UINT32 streamId,
PBYTE data,
SIZE_T length )
Here is the call graph for this function:
Here is the caller graph for this function:

◆ initSctpSession()

STATUS initSctpSession ( )
Here is the call graph for this function:
Here is the caller graph for this function:

◆ onSctpInboundPacket()

INT32 onSctpInboundPacket ( struct socket * sock,
union sctp_sockstore addr,
PVOID data,
ULONG length,
struct sctp_rcvinfo rcv,
INT32 flags,
PVOID ulp_info )
Here is the call graph for this function:
Here is the caller graph for this function:

◆ onSctpOutboundPacket()

INT32 onSctpOutboundPacket ( PVOID addr,
PVOID data,
ULONG length,
UINT8 tos,
UINT8 set_df )
Here is the caller graph for this function:

◆ putSctpPacket()

STATUS putSctpPacket ( PSctpSession pSctpSession,
PBYTE buf,
UINT32 bufLen )
Here is the caller graph for this function:

◆ sctpSessionSetSendInfo()

VOID sctpSessionSetSendInfo ( struct sctp_sendv_spa * pSpa,
UINT32 streamId,
BOOL isBinary,
PRtcDataChannelInit pRtcDataChannelInit,
BOOL forceOrdered )
Here is the caller graph for this function:

◆ sctpSessionWriteDcep()

STATUS sctpSessionWriteDcep ( PSctpSession pSctpSession,
UINT32 streamId,
PCHAR pChannelName,
UINT32 pChannelNameLen,
PRtcDataChannelInit pRtcDataChannelInit )

◆ sctpSessionWriteMessage()

STATUS sctpSessionWriteMessage ( PSctpSession pSctpSession,
UINT32 streamId,
BOOL isBinary,
PBYTE pMessage,
UINT32 pMessageLen,
PRtcDataChannelInit pRtcDataChannelInit,
BOOL forceOrdered )
Here is the call graph for this function:
Here is the caller graph for this function:

◆ sctpTimerCallback()

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