include/linux/sctp.h
Source file repositories/reference/linux-study-clean/include/linux/sctp.h
File Facts
- System
- Linux kernel
- Corpus path
include/linux/sctp.h- Extension
.h- Size
- 23607 bytes
- Lines
- 827
- Domain
- Core OS
- Bucket
- Core Kernel Interface
- Inferred role
- Core OS: implementation source
- Status
- source implementation candidate
Why This File Exists
Core operating-system implementation surface: boot, tasks, memory, VFS, syscall-facing interfaces, synchronization, credentials, and isolation.
- Core operating-system implementation surface: boot, tasks, memory, VFS, syscall-facing interfaces, synchronization, credentials, and isolation.
- Defines or uses C structs; map object ownership, embedded links, reference counts, and lock ownership.
Dependency Surface
linux/in.hlinux/in6.hlinux/skbuff.huapi/linux/sctp.h
Detected Declarations
struct sctphdrstruct sctp_chunkhdrstruct sctp_paramhdrstruct sctp_datahdrstruct sctp_data_chunkstruct sctp_idatahdrstruct sctp_idata_chunkstruct sctp_inithdrstruct sctp_init_chunkstruct sctp_ipv4addr_paramstruct sctp_ipv6addr_paramstruct sctp_cookie_preserve_paramstruct sctp_hostname_paramstruct sctp_supported_addrs_paramstruct sctp_adaptation_ind_paramstruct sctp_supported_ext_paramstruct sctp_random_paramstruct sctp_chunks_paramstruct sctp_hmac_algo_paramstruct sctp_initack_chunkstruct sctp_cookie_paramstruct sctp_unrecognized_paramstruct sctp_gap_ack_blockstruct sctp_sackhdrstruct sctp_sack_chunkstruct sctp_heartbeathdrstruct sctp_heartbeat_chunkstruct sctp_pad_chunkstruct sctp_abort_chunkstruct sctp_shutdownhdrstruct sctp_shutdown_chunkstruct sctp_errhdrstruct sctp_operr_chunkstruct sctp_ecnehdrstruct sctp_ecne_chunkstruct sctp_cwrhdrstruct sctp_fwdtsn_skipstruct sctp_fwdtsn_hdrstruct sctp_fwdtsn_chunkstruct sctp_ifwdtsn_skipstruct sctp_ifwdtsn_hdrstruct sctp_ifwdtsn_chunkstruct sctp_addip_paramstruct sctp_addiphdrstruct sctp_addip_chunkstruct sctp_authhdrstruct sctp_auth_chunkstruct sctp_infox
Annotated Snippet
struct sctphdr {
__be16 source;
__be16 dest;
__be32 vtag;
__le32 checksum;
};
static inline struct sctphdr *sctp_hdr(const struct sk_buff *skb)
{
return (struct sctphdr *)skb_transport_header(skb);
}
/* Section 3.2. Chunk Field Descriptions. */
struct sctp_chunkhdr {
__u8 type;
__u8 flags;
__be16 length;
};
/* Section 3.2. Chunk Type Values.
* [Chunk Type] identifies the type of information contained in the Chunk
* Value field. It takes a value from 0 to 254. The value of 255 is
* reserved for future use as an extension field.
*/
enum sctp_cid {
SCTP_CID_DATA = 0,
SCTP_CID_INIT = 1,
SCTP_CID_INIT_ACK = 2,
SCTP_CID_SACK = 3,
SCTP_CID_HEARTBEAT = 4,
SCTP_CID_HEARTBEAT_ACK = 5,
SCTP_CID_ABORT = 6,
SCTP_CID_SHUTDOWN = 7,
SCTP_CID_SHUTDOWN_ACK = 8,
SCTP_CID_ERROR = 9,
SCTP_CID_COOKIE_ECHO = 10,
SCTP_CID_COOKIE_ACK = 11,
SCTP_CID_ECN_ECNE = 12,
SCTP_CID_ECN_CWR = 13,
SCTP_CID_SHUTDOWN_COMPLETE = 14,
/* AUTH Extension Section 4.1 */
SCTP_CID_AUTH = 0x0F,
/* sctp ndata 5.1. I-DATA */
SCTP_CID_I_DATA = 0x40,
/* PR-SCTP Sec 3.2 */
SCTP_CID_FWD_TSN = 0xC0,
/* Use hex, as defined in ADDIP sec. 3.1 */
SCTP_CID_ASCONF = 0xC1,
SCTP_CID_I_FWD_TSN = 0xC2,
SCTP_CID_ASCONF_ACK = 0x80,
SCTP_CID_RECONF = 0x82,
SCTP_CID_PAD = 0x84,
}; /* enum */
/* Section 3.2
* Chunk Types are encoded such that the highest-order two bits specify
* the action that must be taken if the processing endpoint does not
* recognize the Chunk Type.
*/
enum {
SCTP_CID_ACTION_DISCARD = 0x00,
SCTP_CID_ACTION_DISCARD_ERR = 0x40,
SCTP_CID_ACTION_SKIP = 0x80,
SCTP_CID_ACTION_SKIP_ERR = 0xc0,
};
enum { SCTP_CID_ACTION_MASK = 0xc0, };
/* This flag is used in Chunk Flags for ABORT and SHUTDOWN COMPLETE.
*
* 3.3.7 Abort Association (ABORT) (6):
* The T bit is set to 0 if the sender had a TCB that it destroyed.
* If the sender did not have a TCB it should set this bit to 1.
*/
enum { SCTP_CHUNK_FLAG_T = 0x01 };
/*
* Set the T bit
*
* 0 1 2 3
* 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1
* +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
* | Type = 14 |Reserved |T| Length = 4 |
* +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
Annotation
- Immediate include surface: `linux/in.h`, `linux/in6.h`, `linux/skbuff.h`, `uapi/linux/sctp.h`.
- Detected declarations: `struct sctphdr`, `struct sctp_chunkhdr`, `struct sctp_paramhdr`, `struct sctp_datahdr`, `struct sctp_data_chunk`, `struct sctp_idatahdr`, `struct sctp_idata_chunk`, `struct sctp_inithdr`, `struct sctp_init_chunk`, `struct sctp_ipv4addr_param`.
- Atlas domain: Core OS / Core Kernel Interface.
- Implementation status: source implementation candidate.
Implementation Notes
- This generated page is the file-by-file coverage layer; curated subsystem chapters should link here when they synthesize a multi-file control flow.
- Core OS pages should be promoted from atlas-only to deep-reviewed when they explain data structures, invariants, locking, lifecycle, and C implementation snippets.
- Driver-family pages are intentionally pattern-oriented unless they are part of the selected PCIe/NVMe representative device path.