include/uapi/linux/nbd.h

Source file repositories/reference/linux-study-clean/include/uapi/linux/nbd.h

File Facts

System
Linux kernel
Corpus path
include/uapi/linux/nbd.h
Extension
.h
Size
3877 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.

Dependency Surface

Detected Declarations

Annotated Snippet

struct nbd_request {
	__be32 magic;	/* NBD_REQUEST_MAGIC	*/
	__be32 type;	/* See NBD_CMD_*	*/
	union {
		__be64 cookie;	/* Opaque identifier for request	*/
		char handle[8];	/* older spelling of cookie		*/
	};
	__be64 from;
	__be32 len;
} __attribute__((packed));

/*
 * This is the reply packet that nbd-server sends back to the client after
 * it has completed an I/O request (or an error occurs).
 */
struct nbd_reply {
	__be32 magic;		/* NBD_REPLY_MAGIC	*/
	__be32 error;		/* 0 = ok, else error	*/
	union {
		__be64 cookie;	/* Opaque identifier from request	*/
		char handle[8];	/* older spelling of cookie		*/
	};
};
#endif /* _UAPILINUX_NBD_H */

Annotation

Implementation Notes