5#ifndef __KINESIS_VIDEO_WEBRTC_CLIENT_SCTP_SCTP__
6#define __KINESIS_VIDEO_WEBRTC_CLIENT_SCTP_SCTP__
16#define SCTP_ASSOCIATION_DEFAULT_PORT 5000
17#define SCTP_DCEP_HEADER_LENGTH 12
18#define SCTP_DCEP_LABEL_LEN_OFFSET 8
19#define SCTP_DCEP_LABEL_OFFSET 12
20#define SCTP_MAX_ALLOWABLE_PACKET_LENGTH (SCTP_DCEP_HEADER_LENGTH + MAX_DATA_CHANNEL_NAME_LEN + MAX_DATA_CHANNEL_PROTOCOL_LEN + 2)
22#define SCTP_SESSION_ACTIVE 0
23#define SCTP_SESSION_SHUTDOWN_INITIATED 1
24#define SCTP_SESSION_SHUTDOWN_COMPLETED 2
26#define DEFAULT_SCTP_SHUTDOWN_TIMEOUT 2 * HUNDREDS_OF_NANOS_IN_A_SECOND
28#define DEFAULT_USRSCTP_TEARDOWN_POLLING_INTERVAL (10 * HUNDREDS_OF_NANOS_IN_A_MILLISECOND)
30#define SCTP_TIMER_INTERVAL (100 * HUNDREDS_OF_NANOS_IN_A_MILLISECOND)
31#define SCTP_TIMER_START_DELAY (100 * HUNDREDS_OF_NANOS_IN_A_MILLISECOND)
33#define SCTP_CONTEXT_REFERENCE_WAIT_TIMEOUT (5 * HUNDREDS_OF_NANOS_IN_A_SECOND)
38#define SCTP_MAX_PATH_RETRANSMITS 5
40#define SCTP_MAX_ASSOCIATION_RETRANSMITS 10
42#define SCTP_RTO_MAX 60000
STATUS sctpTimerCallback(UINT32, UINT64, UINT64)
Definition Sctp.c:418
@ SCTP_PPID_STRING
Definition Sctp.h:44
@ SCTP_PPID_BINARY
Definition Sctp.h:44
@ SCTP_PPID_DCEP
Definition Sctp.h:44
@ SCTP_PPID_STRING_EMPTY
Definition Sctp.h:44
@ SCTP_PPID_BINARY_EMPTY
Definition Sctp.h:44
STATUS freeSctpSession(PSctpSession *)
Definition Sctp.c:239
VOID(* SctpSessionDataChannelMessageFunc)(UINT64, UINT32, BOOL, PBYTE, UINT32)
Definition Sctp.h:67
STATUS sctpSessionWriteDcep(PSctpSession, UINT32, PCHAR, UINT32, PRtcDataChannelInit)
Definition Sctp.c:334
STATUS createSctpSession(PSctpSessionCallbacks, TIMER_QUEUE_HANDLE, PSctpSession *)
Definition Sctp.c:173
VOID(* SctpSessionOutboundPacketFunc)(UINT64, PBYTE, UINT32)
Definition Sctp.h:59
struct SctpContext * PSctpContext
#define SCTP_MAX_ALLOWABLE_PACKET_LENGTH
Definition Sctp.h:20
INT32 onSctpInboundPacket(struct socket *, union sctp_sockstore, PVOID, ULONG, struct sctp_rcvinfo, INT32, PVOID)
Definition Sctp.c:495
VOID deinitSctpSession()
Definition Sctp.c:163
struct SctpSession * PSctpSession
INT32 onSctpOutboundPacket(PVOID, PVOID, ULONG, UINT8, UINT8)
Definition Sctp.c:387
STATUS putSctpPacket(PSctpSession, PBYTE, UINT32)
Definition Sctp.c:407
STATUS sctpSessionWriteMessage(PSctpSession, UINT32, BOOL, PBYTE, UINT32)
Definition Sctp.c:283
VOID(* SctpSessionDataChannelOpenFunc)(UINT64, UINT32, PBYTE, UINT32)
Definition Sctp.h:63
DATA_CHANNEL_TYPE
Definition Sctp.h:51
@ DCEP_DATA_CHANNEL_TIMED
Definition Sctp.h:55
@ DCEP_DATA_CHANNEL_RELIABLE_UNORDERED
Definition Sctp.h:53
@ DCEP_DATA_CHANNEL_RELIABLE_ORDERED
Definition Sctp.h:52
@ DCEP_DATA_CHANNEL_REXMIT
Definition Sctp.h:54
STATUS handleDcepPacket(PSctpSession, UINT32, PBYTE, SIZE_T)
Definition Sctp.c:447
STATUS initSctpSession()
Definition Sctp.c:144
@ DCEP_DATA_CHANNEL_OPEN
Definition Sctp.h:47
@ DCEP_DATA_CHANNEL_ACK
Definition Sctp.h:48
struct SctpSessionCallbacks * PSctpSessionCallbacks
@ RTC_RTP_TRANSCEIVER_DIRECTION_UNINITIALIZED
Will use the default "sendrecv" after initialization.
Definition Include.h:1058
RtcDataChannelInit dictionary used to configure properties of the underlying channel such as data rel...
Definition Include.h:1771
Singleton context for SCTP global state.
Definition Sctp.h:70
MUTEX sctpContextLock
Definition Sctp.h:75
SIZE_T contextRefCnt
Definition Sctp.h:74
UINT64 lastTickTime
Definition Sctp.h:72
volatile ATOMIC_BOOL isSctpInitialized
Definition Sctp.h:73
SctpSessionDataChannelOpenFunc dataChannelOpenFunc
Definition Sctp.h:81
SctpSessionOutboundPacketFunc outboundPacketFunc
Definition Sctp.h:80
UINT64 customData
Definition Sctp.h:79
SctpSessionDataChannelMessageFunc dataChannelMessageFunc
Definition Sctp.h:82
UINT32 packetSize
Definition Sctp.h:90
struct socket * socket
Definition Sctp.h:87
SctpSessionCallbacks sctpSessionCallbacks
Definition Sctp.h:91
UINT32 timerTaskId
Definition Sctp.h:93
TIMER_QUEUE_HANDLE timerQueueHandle
Definition Sctp.h:92
volatile SIZE_T shutdownStatus
Definition Sctp.h:86