include/uapi/linux/virtio_can.h
Source file repositories/reference/linux-study-clean/include/uapi/linux/virtio_can.h
File Facts
- System
- Linux kernel
- Corpus path
include/uapi/linux/virtio_can.h- Extension
.h- Size
- 2197 bytes
- Lines
- 79
- 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/virtio_types.hlinux/virtio_ids.hlinux/virtio_config.h
Detected Declarations
struct virtio_can_configstruct virtio_can_tx_outstruct virtio_can_tx_instruct virtio_can_rxstruct virtio_can_control_outstruct virtio_can_control_in
Annotated Snippet
struct virtio_can_config {
#define VIRTIO_CAN_S_CTRL_BUSOFF (1u << 0) /* Controller BusOff */
/* CAN controller status */
__le16 status;
};
/* TX queue message types */
struct virtio_can_tx_out {
#define VIRTIO_CAN_TX 0x0001
__le16 msg_type;
__le16 length; /* 0..8 CC, 0..64 CAN-FD, 0..2048 CAN-XL, 12 bits */
__u8 reserved_classic_dlc; /* If CAN classic length = 8 then DLC can be 8..15 */
__u8 padding;
__le16 reserved_xl_priority; /* May be needed for CAN XL priority */
__le32 flags;
__le32 can_id;
__u8 sdu[] __counted_by_le(length);
};
struct virtio_can_tx_in {
__u8 result;
};
/* RX queue message types */
struct virtio_can_rx {
#define VIRTIO_CAN_RX 0x0101
__le16 msg_type;
__le16 length; /* 0..8 CC, 0..64 CAN-FD, 0..2048 CAN-XL, 12 bits */
__u8 reserved_classic_dlc; /* If CAN classic length = 8 then DLC can be 8..15 */
__u8 padding;
__le16 reserved_xl_priority; /* May be needed for CAN XL priority */
__le32 flags;
__le32 can_id;
__u8 sdu[] __counted_by_le(length);
};
/* Control queue message types */
struct virtio_can_control_out {
#define VIRTIO_CAN_SET_CTRL_MODE_START 0x0201
#define VIRTIO_CAN_SET_CTRL_MODE_STOP 0x0202
__le16 msg_type;
};
struct virtio_can_control_in {
__u8 result;
};
#endif /* #ifndef _LINUX_VIRTIO_VIRTIO_CAN_H */
Annotation
- Immediate include surface: `linux/types.h`, `linux/virtio_types.h`, `linux/virtio_ids.h`, `linux/virtio_config.h`.
- Detected declarations: `struct virtio_can_config`, `struct virtio_can_tx_out`, `struct virtio_can_tx_in`, `struct virtio_can_rx`, `struct virtio_can_control_out`, `struct virtio_can_control_in`.
- 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.