2 * Details of the "wire" protocol between Xen Store Daemon and client
3 * library or guest kernel.
4 * Copyright (C) 2005 Rusty Russell IBM Corporation
29 XS_IS_DOMAIN_INTRODUCED
32 #define XS_WRITE_NONE "NONE"
33 #define XS_WRITE_CREATE "CREATE"
34 #define XS_WRITE_CREATE_EXCL "CREATE|EXCL"
36 /* We hand errors as strings, for portability. */
40 const char *errstring
;
42 #define XSD_ERROR(x) { x, #x }
43 static struct xsd_errors xsd_errors
[] __attribute__((unused
)) = {
62 uint32_t type
; /* XS_??? */
63 uint32_t req_id
;/* Request identifier, echoed in daemon's response. */
64 uint32_t tx_id
; /* Transaction id (0 if not related to a transaction). */
65 uint32_t len
; /* Length of data following this. */
67 /* Generally followed by nul-terminated string(s). */
76 /* Inter-domain shared memory communications. */
77 #define XENSTORE_RING_SIZE 1024
78 typedef uint32_t XENSTORE_RING_IDX
;
79 #define MASK_XENSTORE_IDX(idx) ((idx) & (XENSTORE_RING_SIZE-1))
80 struct xenstore_domain_interface
{
81 char req
[XENSTORE_RING_SIZE
]; /* Requests to xenstore daemon. */
82 char rsp
[XENSTORE_RING_SIZE
]; /* Replies and async watch events. */
83 XENSTORE_RING_IDX req_cons
, req_prod
;
84 XENSTORE_RING_IDX rsp_cons
, rsp_prod
;
87 #endif /* _XS_WIRE_H */