blob: 7a9e259465ceb5864594fb4293b7db423015994d [file] [log] [blame]
Christopher Ferris49f525c2016-12-12 14:55:36 -08001/****************************************************************************
2 ****************************************************************************
3 ***
4 *** This header was automatically generated from a Linux kernel header
5 *** of the same name, to make information necessary for userspace to
6 *** call into the kernel available to libc. It contains only constants,
7 *** structures, and macros generated from the original header, and thus,
8 *** contains no copyrightable information.
9 ***
10 *** To edit the content of this header, modify the corresponding
11 *** source file (e.g. under external/kernel-headers/original/) then
12 *** run bionic/libc/kernel/tools/update_all.py
13 ***
14 *** Any manual change here will be lost the next time this script will
15 *** be run. You've been warned!
16 ***
17 ****************************************************************************
18 ****************************************************************************/
19#ifndef _UAPI_LINUX_VIRTIO_VSOCK_H
20#define _UAPI_LINUX_VIRTIO_VSOCK_H
21#include <linux/types.h>
22#include <linux/virtio_ids.h>
Christopher Ferris49f525c2016-12-12 14:55:36 -080023#include <linux/virtio_config.h>
24struct virtio_vsock_config {
25 __le64 guest_cid;
26} __attribute__((packed));
Christopher Ferris49f525c2016-12-12 14:55:36 -080027enum virtio_vsock_event_id {
28 VIRTIO_VSOCK_EVENT_TRANSPORT_RESET = 0,
29};
30struct virtio_vsock_event {
Christopher Ferris49f525c2016-12-12 14:55:36 -080031 __le32 id;
32} __attribute__((packed));
33struct virtio_vsock_hdr {
34 __le64 src_cid;
Christopher Ferris49f525c2016-12-12 14:55:36 -080035 __le64 dst_cid;
36 __le32 src_port;
37 __le32 dst_port;
38 __le32 len;
Christopher Ferris49f525c2016-12-12 14:55:36 -080039 __le16 type;
40 __le16 op;
41 __le32 flags;
42 __le32 buf_alloc;
Christopher Ferris49f525c2016-12-12 14:55:36 -080043 __le32 fwd_cnt;
44} __attribute__((packed));
45enum virtio_vsock_type {
46 VIRTIO_VSOCK_TYPE_STREAM = 1,
Christopher Ferris49f525c2016-12-12 14:55:36 -080047};
48enum virtio_vsock_op {
49 VIRTIO_VSOCK_OP_INVALID = 0,
50 VIRTIO_VSOCK_OP_REQUEST = 1,
Christopher Ferris49f525c2016-12-12 14:55:36 -080051 VIRTIO_VSOCK_OP_RESPONSE = 2,
52 VIRTIO_VSOCK_OP_RST = 3,
53 VIRTIO_VSOCK_OP_SHUTDOWN = 4,
54 VIRTIO_VSOCK_OP_RW = 5,
Christopher Ferris49f525c2016-12-12 14:55:36 -080055 VIRTIO_VSOCK_OP_CREDIT_UPDATE = 6,
56 VIRTIO_VSOCK_OP_CREDIT_REQUEST = 7,
57};
58enum virtio_vsock_shutdown {
Christopher Ferris49f525c2016-12-12 14:55:36 -080059 VIRTIO_VSOCK_SHUTDOWN_RCV = 1,
60 VIRTIO_VSOCK_SHUTDOWN_SEND = 2,
61};
62#endif