xenbus.h revision 214077
1285809Sscottl/*****************************************************************************
2285809Sscottl * xenbus.h
3285809Sscottl *
4285809Sscottl * Xenbus protocol details.
5285809Sscottl *
6285809Sscottl * Permission is hereby granted, free of charge, to any person obtaining a copy
7285809Sscottl * of this software and associated documentation files (the "Software"), to
8285809Sscottl * deal in the Software without restriction, including without limitation the
9285809Sscottl * rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
10285809Sscottl * sell copies of the Software, and to permit persons to whom the Software is
11285809Sscottl * furnished to do so, subject to the following conditions:
12285809Sscottl *
13285809Sscottl * The above copyright notice and this permission notice shall be included in
14285809Sscottl * all copies or substantial portions of the Software.
15285809Sscottl *
16285809Sscottl * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
17285809Sscottl * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
18285809Sscottl * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
19285809Sscottl * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
20285809Sscottl * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
21285809Sscottl * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
22285809Sscottl * DEALINGS IN THE SOFTWARE.
23285809Sscottl *
24285809Sscottl * Copyright (C) 2005 XenSource Ltd.
25285809Sscottl */
26285809Sscottl
27285809Sscottl#ifndef _XEN_PUBLIC_IO_XENBUS_H
28285809Sscottl#define _XEN_PUBLIC_IO_XENBUS_H
29285809Sscottl
30285809Sscottl/*
31285809Sscottl * The state of either end of the Xenbus, i.e. the current communication
32285809Sscottl * status of initialisation across the bus.  States here imply nothing about
33285809Sscottl * the state of the connection between the driver and the kernel's device
34285809Sscottl * layers.
35285809Sscottl */
36285809Sscottlenum xenbus_state {
37285809Sscottl    XenbusStateUnknown       = 0,
38285809Sscottl
39285809Sscottl    /*
40285809Sscottl     * Initializing: Back-end is initializing.
41285809Sscottl     */
42285809Sscottl    XenbusStateInitialising  = 1,
43285809Sscottl
44285809Sscottl    /*
45285809Sscottl     * InitWait: Finished early initialisation but waiting for information
46285809Sscottl     * from the peer or hotplug scripts.
47285809Sscottl     */
48    XenbusStateInitWait      = 2,
49
50    /*
51     * Initialised: Waiting for a connection from the peer.
52     */
53    XenbusStateInitialised   = 3,
54
55    /*
56     * Connected: The normal state for a front to backend connection.
57     */
58    XenbusStateConnected     = 4,
59
60    /*
61     * Closing: The device is being closed due to an error or an unplug event.
62     */
63    XenbusStateClosing       = 5,
64
65    /*
66     * Closed: No connection exists between front and back end.
67     */
68    XenbusStateClosed        = 6,
69
70    /*
71     * Reconfiguring: The device is being reconfigured.
72     */
73    XenbusStateReconfiguring = 7,
74
75    XenbusStateReconfigured  = 8
76};
77typedef enum xenbus_state XenbusState;
78
79#endif /* _XEN_PUBLIC_IO_XENBUS_H */
80
81/*
82 * Local variables:
83 * mode: C
84 * c-set-style: "BSD"
85 * c-basic-offset: 4
86 * tab-width: 4
87 * indent-tabs-mode: nil
88 * End:
89 */
90