Show / Hide Table of Contents

Class SctpDataChunk

Inheritance
System.Object
SctpChunk
SctpDataChunk
Inherited Members
SctpChunk.SCTP_CHUNK_HEADER_LENGTH
SctpChunk.logger
SctpChunk.ChunkType
SctpChunk.ChunkFlags
SctpChunk.ChunkValue
SctpChunk.KnownType
SctpChunk.UnrecognizedPeerParameters
SctpChunk.ParseFirstWord(Byte[], Int32)
SctpChunk.WriteChunkHeader(Byte[], Int32)
SctpChunk.GotUnrecognisedParameter(SctpTlvChunkParameter)
SctpChunk.ParseBaseChunk(Byte[], Int32)
SctpChunk.GetParameters(Byte[], Int32, Int32)
SctpChunk.Parse(Byte[], Int32)
SctpChunk.GetChunkLengthFromHeader(Byte[], Int32, Boolean)
SctpChunk.GetUnrecognisedChunkAction(UInt16)
SctpChunk.CopyUnrecognisedChunk(Byte[], Int32)
System.Object.Equals(System.Object)
System.Object.Equals(System.Object, System.Object)
System.Object.GetHashCode()
System.Object.GetType()
System.Object.MemberwiseClone()
System.Object.ReferenceEquals(System.Object, System.Object)
System.Object.ToString()
Namespace: SIPSorcery.Net
Assembly: SIPSorcery.dll
Syntax
public class SctpDataChunk : SctpChunk

Constructors

| Improve this Doc View Source

SctpDataChunk(Boolean, Boolean, Boolean, UInt32, UInt16, UInt16, UInt32, Byte[])

Creates a new DATA chunk.

Declaration
public SctpDataChunk(bool isUnordered, bool isBegining, bool isEnd, uint tsn, ushort streamID, ushort seqnum, uint ppid, byte[] data)
Parameters
Type Name Description
System.Boolean isUnordered

Must be set to true if the application wants to send this data chunk without requiring it to be delivered to the remote part in order.

System.Boolean isBegining

Must be set to true for the first chunk in a user data payload.

System.Boolean isEnd

Must be set to true for the last chunk in a user data payload. Note that isBegining and isEnd must both be set to true when the full payload is being sent in a single data chunk.

System.UInt32 tsn

The Transmission Sequence Number for this chunk.

System.UInt16 streamID

Optional. The stream ID for this data chunk.

System.UInt16 seqnum

Optional. The stream sequence number for this send. Set to 0 for unordered streams.

System.UInt32 ppid

Optional. The payload protocol ID for this data chunk.

System.Byte[] data

The data to send.

Fields

| Improve this Doc View Source

EmptyDataChunk

An empty data chunk. The main use is to indicate a DATA chunk has already been delivered to the Upper Layer Protocol (ULP) in SctpDataReceiver.

Declaration
public static SctpDataChunk EmptyDataChunk
Field Value
Type Description
SctpDataChunk
| Improve this Doc View Source

FIXED_PARAMETERS_LENGTH

The length in bytes of the fixed parameters used by the DATA chunk.

Declaration
public const int FIXED_PARAMETERS_LENGTH = 12
Field Value
Type Description
System.Int32
| Improve this Doc View Source

PPID

Payload Protocol Identifier (PPID). This value represents an application (or upper layer) specified protocol identifier.This value is passed to SCTP by its upper layer and sent to its peer.

Declaration
public uint PPID
Field Value
Type Description
System.UInt32
| Improve this Doc View Source

StreamID

Identifies the stream to which the following user data belongs.

Declaration
public ushort StreamID
Field Value
Type Description
System.UInt16
| Improve this Doc View Source

StreamSeqNum

This value represents the Stream Sequence Number of the following user data within the stream using the StreamID.

Declaration
public ushort StreamSeqNum
Field Value
Type Description
System.UInt16
| Improve this Doc View Source

TSN

This value represents the Transmission Sequence Number (TSN) for this DATA chunk.

Declaration
public uint TSN
Field Value
Type Description
System.UInt32
| Improve this Doc View Source

UserData

This is the payload user data.

Declaration
public byte[] UserData
Field Value
Type Description
System.Byte[]

Properties

| Improve this Doc View Source

Begining

The (B)eginning fragment bit, if set, indicates the first fragment of a user message.

Declaration
public bool Begining { get; set; }
Property Value
Type Description
System.Boolean
| Improve this Doc View Source

Ending

The (E)nding fragment bit, if set, indicates the last fragment of a user message.

Declaration
public bool Ending { get; set; }
Property Value
Type Description
System.Boolean
| Improve this Doc View Source

Unordered

The (U)nordered bit, if set to true, indicates that this is an unordered DATA chunk.

Declaration
public bool Unordered { get; set; }
Property Value
Type Description
System.Boolean

Methods

| Improve this Doc View Source

GetChunkLength(Boolean)

Calculates the length for DATA chunk.

Declaration
public override ushort GetChunkLength(bool padded)
Parameters
Type Name Description
System.Boolean padded

If true the length field will be padded to a 4 byte boundary.

Returns
Type Description
System.UInt16

The length of the chunk.

Overrides
SctpChunk.GetChunkLength(Boolean)
| Improve this Doc View Source

IsEmpty()

Declaration
public bool IsEmpty()
Returns
Type Description
System.Boolean
| Improve this Doc View Source

ParseChunk(Byte[], Int32)

Parses the DATA chunk fields

Declaration
public static SctpDataChunk ParseChunk(byte[] buffer, int posn)
Parameters
Type Name Description
System.Byte[] buffer

The buffer holding the serialised chunk.

System.Int32 posn

The position to start parsing at.

Returns
Type Description
SctpDataChunk
| Improve this Doc View Source

WriteTo(Byte[], Int32)

Serialises a DATA chunk to a pre-allocated buffer.

Declaration
public override ushort WriteTo(byte[] buffer, int posn)
Parameters
Type Name Description
System.Byte[] buffer

The buffer to write the serialised chunk bytes to. It must have the required space already allocated.

System.Int32 posn

The position in the buffer to write to.

Returns
Type Description
System.UInt16

The number of bytes, including padding, written to the buffer.

Overrides
SctpChunk.WriteTo(Byte[], Int32)

Extension Methods

JSONWriter.ToJson(Object)
  • Improve this Doc
  • View Source
In This Article
Back to top Generated by DocFX