Xen Test Framework
include
xen
io
xs_wire.h
Go to the documentation of this file.
1
#ifndef XEN_PUBLIC_IO_XS_WIRE_H
2
#define XEN_PUBLIC_IO_XS_WIRE_H
3
4
/* API/ABI relevent to the XenBus shared memory interface. */
5
6
#define XENBUS_RING_SIZE 1024
7
static
inline
uint32_t
mask_xenbus_idx
(
uint32_t
idx)
8
{
9
return
idx & (
XENBUS_RING_SIZE
- 1);
10
}
11
12
struct
xenbus_interface
{
13
char
req
[
XENBUS_RING_SIZE
];
/* Requests to the xenstore daemon. */
14
char
rsp
[
XENBUS_RING_SIZE
];
/* Replies and async watch events. */
15
uint32_t
req_cons
,
req_prod
;
16
uint32_t
rsp_cons
,
rsp_prod
;
17
uint32_t
server_features
;
18
uint32_t
connection
;
19
};
20
typedef
struct
xenbus_interface
xenbus_interface_t
;
21
22
#define XENBUS_SERVER_FEATURE_RECONNECTION 1
23
24
#define XENBUS_CONNECTED 0
25
#define XENBUS_RECONNECT 1
26
27
28
/* API/ABI relevent to the Xenstore protocol. */
29
30
struct
xenstore_msg_hdr
{
31
uint32_t
type
;
32
uint32_t
req_id
;
33
uint32_t
tx_id
;
34
uint32_t
len
;
35
};
36
37
enum
xenstore_msg_type
38
{
39
XS_CONTROL
,
40
XS_DIRECTORY
,
41
XS_READ
,
42
XS_GET_PERMS
,
43
XS_WATCH
,
44
XS_UNWATCH
,
45
XS_TRANSACTION_START
,
46
XS_TRANSACTION_END
,
47
XS_INTRODUCE
,
48
XS_RELEASE
,
49
XS_GET_DOMAIN_PATH
,
50
XS_WRITE
,
51
XS_MKDIR
,
52
XS_RM
,
53
XS_SET_PERMS
,
54
XS_WATCH_EVENT
,
55
XS_ERROR
,
56
XS_IS_DOMAIN_INTRODUCED
,
57
XS_RESUME
,
58
XS_SET_TARGET
,
59
/* XS_RESTRICT has been removed */
60
XS_RESET_WATCHES
=
XS_SET_TARGET
+ 2,
61
XS_DIRECTORY_PART
,
62
63
XS_TYPE_COUNT
,
/* Number of valid types. */
64
65
XS_INVALID
= 0xffff
/* Guaranteed to remain an invalid type */
66
};
67
68
69
#define XENSTORE_PAYLOAD_MAX 4096
70
71
#define XENSTORE_ABS_PATH_MAX 3072
72
#define XENSTORE_REL_PATH_MAX 2048
73
74
#endif
/* XEN_PUBLIC_IO_XS_WIRE_H */
75
76
/*
77
* Local variables:
78
* mode: C
79
* c-file-style: "BSD"
80
* c-basic-offset: 4
81
* tab-width: 4
82
* indent-tabs-mode: nil
83
* End:
84
*/
uint32_t
__UINT32_TYPE__ uint32_t
Definition:
stdint.h:16
xenbus_interface
Definition:
xs_wire.h:12
xenbus_interface::server_features
uint32_t server_features
Definition:
xs_wire.h:17
xenbus_interface::rsp
char rsp[XENBUS_RING_SIZE]
Definition:
xs_wire.h:14
xenbus_interface::req_cons
uint32_t req_cons
Definition:
xs_wire.h:15
xenbus_interface::req_prod
uint32_t req_prod
Definition:
xs_wire.h:15
xenbus_interface::rsp_prod
uint32_t rsp_prod
Definition:
xs_wire.h:16
xenbus_interface::req
char req[XENBUS_RING_SIZE]
Definition:
xs_wire.h:13
xenbus_interface::connection
uint32_t connection
Definition:
xs_wire.h:18
xenbus_interface::rsp_cons
uint32_t rsp_cons
Definition:
xs_wire.h:16
xenstore_msg_hdr
Definition:
xs_wire.h:30
xenstore_msg_hdr::req_id
uint32_t req_id
Definition:
xs_wire.h:32
xenstore_msg_hdr::tx_id
uint32_t tx_id
Definition:
xs_wire.h:33
xenstore_msg_hdr::len
uint32_t len
Definition:
xs_wire.h:34
xenstore_msg_hdr::type
uint32_t type
Definition:
xs_wire.h:31
mask_xenbus_idx
static uint32_t mask_xenbus_idx(uint32_t idx)
Definition:
xs_wire.h:7
XENBUS_RING_SIZE
#define XENBUS_RING_SIZE
Definition:
xs_wire.h:6
xenstore_msg_type
xenstore_msg_type
Definition:
xs_wire.h:38
XS_INVALID
@ XS_INVALID
Definition:
xs_wire.h:65
XS_RELEASE
@ XS_RELEASE
Definition:
xs_wire.h:48
XS_WRITE
@ XS_WRITE
Definition:
xs_wire.h:50
XS_MKDIR
@ XS_MKDIR
Definition:
xs_wire.h:51
XS_CONTROL
@ XS_CONTROL
Definition:
xs_wire.h:39
XS_DIRECTORY_PART
@ XS_DIRECTORY_PART
Definition:
xs_wire.h:61
XS_IS_DOMAIN_INTRODUCED
@ XS_IS_DOMAIN_INTRODUCED
Definition:
xs_wire.h:56
XS_TRANSACTION_START
@ XS_TRANSACTION_START
Definition:
xs_wire.h:45
XS_GET_DOMAIN_PATH
@ XS_GET_DOMAIN_PATH
Definition:
xs_wire.h:49
XS_DIRECTORY
@ XS_DIRECTORY
Definition:
xs_wire.h:40
XS_WATCH_EVENT
@ XS_WATCH_EVENT
Definition:
xs_wire.h:54
XS_READ
@ XS_READ
Definition:
xs_wire.h:41
XS_TYPE_COUNT
@ XS_TYPE_COUNT
Definition:
xs_wire.h:63
XS_RESET_WATCHES
@ XS_RESET_WATCHES
Definition:
xs_wire.h:60
XS_RESUME
@ XS_RESUME
Definition:
xs_wire.h:57
XS_ERROR
@ XS_ERROR
Definition:
xs_wire.h:55
XS_INTRODUCE
@ XS_INTRODUCE
Definition:
xs_wire.h:47
XS_UNWATCH
@ XS_UNWATCH
Definition:
xs_wire.h:44
XS_WATCH
@ XS_WATCH
Definition:
xs_wire.h:43
XS_SET_TARGET
@ XS_SET_TARGET
Definition:
xs_wire.h:58
XS_RM
@ XS_RM
Definition:
xs_wire.h:52
XS_GET_PERMS
@ XS_GET_PERMS
Definition:
xs_wire.h:42
XS_SET_PERMS
@ XS_SET_PERMS
Definition:
xs_wire.h:53
XS_TRANSACTION_END
@ XS_TRANSACTION_END
Definition:
xs_wire.h:46
Generated by
1.9.4