Amazon Kinesis Webrtc C SDK
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  SctpSessionCallbacks
 
struct  SctpSession
 

Macros

#define SCTP_MTU   1188
 
#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)
 

Typedefs

typedef VOID(* SctpSessionOutboundPacketFunc) (UINT64, PBYTE, UINT32)
 
typedef VOID(* SctpSessionDataChannelOpenFunc) (UINT64, UINT32, PBYTE, UINT32)
 
typedef VOID(* SctpSessionDataChannelMessageFunc) (UINT64, UINT32, BOOL, PBYTE, UINT32)
 
typedef struct SctpSessionCallbacksPSctpSessionCallbacks
 
typedef struct SctpSessionPSctpSession
 

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 }
 
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, PSctpSession *)
 
STATUS freeSctpSession (PSctpSession *)
 
STATUS putSctpPacket (PSctpSession, PBYTE, UINT32)
 
STATUS sctpSessionWriteMessage (PSctpSession, UINT32, BOOL, PBYTE, UINT32)
 
STATUS sctpSessionWriteDcep (PSctpSession, UINT32, PCHAR, UINT32, PRtcDataChannelInit)
 
INT32 onSctpOutboundPacket (PVOID, PVOID, ULONG, UINT8, UINT8)
 
INT32 onSctpInboundPacket (struct socket *, union sctp_sockstore, PVOID, ULONG, struct sctp_rcvinfo, INT32, PVOID)
 

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_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_MTU

#define SCTP_MTU   1188

◆ 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

Typedef Documentation

◆ PSctpSession

typedef struct SctpSession * PSctpSession

◆ PSctpSessionCallbacks

◆ SctpSessionDataChannelMessageFunc

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

◆ SctpSessionDataChannelOpenFunc

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

◆ 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 

◆ 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,
PSctpSession ppSctpSession 
)
Here is the call graph for this function:

◆ deinitSctpSession()

VOID deinitSctpSession ( )

◆ freeSctpSession()

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

◆ initSctpSession()

STATUS initSctpSession ( )
Here is the call 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:

◆ 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 
)
Here is the caller graph for this function: