include/net/sctp/sctp.h
Source file repositories/reference/linux-study-clean/include/net/sctp/sctp.h
File Facts
- System
- Linux kernel
- Corpus path
include/net/sctp/sctp.h- Extension
.h- Size
- 20472 bytes
- Lines
- 672
- 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
linux/types.hlinux/slab.hlinux/in.hlinux/tty.hlinux/proc_fs.hlinux/spinlock.hlinux/jiffies.hlinux/idr.hnet/ipv6.hnet/ip6_route.hlinux/uaccess.hasm/page.hnet/sock.hnet/snmp.hnet/sctp/structs.hnet/sctp/constants.h
Detected Declarations
struct sctp_mibfunction sctp_max_rtofunction sctp_dbg_objcnt_initfunction sctp_sysctl_registerfunction sctp_sysctl_unregisterfunction sctp_sysctl_net_registerfunction sctp_sysctl_net_unregisterfunction sctp_v6_pf_initfunction sctp_v6_pf_exitfunction sctp_v6_protosw_initfunction sctp_v6_protosw_exitfunction sctp_v6_add_protocolfunction sctp_v6_del_protocolfunction sctp_assoc2idfunction sctp_assoc_to_statefunction sctp_skb_set_owner_rfunction sctp_list_single_entryfunction sctp_chunk_pendingfunction ipver2affunction param_type2affunction sctp_phashfnfunction sctp_ep_hashfnfunction __sctp_stylefunction __sctp_statefunction __sctp_sstatefunction sctp_v6_map_v4function sctp_v4_map_v6function __sctp_mtu_payloadfunction sctp_mtu_payloadfunction sctp_dst_mtufunction sctp_transport_pmtu_checkfunction sctp_min_frag_pointfunction sctp_transport_pl_hlenfunction sctp_transport_pl_resetfunction sctp_transport_pl_updatefunction sctp_transport_pl_enabledfunction sctp_newsk_readyfunction sctp_sock_set_nodelay
Annotated Snippet
struct sctp_mib {
unsigned long mibs[SCTP_MIB_MAX];
};
/* helper function to track stats about max rto and related transport */
static inline void sctp_max_rto(struct sctp_association *asoc,
struct sctp_transport *trans)
{
if (asoc->stats.max_obs_rto < (__u64)trans->rto) {
asoc->stats.max_obs_rto = trans->rto;
memset(&asoc->stats.obs_rto_ipaddr, 0,
sizeof(struct sockaddr_storage));
memcpy(&asoc->stats.obs_rto_ipaddr, &trans->ipaddr,
trans->af_specific->sockaddr_len);
}
}
/*
* Macros for keeping a global reference of object allocations.
*/
#ifdef CONFIG_SCTP_DBG_OBJCNT
extern atomic_t sctp_dbg_objcnt_sock;
extern atomic_t sctp_dbg_objcnt_ep;
extern atomic_t sctp_dbg_objcnt_assoc;
extern atomic_t sctp_dbg_objcnt_transport;
extern atomic_t sctp_dbg_objcnt_chunk;
extern atomic_t sctp_dbg_objcnt_bind_addr;
extern atomic_t sctp_dbg_objcnt_bind_bucket;
extern atomic_t sctp_dbg_objcnt_addr;
extern atomic_t sctp_dbg_objcnt_datamsg;
extern atomic_t sctp_dbg_objcnt_keys;
/* Macros to atomically increment/decrement objcnt counters. */
#define SCTP_DBG_OBJCNT_INC(name) \
atomic_inc(&sctp_dbg_objcnt_## name)
#define SCTP_DBG_OBJCNT_DEC(name) \
atomic_dec(&sctp_dbg_objcnt_## name)
#define SCTP_DBG_OBJCNT(name) \
atomic_t sctp_dbg_objcnt_## name = ATOMIC_INIT(0)
/* Macro to help create new entries in the global array of
* objcnt counters.
*/
#define SCTP_DBG_OBJCNT_ENTRY(name) \
{.label= #name, .counter= &sctp_dbg_objcnt_## name}
void sctp_dbg_objcnt_init(struct net *);
#else
#define SCTP_DBG_OBJCNT_INC(name)
#define SCTP_DBG_OBJCNT_DEC(name)
static inline void sctp_dbg_objcnt_init(struct net *net) { return; }
#endif /* CONFIG_SCTP_DBG_OBJCNT */
#if defined CONFIG_SYSCTL
void sctp_sysctl_register(void);
void sctp_sysctl_unregister(void);
int sctp_sysctl_net_register(struct net *net);
void sctp_sysctl_net_unregister(struct net *net);
#else
static inline void sctp_sysctl_register(void) { return; }
static inline void sctp_sysctl_unregister(void) { return; }
static inline int sctp_sysctl_net_register(struct net *net) { return 0; }
static inline void sctp_sysctl_net_unregister(struct net *net) { return; }
#endif
/* Size of Supported Address Parameter for 'x' address types. */
#define SCTP_SAT_LEN(x) (sizeof(struct sctp_paramhdr) + (x) * sizeof(__u16))
#if IS_ENABLED(CONFIG_IPV6)
void sctp_v6_pf_init(void);
void sctp_v6_pf_exit(void);
int sctp_v6_protosw_init(void);
void sctp_v6_protosw_exit(void);
int sctp_v6_add_protocol(void);
void sctp_v6_del_protocol(void);
#else /* #ifdef defined(CONFIG_IPV6) */
static inline void sctp_v6_pf_init(void) { return; }
static inline void sctp_v6_pf_exit(void) { return; }
static inline int sctp_v6_protosw_init(void) { return 0; }
static inline void sctp_v6_protosw_exit(void) { return; }
static inline int sctp_v6_add_protocol(void) { return 0; }
static inline void sctp_v6_del_protocol(void) { return; }
Annotation
- Immediate include surface: `linux/types.h`, `linux/slab.h`, `linux/in.h`, `linux/tty.h`, `linux/proc_fs.h`, `linux/spinlock.h`, `linux/jiffies.h`, `linux/idr.h`.
- Detected declarations: `struct sctp_mib`, `function sctp_max_rto`, `function sctp_dbg_objcnt_init`, `function sctp_sysctl_register`, `function sctp_sysctl_unregister`, `function sctp_sysctl_net_register`, `function sctp_sysctl_net_unregister`, `function sctp_v6_pf_init`, `function sctp_v6_pf_exit`, `function sctp_v6_protosw_init`.
- 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.