change sockaddr generation to pass around correct types.
[trinity.git] / ioctls / vhost.c
blob2ea76d8d3a838a61cbb127b1439a76112be5fc95
1 #include "config.h"
3 #ifdef USE_VHOST
4 #include <linux/vhost.h>
6 #include "utils.h"
7 #include "ioctls.h"
9 static const struct ioctl vhost_ioctls[] = {
10 IOCTL(VHOST_GET_FEATURES),
11 IOCTL(VHOST_SET_FEATURES),
12 IOCTL(VHOST_SET_OWNER),
13 IOCTL(VHOST_RESET_OWNER),
14 IOCTL(VHOST_SET_MEM_TABLE),
15 IOCTL(VHOST_SET_LOG_BASE),
16 IOCTL(VHOST_SET_LOG_FD),
17 IOCTL(VHOST_SET_VRING_NUM),
18 IOCTL(VHOST_SET_VRING_ADDR),
19 IOCTL(VHOST_SET_VRING_BASE),
20 IOCTL(VHOST_GET_VRING_BASE),
21 IOCTL(VHOST_SET_VRING_KICK),
22 IOCTL(VHOST_SET_VRING_CALL),
23 IOCTL(VHOST_SET_VRING_ERR),
24 IOCTL(VHOST_NET_SET_BACKEND),
25 #ifdef VHOST_SCSI_SET_ENDPOINT
26 IOCTL(VHOST_SCSI_SET_ENDPOINT),
27 #endif
28 #ifdef VHOST_SCSI_CLEAR_ENDPOINT
29 IOCTL(VHOST_SCSI_CLEAR_ENDPOINT),
30 #endif
31 #ifdef VHOST_SCSI_GET_ABI_VERSION
32 IOCTL(VHOST_SCSI_GET_ABI_VERSION),
33 #endif
34 #ifdef VHOST_SCSI_SET_EVENTS_MISSED
35 IOCTL(VHOST_SCSI_SET_EVENTS_MISSED),
36 #endif
37 #ifdef VHOST_SCSI_GET_EVENTS_MISSED
38 IOCTL(VHOST_SCSI_GET_EVENTS_MISSED),
39 #endif
42 static const char *const vhost_devs[] = {
43 "vhost-net",
46 static const struct ioctl_group vhost_grp = {
47 .devtype = DEV_MISC,
48 .devs = vhost_devs,
49 .devs_cnt = ARRAY_SIZE(vhost_devs),
50 .sanitise = pick_random_ioctl,
51 .ioctls = vhost_ioctls,
52 .ioctls_cnt = ARRAY_SIZE(vhost_ioctls),
55 REG_IOCTL_GROUP(vhost_grp)
56 #endif /* USE_VHOST */