Additional Policies for the Partially Reliable Stream Control Transmission Protocol Extension
Extracted elements (24)
Separate counters (sprstat_abandoned_unsent and sprstat_abandoned_sent) are maintained to mirror the differentiation already provided by the SCTP_SEND_FAILED_EVENT, allowing consistent status reporting between event notifications and socket option queries.
Setting the retransmission limit to 0 results in behavior analogous to UDP, which performs no retransmissions. This is explicitly noted as the motivation for allowing a zero limit in the Limited Retransmission Policy.
The algorithm for selecting which lower-priority messages to abandon when the send buffer is full is intentionally left implementation specific, providing flexibility to optimize for different use cases without constraining interoperability.
The Limited Retransmission Policy is designed for use in WebRTC data channels, where bounded latency is preferable to guaranteed delivery and a small retransmission budget is acceptable.
The Priority Policy is intended for use cases such as IPFIX (RFC 7011), where template records are sent reliably while flow records of varying importance (billing, security, monitoring) are sent with differentiated priorities, avoiding send buffer exhaustion by lower-value records.
Some implementations may choose not to support SCTP_PR_STREAM_STATUS because it increases per-stream resource requirements. Similarly, some implementations may only support SCTP_PR_SCTP_ALL in sprstat_policy rather than per-policy granularity.
Using the Limited Retransmission Policy does not affect the handling of the 'Association.Max.Retrans' and 'Path.Max.Retrans' thresholds defined in RFC 4960 Section 8; those association-level failure detection thresholds remain in force.
For SCTP_PR_SUPPORTED with one-to-many sockets, it is an error to use SCTP_{CURRENT|ALL}_ASSOC in assoc_id; SCTP_FUTURE_ASSOC is valid for configuring future associations.
Implementation of RFC 3758 (PR-SCTP) is REQUIRED before implementing the additional policies defined in this document. The additional policies themselves are OPTIONAL when implementing RFC 3758.
It is an error to use SCTP_{CURRENT|ALL|FUTURE}_ASSOC in sprstat_assoc_id for SCTP_PR_STREAM_STATUS, and an error to use SCTP_PR_SCTP_NONE in sprstat_policy. If SCTP_PR_SCTP_ALL is used, counters are aggregated over all supported policies.
The sender MAY limit the number of retransmissions to 0, causing the message to be abandoned on the first retransmission attempt, providing a service similar to UDP.
Using the Limited Retransmission Policy, the sender MUST abandon a user message if the number of retransmissions of any of its DATA chunks would exceed the provided limit.
When abandoning under the Limited Retransmission Policy, the sender MUST still perform all other actions required for processing the retransmission event, such as adapting the congestion window and the retransmission timeout.
When the send buffer has insufficient space, the SCTP stack MAY abandon other user messages of the same association with a priority lower than the incoming message's priority to make room. The selection algorithm is implementation specific.
The Limited Retransmission Policy (SCTP_PR_SCTP_RTX) allows a sender to specify an upper limit on the number of retransmissions for each DATA chunk of a user message. It includes both fast and timer-based retransmissions in that count.
The Priority Policy (SCTP_PR_SCTP_PRIO) allows a sender to assign a numeric priority to a user message. A value of zero is the highest priority; larger values denote lower priorities. User messages sent reliably are considered higher priority than any Priority Policy message.
The SCTP_PR_ASSOC_STATUS socket option (read-only) returns association-wide PR-SCTP statistics aggregated across all streams, using the same sctp_prstatus structure as SCTP_PR_STREAM_STATUS but ignoring sprstat_sid.
The SCTP_PR_STREAM_STATUS socket option (read-only, getsockopt only) returns per-stream, per-policy PR-SCTP statistics using the sctp_prstatus structure, including counts of messages abandoned before and after any part was sent.
The SCTP_PR_SUPPORTED socket option (read/write) enables or disables negotiation of PR-SCTP support for future associations, and queries whether PR-SCTP was negotiated on an existing association. Whether PR-SCTP is enabled by default is implementation specific.
The sctp_prinfo structure (from RFC 6458) is used to configure PR-SCTP policies: pr_policy selects the policy (SCTP_PR_SCTP_NONE, SCTP_PR_SCTP_TTL, SCTP_PR_SCTP_RTX, or SCTP_PR_SCTP_PRIO) and pr_value carries the policy-specific parameter (lifetime ms, retransmission count, or priority).
TLS over SCTP (RFC 3436) cannot be used with PR-SCTP associations; DTLS over SCTP (RFC 6083) should be used instead for transport-layer security. If DTLS over SCTP is used, the security considerations of RFC 6083 apply.
Using PR-SCTP for an SCTP association does not allow that association to behave more aggressively than a standard SCTP association not using PR-SCTP; the additional policies do not introduce new denial-of-service attack vectors.
The sctp_prinfo structure contains a uint16_t pr_policy field identifying the PR-SCTP policy and a uint32_t pr_value field carrying the policy parameter (lifetime, retransmission limit, or priority number).
The sctp_prstatus structure contains: sctp_assoc_t sprstat_assoc_id, uint16_t sprstat_sid (stream ID), uint16_t sprstat_policy, uint64_t sprstat_abandoned_unsent, and uint64_t sprstat_abandoned_sent.