xref: /titanic_52/usr/src/uts/common/xen/public/io/xenbus.h (revision 349b53dd4e695e3d833b5380540385145b2d3ae8)
1843e1988Sjohnlev /*****************************************************************************
2843e1988Sjohnlev  * xenbus.h
3843e1988Sjohnlev  *
4843e1988Sjohnlev  * Xenbus protocol details.
5843e1988Sjohnlev  *
6843e1988Sjohnlev  * Permission is hereby granted, free of charge, to any person obtaining a copy
7843e1988Sjohnlev  * of this software and associated documentation files (the "Software"), to
8843e1988Sjohnlev  * deal in the Software without restriction, including without limitation the
9843e1988Sjohnlev  * rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
10843e1988Sjohnlev  * sell copies of the Software, and to permit persons to whom the Software is
11843e1988Sjohnlev  * furnished to do so, subject to the following conditions:
12843e1988Sjohnlev  *
13843e1988Sjohnlev  * The above copyright notice and this permission notice shall be included in
14843e1988Sjohnlev  * all copies or substantial portions of the Software.
15843e1988Sjohnlev  *
16843e1988Sjohnlev  * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
17843e1988Sjohnlev  * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
18843e1988Sjohnlev  * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
19843e1988Sjohnlev  * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
20843e1988Sjohnlev  * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
21843e1988Sjohnlev  * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
22843e1988Sjohnlev  * DEALINGS IN THE SOFTWARE.
23843e1988Sjohnlev  *
24843e1988Sjohnlev  * Copyright (C) 2005 XenSource Ltd.
25843e1988Sjohnlev  */
26843e1988Sjohnlev 
27843e1988Sjohnlev #ifndef _XEN_PUBLIC_IO_XENBUS_H
28843e1988Sjohnlev #define _XEN_PUBLIC_IO_XENBUS_H
29843e1988Sjohnlev 
30843e1988Sjohnlev /*
31843e1988Sjohnlev  * The state of either end of the Xenbus, i.e. the current communication
32843e1988Sjohnlev  * status of initialisation across the bus.  States here imply nothing about
33843e1988Sjohnlev  * the state of the connection between the driver and the kernel's device
34843e1988Sjohnlev  * layers.
35843e1988Sjohnlev  */
36843e1988Sjohnlev enum xenbus_state {
37843e1988Sjohnlev     XenbusStateUnknown       = 0,
38843e1988Sjohnlev 
39843e1988Sjohnlev     XenbusStateInitialising  = 1,
40843e1988Sjohnlev 
41843e1988Sjohnlev     /*
42843e1988Sjohnlev      * InitWait: Finished early initialisation but waiting for information
43843e1988Sjohnlev      * from the peer or hotplug scripts.
44843e1988Sjohnlev      */
45843e1988Sjohnlev     XenbusStateInitWait      = 2,
46843e1988Sjohnlev 
47843e1988Sjohnlev     /*
48843e1988Sjohnlev      * Initialised: Waiting for a connection from the peer.
49843e1988Sjohnlev      */
50843e1988Sjohnlev     XenbusStateInitialised   = 3,
51843e1988Sjohnlev 
52843e1988Sjohnlev     XenbusStateConnected     = 4,
53843e1988Sjohnlev 
54843e1988Sjohnlev     /*
55843e1988Sjohnlev      * Closing: The device is being closed due to an error or an unplug event.
56843e1988Sjohnlev      */
57843e1988Sjohnlev     XenbusStateClosing       = 5,
58843e1988Sjohnlev 
59*349b53ddSStuart Maybee     XenbusStateClosed        = 6,
60*349b53ddSStuart Maybee 
61*349b53ddSStuart Maybee     /*
62*349b53ddSStuart Maybee      * Reconfiguring: The device is being reconfigured.
63*349b53ddSStuart Maybee      */
64*349b53ddSStuart Maybee     XenbusStateReconfiguring = 7,
65*349b53ddSStuart Maybee 
66*349b53ddSStuart Maybee     XenbusStateReconfigured  = 8
67843e1988Sjohnlev };
68843e1988Sjohnlev typedef enum xenbus_state XenbusState;
69843e1988Sjohnlev 
70843e1988Sjohnlev #endif /* _XEN_PUBLIC_IO_XENBUS_H */
71843e1988Sjohnlev 
72843e1988Sjohnlev /*
73843e1988Sjohnlev  * Local variables:
74843e1988Sjohnlev  * mode: C
75843e1988Sjohnlev  * c-set-style: "BSD"
76843e1988Sjohnlev  * c-basic-offset: 4
77843e1988Sjohnlev  * tab-width: 4
78843e1988Sjohnlev  * indent-tabs-mode: nil
79843e1988Sjohnlev  * End:
80843e1988Sjohnlev  */
81