10
10
11
11
enum xsd_sockmsg_type
12
12
{
13
- XS_DEBUG ,
13
+ XS_CONTROL ,
14
+ #define XS_DEBUG XS_CONTROL
14
15
XS_DIRECTORY ,
15
16
XS_READ ,
16
17
XS_GET_PERMS ,
@@ -30,8 +31,13 @@ enum xsd_sockmsg_type
30
31
XS_IS_DOMAIN_INTRODUCED ,
31
32
XS_RESUME ,
32
33
XS_SET_TARGET ,
33
- XS_RESTRICT ,
34
- XS_RESET_WATCHES ,
34
+ /* XS_RESTRICT has been removed */
35
+ XS_RESET_WATCHES = XS_SET_TARGET + 2 ,
36
+ XS_DIRECTORY_PART ,
37
+
38
+ XS_TYPE_COUNT , /* Number of valid types. */
39
+
40
+ XS_INVALID = 0xffff /* Guaranteed to remain an invalid type */
35
41
};
36
42
37
43
#define XS_WRITE_NONE "NONE"
@@ -59,7 +65,8 @@ static struct xsd_errors xsd_errors[] __attribute__((unused)) = {
59
65
XSD_ERROR (EROFS ),
60
66
XSD_ERROR (EBUSY ),
61
67
XSD_ERROR (EAGAIN ),
62
- XSD_ERROR (EISCONN )
68
+ XSD_ERROR (EISCONN ),
69
+ XSD_ERROR (E2BIG )
63
70
};
64
71
65
72
struct xsd_sockmsg
@@ -87,9 +94,31 @@ struct xenstore_domain_interface {
87
94
char rsp [XENSTORE_RING_SIZE ]; /* Replies and async watch events. */
88
95
XENSTORE_RING_IDX req_cons , req_prod ;
89
96
XENSTORE_RING_IDX rsp_cons , rsp_prod ;
97
+ uint32_t server_features ; /* Bitmap of features supported by the server */
98
+ uint32_t connection ;
99
+ uint32_t error ;
90
100
};
91
101
92
102
/* Violating this is very bad. See docs/misc/xenstore.txt. */
93
103
#define XENSTORE_PAYLOAD_MAX 4096
94
104
105
+ /* Violating these just gets you an error back */
106
+ #define XENSTORE_ABS_PATH_MAX 3072
107
+ #define XENSTORE_REL_PATH_MAX 2048
108
+
109
+ /* The ability to reconnect a ring */
110
+ #define XENSTORE_SERVER_FEATURE_RECONNECTION 1
111
+ /* The presence of the "error" field in the ring page */
112
+ #define XENSTORE_SERVER_FEATURE_ERROR 2
113
+
114
+ /* Valid values for the connection field */
115
+ #define XENSTORE_CONNECTED 0 /* the steady-state */
116
+ #define XENSTORE_RECONNECT 1 /* guest has initiated a reconnect */
117
+
118
+ /* Valid values for the error field */
119
+ #define XENSTORE_ERROR_NONE 0 /* No error */
120
+ #define XENSTORE_ERROR_COMM 1 /* Communication problem */
121
+ #define XENSTORE_ERROR_RINGIDX 2 /* Invalid ring index */
122
+ #define XENSTORE_ERROR_PROTO 3 /* Protocol violation (payload too long) */
123
+
95
124
#endif /* _XS_WIRE_H */
0 commit comments