• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1 /*
2  * This header was generated from the Linux kernel headers by update_headers.py,
3  * to provide necessary information from kernel to userspace, such as constants,
4  * structures, and macros, and thus, contains no copyrightable information.
5  */
6 #ifndef _UAPI_LINUX_VIRTIO_VSOCK_H
7 #define _UAPI_LINUX_VIRTIO_VSOCK_H
8 #include <linux/types.h>
9 #include <linux/virtio_ids.h>
10 #include <linux/virtio_config.h>
11 struct virtio_vsock_config {
12 	__le64 guest_cid;
13 } __attribute__((packed));
14 enum virtio_vsock_event_id {
15 	VIRTIO_VSOCK_EVENT_TRANSPORT_RESET = 0,
16 };
17 struct virtio_vsock_event {
18 	__le32 id;
19 } __attribute__((packed));
20 struct virtio_vsock_hdr {
21 	__le64	src_cid;
22 	__le64	dst_cid;
23 	__le32	src_port;
24 	__le32	dst_port;
25 	__le32	len;
26 	__le16	type;
27 	__le16	op;
28 	__le32	flags;
29 	__le32	buf_alloc;
30 	__le32	fwd_cnt;
31 } __attribute__((packed));
32 enum virtio_vsock_type {
33 	VIRTIO_VSOCK_TYPE_STREAM = 1,
34 };
35 enum virtio_vsock_op {
36 	VIRTIO_VSOCK_OP_INVALID = 0,
37 
38 	VIRTIO_VSOCK_OP_REQUEST = 1,
39 	VIRTIO_VSOCK_OP_RESPONSE = 2,
40 	VIRTIO_VSOCK_OP_RST = 3,
41 	VIRTIO_VSOCK_OP_SHUTDOWN = 4,
42 
43 	VIRTIO_VSOCK_OP_RW = 5,
44 
45 	VIRTIO_VSOCK_OP_CREDIT_UPDATE = 6,
46 
47 	VIRTIO_VSOCK_OP_CREDIT_REQUEST = 7,
48 };
49 enum virtio_vsock_shutdown {
50 	VIRTIO_VSOCK_SHUTDOWN_RCV = 1,
51 	VIRTIO_VSOCK_SHUTDOWN_SEND = 2,
52 };
53 #endif
54