include/uapi/linux/mctp.h
Source file repositories/reference/linux-study-clean/include/uapi/linux/mctp.h
File Facts
- System
- Linux kernel
- Corpus path
include/uapi/linux/mctp.h- Extension
.h- Size
- 2733 bytes
- Lines
- 109
- 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/types.hlinux/socket.hlinux/netdevice.h
Detected Declarations
struct mctp_addrstruct sockaddr_mctpstruct sockaddr_mctp_extstruct mctp_fq_addrstruct mctp_ioc_tag_ctlstruct mctp_ioc_tag_ctl2
Annotated Snippet
struct mctp_addr {
mctp_eid_t s_addr;
};
struct sockaddr_mctp {
__kernel_sa_family_t smctp_family;
__u16 __smctp_pad0;
unsigned int smctp_network;
struct mctp_addr smctp_addr;
__u8 smctp_type;
__u8 smctp_tag;
__u8 __smctp_pad1;
};
struct sockaddr_mctp_ext {
struct sockaddr_mctp smctp_base;
int smctp_ifindex;
__u8 smctp_halen;
__u8 __smctp_pad0[3];
__u8 smctp_haddr[MAX_ADDR_LEN];
};
/* A "fully qualified" MCTP address, which includes the system-local network ID,
* required to uniquely resolve a routable EID.
*/
struct mctp_fq_addr {
unsigned int net;
mctp_eid_t eid;
};
#define MCTP_NET_ANY 0x0
#define MCTP_ADDR_NULL 0x00
#define MCTP_ADDR_ANY 0xff
#define MCTP_TAG_MASK 0x07
#define MCTP_TAG_OWNER 0x08
#define MCTP_TAG_PREALLOC 0x10
#define MCTP_OPT_ADDR_EXT 1
#define SIOCMCTPALLOCTAG (SIOCPROTOPRIVATE + 0)
#define SIOCMCTPDROPTAG (SIOCPROTOPRIVATE + 1)
#define SIOCMCTPALLOCTAG2 (SIOCPROTOPRIVATE + 2)
#define SIOCMCTPDROPTAG2 (SIOCPROTOPRIVATE + 3)
/* Deprecated: use mctp_ioc_tag_ctl2 / TAG2 ioctls instead, which defines the
* MCTP network ID as part of the allocated tag. Using this assumes the default
* net ID for allocated tags, which may not give correct behaviour on system
* with multiple networks configured.
*/
struct mctp_ioc_tag_ctl {
mctp_eid_t peer_addr;
/* For SIOCMCTPALLOCTAG: must be passed as zero, kernel will
* populate with the allocated tag value. Returned tag value will
* always have TO and PREALLOC set.
*
* For SIOCMCTPDROPTAG: userspace provides tag value to drop, from
* a prior SIOCMCTPALLOCTAG call (and so must have TO and PREALLOC set).
*/
__u8 tag;
__u16 flags;
};
struct mctp_ioc_tag_ctl2 {
/* Peer details: network ID, peer EID, local EID. All set by the
* caller.
*
* Local EID must be MCTP_ADDR_NULL or MCTP_ADDR_ANY in current
* kernels.
*/
unsigned int net;
mctp_eid_t peer_addr;
mctp_eid_t local_addr;
/* Set by caller, but no flags defined currently. Must be 0 */
__u16 flags;
/* For SIOCMCTPALLOCTAG2: must be passed as zero, kernel will
* populate with the allocated tag value. Returned tag value will
* always have TO and PREALLOC set.
*
* For SIOCMCTPDROPTAG2: userspace provides tag value to drop, from
* a prior SIOCMCTPALLOCTAG2 call (and so must have TO and PREALLOC set).
*/
__u8 tag;
};
Annotation
- Immediate include surface: `linux/types.h`, `linux/socket.h`, `linux/netdevice.h`.
- Detected declarations: `struct mctp_addr`, `struct sockaddr_mctp`, `struct sockaddr_mctp_ext`, `struct mctp_fq_addr`, `struct mctp_ioc_tag_ctl`, `struct mctp_ioc_tag_ctl2`.
- 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.