SCTP User-Message Analysis

pcapkit.foundation.analysis.sctp contains sctp_message() only, which parses the user data of an SCTP user message that SCTP reassembled, through SCTP.analyze.

Added in version 1.9.0.

pcapkit.foundation.analysis.sctp.sctp_message(datagram, *, layer=None, protocol=None, context=None)[source]

Parse the user data of an SCTP user message reassembled by SCTP.

The user data is dispatched on the message’s payload protocol identifier by SCTP.analyze, as a frame’s first DATA or I-DATA chunk is.

Parameters:
Return type:

ProtocolBase | None

Returns:

The parsed user data. A payload reported as one contiguous run is parsed whether or not datagram is complete, as strict=False reports an incomplete one. None if the payload is the tuple of runs received, as strict=True reports an incomplete one.

Note

Datagram.packet holds what this returns given the stops and context the extraction’s engine parses its frames with, parsed on its first read, unless the reassembly’s __protocol_type__ names another protocol, which then parses it instead.