Elliott Hughes | 180edef | 2023-11-02 00:08:05 +0000 | [diff] [blame] | 1 | /* |
| 2 | * This file is auto-generated. Modifications will be lost. |
| 3 | * |
| 4 | * See https://android.googlesource.com/platform/bionic/+/master/libc/kernel/ |
| 5 | * for more information. |
| 6 | */ |
Christopher Ferris | 49f525c | 2016-12-12 14:55:36 -0800 | [diff] [blame] | 7 | #ifndef _UAPI_LINUX_VIRTIO_VSOCK_H |
| 8 | #define _UAPI_LINUX_VIRTIO_VSOCK_H |
| 9 | #include <linux/types.h> |
| 10 | #include <linux/virtio_ids.h> |
Christopher Ferris | 49f525c | 2016-12-12 14:55:36 -0800 | [diff] [blame] | 11 | #include <linux/virtio_config.h> |
Christopher Ferris | 3a39c0b | 2021-09-02 00:03:38 +0000 | [diff] [blame] | 12 | #define VIRTIO_VSOCK_F_SEQPACKET 1 |
Christopher Ferris | 49f525c | 2016-12-12 14:55:36 -0800 | [diff] [blame] | 13 | struct virtio_vsock_config { |
| 14 | __le64 guest_cid; |
| 15 | } __attribute__((packed)); |
Christopher Ferris | 49f525c | 2016-12-12 14:55:36 -0800 | [diff] [blame] | 16 | enum virtio_vsock_event_id { |
| 17 | VIRTIO_VSOCK_EVENT_TRANSPORT_RESET = 0, |
| 18 | }; |
| 19 | struct virtio_vsock_event { |
Christopher Ferris | 49f525c | 2016-12-12 14:55:36 -0800 | [diff] [blame] | 20 | __le32 id; |
| 21 | } __attribute__((packed)); |
| 22 | struct virtio_vsock_hdr { |
| 23 | __le64 src_cid; |
Christopher Ferris | 49f525c | 2016-12-12 14:55:36 -0800 | [diff] [blame] | 24 | __le64 dst_cid; |
| 25 | __le32 src_port; |
| 26 | __le32 dst_port; |
| 27 | __le32 len; |
Christopher Ferris | 49f525c | 2016-12-12 14:55:36 -0800 | [diff] [blame] | 28 | __le16 type; |
| 29 | __le16 op; |
| 30 | __le32 flags; |
| 31 | __le32 buf_alloc; |
Christopher Ferris | 49f525c | 2016-12-12 14:55:36 -0800 | [diff] [blame] | 32 | __le32 fwd_cnt; |
| 33 | } __attribute__((packed)); |
| 34 | enum virtio_vsock_type { |
| 35 | VIRTIO_VSOCK_TYPE_STREAM = 1, |
Christopher Ferris | 3a39c0b | 2021-09-02 00:03:38 +0000 | [diff] [blame] | 36 | VIRTIO_VSOCK_TYPE_SEQPACKET = 2, |
Christopher Ferris | 49f525c | 2016-12-12 14:55:36 -0800 | [diff] [blame] | 37 | }; |
| 38 | enum virtio_vsock_op { |
| 39 | VIRTIO_VSOCK_OP_INVALID = 0, |
| 40 | VIRTIO_VSOCK_OP_REQUEST = 1, |
Christopher Ferris | 49f525c | 2016-12-12 14:55:36 -0800 | [diff] [blame] | 41 | VIRTIO_VSOCK_OP_RESPONSE = 2, |
| 42 | VIRTIO_VSOCK_OP_RST = 3, |
| 43 | VIRTIO_VSOCK_OP_SHUTDOWN = 4, |
| 44 | VIRTIO_VSOCK_OP_RW = 5, |
Christopher Ferris | 49f525c | 2016-12-12 14:55:36 -0800 | [diff] [blame] | 45 | VIRTIO_VSOCK_OP_CREDIT_UPDATE = 6, |
| 46 | VIRTIO_VSOCK_OP_CREDIT_REQUEST = 7, |
| 47 | }; |
| 48 | enum virtio_vsock_shutdown { |
Christopher Ferris | 49f525c | 2016-12-12 14:55:36 -0800 | [diff] [blame] | 49 | VIRTIO_VSOCK_SHUTDOWN_RCV = 1, |
| 50 | VIRTIO_VSOCK_SHUTDOWN_SEND = 2, |
| 51 | }; |
Christopher Ferris | 3a39c0b | 2021-09-02 00:03:38 +0000 | [diff] [blame] | 52 | enum virtio_vsock_rw { |
Christopher Ferris | 2abfa9e | 2021-11-01 16:26:06 -0700 | [diff] [blame] | 53 | VIRTIO_VSOCK_SEQ_EOM = 1, |
| 54 | VIRTIO_VSOCK_SEQ_EOR = 2, |
Christopher Ferris | 3a39c0b | 2021-09-02 00:03:38 +0000 | [diff] [blame] | 55 | }; |
Christopher Ferris | 49f525c | 2016-12-12 14:55:36 -0800 | [diff] [blame] | 56 | #endif |