include/net/sctp/structs.h
Source file repositories/reference/linux-study-clean/include/net/sctp/structs.h
File Facts
- System
- Linux kernel
- Corpus path
include/net/sctp/structs.h- Extension
.h- Size
- 67805 bytes
- Lines
- 2182
- Domain
- Networking Core
- Bucket
- Sockets, Protocols, Packet Path, And Network Policy
- Inferred role
- Networking Core: implementation source
- Status
- source implementation candidate
Why This File Exists
Networking stack implementation surface: socket APIs, protocol dispatch, packet flow, routing, filtering, and network namespaces.
- Networking stack implementation surface: socket APIs, protocol dispatch, packet flow, routing, filtering, and network namespaces.
- Uses kernel synchronization; read lock ordering, sleepability, and interrupt context assumptions before translating.
- Defines or uses C structs; map object ownership, embedded links, reference counts, and lock ownership.
Dependency Surface
crypto/sha2.hlinux/ktime.hlinux/generic-radix-tree.hlinux/rhashtable-types.hlinux/socket.hlinux/in.hlinux/in6.hlinux/ipv6.hasm/param.hlinux/atomic.hlinux/skbuff.hlinux/workqueue.hlinux/sctp.hnet/sctp/auth.hnet/ip.hnet/sctp/tsnmap.hnet/sctp/ulpevent.hnet/sctp/ulpqueue.hnet/sctp/stream_interleave.h
Detected Declarations
struct sctp_globalsstruct sctp_endpointstruct sctp_associationstruct sctp_transportstruct sctp_packetstruct sctp_chunkstruct sctp_inqstruct sctp_outqstruct sctp_bind_addrstruct sctp_ulpqstruct sctp_ep_commonstruct sctp_streamstruct sctp_bind_bucketstruct sctp_bind_hashbucketstruct sctp_hashbucketstruct sctp_sockstruct sctp6_sockstruct sctp_cookiestruct sctp_signed_cookiestruct sctp_sender_hb_infostruct sctp_afstruct sctp_pfstruct sctp_datamsgstruct sctp_chunkstruct sctp_sockaddr_entrystruct sctp_packetstruct sctp_transportstruct sctp_inqstruct sctp_outqstruct sctp_input_cbstruct sctp_output_cbstruct sctp_bind_addrstruct sctp_ep_commonstruct sctp_endpointstruct sctp_inithdr_hoststruct sctp_stream_prioritiesstruct sctp_stream_out_extstruct sctp_stream_outstruct sctp_stream_instruct sctp_streamstruct sctp_priv_assoc_statsstruct sctp_associationstruct sctp_cmsgsstruct sctp_dbg_objcnt_entryenum sctp_socket_typeenum sctp_endpoint_typefunction sctp_chunk_stream_nofunction sctp_packet_empty
Annotated Snippet
struct sctp_bind_bucket {
unsigned short port;
signed char fastreuse;
signed char fastreuseport;
kuid_t fastuid;
struct hlist_node node;
struct hlist_head owner;
struct net *net;
};
struct sctp_bind_hashbucket {
spinlock_t lock;
struct hlist_head chain;
};
/* Used for hashing all associations. */
struct sctp_hashbucket {
rwlock_t lock;
struct hlist_head chain;
} __attribute__((__aligned__(8)));
/* The SCTP globals structure. */
extern struct sctp_globals {
/* This is a list of groups of functions for each address
* family that we support.
*/
struct list_head address_families;
/* This is the hash of all endpoints. */
struct sctp_hashbucket *ep_hashtable;
/* This is the sctp port control hash. */
struct sctp_bind_hashbucket *port_hashtable;
/* This is the hash of all transports. */
struct rhltable transport_hashtable;
/* Sizes of above hashtables. */
int ep_hashsize;
int port_hashsize;
/* Default initialization values to be applied to new associations. */
__u16 max_instreams;
__u16 max_outstreams;
/* Flag to indicate whether computing and verifying checksum
* is disabled. */
bool checksum_disable;
} sctp_globals;
#define sctp_max_instreams (sctp_globals.max_instreams)
#define sctp_max_outstreams (sctp_globals.max_outstreams)
#define sctp_address_families (sctp_globals.address_families)
#define sctp_ep_hashsize (sctp_globals.ep_hashsize)
#define sctp_ep_hashtable (sctp_globals.ep_hashtable)
#define sctp_port_hashsize (sctp_globals.port_hashsize)
#define sctp_port_hashtable (sctp_globals.port_hashtable)
#define sctp_transport_hashtable (sctp_globals.transport_hashtable)
#define sctp_checksum_disable (sctp_globals.checksum_disable)
/* SCTP Socket type: UDP or TCP style. */
enum sctp_socket_type {
SCTP_SOCKET_UDP = 0,
SCTP_SOCKET_UDP_HIGH_BANDWIDTH,
SCTP_SOCKET_TCP
};
/* Per socket SCTP information. */
struct sctp_sock {
/* inet_sock has to be the first member of sctp_sock */
struct inet_sock inet;
/* What kind of a socket is this? */
enum sctp_socket_type type;
/* PF_ family specific functions. */
struct sctp_pf *pf;
/* What is our base endpointer? */
struct sctp_endpoint *ep;
struct sctp_bind_bucket *bind_hash;
/* Various Socket Options. */
__u16 default_stream;
__u32 default_ppid;
__u16 default_flags;
__u32 default_context;
__u32 default_timetolive;
__u32 default_rcv_context;
int max_burst;
/* Heartbeat interval: The endpoint sends out a Heartbeat chunk to
Annotation
- Immediate include surface: `crypto/sha2.h`, `linux/ktime.h`, `linux/generic-radix-tree.h`, `linux/rhashtable-types.h`, `linux/socket.h`, `linux/in.h`, `linux/in6.h`, `linux/ipv6.h`.
- Detected declarations: `struct sctp_globals`, `struct sctp_endpoint`, `struct sctp_association`, `struct sctp_transport`, `struct sctp_packet`, `struct sctp_chunk`, `struct sctp_inq`, `struct sctp_outq`, `struct sctp_bind_addr`, `struct sctp_ulpq`.
- Atlas domain: Networking Core / Sockets, Protocols, Packet Path, And Network Policy.
- Implementation status: source implementation candidate.
- Synchronization appears in or near this file; preserve lock ordering, sleepability, and interrupt-context constraints.
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.