xref: /freebsd/sys/contrib/xen/io/xenbus.h (revision 3a9fd8242b35884921dfc4e886f284a75870a536)
1*3a9fd824SRoger Pau Monné /*****************************************************************************
2*3a9fd824SRoger Pau Monné  * xenbus.h
3*3a9fd824SRoger Pau Monné  *
4*3a9fd824SRoger Pau Monné  * Xenbus protocol details.
5*3a9fd824SRoger Pau Monné  *
6*3a9fd824SRoger Pau Monné  * Permission is hereby granted, free of charge, to any person obtaining a copy
7*3a9fd824SRoger Pau Monné  * of this software and associated documentation files (the "Software"), to
8*3a9fd824SRoger Pau Monné  * deal in the Software without restriction, including without limitation the
9*3a9fd824SRoger Pau Monné  * rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
10*3a9fd824SRoger Pau Monné  * sell copies of the Software, and to permit persons to whom the Software is
11*3a9fd824SRoger Pau Monné  * furnished to do so, subject to the following conditions:
12*3a9fd824SRoger Pau Monné  *
13*3a9fd824SRoger Pau Monné  * The above copyright notice and this permission notice shall be included in
14*3a9fd824SRoger Pau Monné  * all copies or substantial portions of the Software.
15*3a9fd824SRoger Pau Monné  *
16*3a9fd824SRoger Pau Monné  * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
17*3a9fd824SRoger Pau Monné  * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
18*3a9fd824SRoger Pau Monné  * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
19*3a9fd824SRoger Pau Monné  * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
20*3a9fd824SRoger Pau Monné  * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
21*3a9fd824SRoger Pau Monné  * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
22*3a9fd824SRoger Pau Monné  * DEALINGS IN THE SOFTWARE.
23*3a9fd824SRoger Pau Monné  *
24*3a9fd824SRoger Pau Monné  * Copyright (C) 2005 XenSource Ltd.
25*3a9fd824SRoger Pau Monné  */
26*3a9fd824SRoger Pau Monné 
27*3a9fd824SRoger Pau Monné #ifndef _XEN_PUBLIC_IO_XENBUS_H
28*3a9fd824SRoger Pau Monné #define _XEN_PUBLIC_IO_XENBUS_H
29*3a9fd824SRoger Pau Monné 
30*3a9fd824SRoger Pau Monné /*
31*3a9fd824SRoger Pau Monné  * The state of either end of the Xenbus, i.e. the current communication
32*3a9fd824SRoger Pau Monné  * status of initialisation across the bus.  States here imply nothing about
33*3a9fd824SRoger Pau Monné  * the state of the connection between the driver and the kernel's device
34*3a9fd824SRoger Pau Monné  * layers.
35*3a9fd824SRoger Pau Monné  */
36*3a9fd824SRoger Pau Monné enum xenbus_state {
37*3a9fd824SRoger Pau Monné     XenbusStateUnknown       = 0,
38*3a9fd824SRoger Pau Monné 
39*3a9fd824SRoger Pau Monné     XenbusStateInitialising  = 1,
40*3a9fd824SRoger Pau Monné 
41*3a9fd824SRoger Pau Monné     /*
42*3a9fd824SRoger Pau Monné      * InitWait: Finished early initialisation but waiting for information
43*3a9fd824SRoger Pau Monné      * from the peer or hotplug scripts.
44*3a9fd824SRoger Pau Monné      */
45*3a9fd824SRoger Pau Monné     XenbusStateInitWait      = 2,
46*3a9fd824SRoger Pau Monné 
47*3a9fd824SRoger Pau Monné     /*
48*3a9fd824SRoger Pau Monné      * Initialised: Waiting for a connection from the peer.
49*3a9fd824SRoger Pau Monné      */
50*3a9fd824SRoger Pau Monné     XenbusStateInitialised   = 3,
51*3a9fd824SRoger Pau Monné 
52*3a9fd824SRoger Pau Monné     XenbusStateConnected     = 4,
53*3a9fd824SRoger Pau Monné 
54*3a9fd824SRoger Pau Monné     /*
55*3a9fd824SRoger Pau Monné      * Closing: The device is being closed due to an error or an unplug event.
56*3a9fd824SRoger Pau Monné      */
57*3a9fd824SRoger Pau Monné     XenbusStateClosing       = 5,
58*3a9fd824SRoger Pau Monné 
59*3a9fd824SRoger Pau Monné     XenbusStateClosed        = 6,
60*3a9fd824SRoger Pau Monné 
61*3a9fd824SRoger Pau Monné     /*
62*3a9fd824SRoger Pau Monné      * Reconfiguring: The device is being reconfigured.
63*3a9fd824SRoger Pau Monné      */
64*3a9fd824SRoger Pau Monné     XenbusStateReconfiguring = 7,
65*3a9fd824SRoger Pau Monné 
66*3a9fd824SRoger Pau Monné     XenbusStateReconfigured  = 8
67*3a9fd824SRoger Pau Monné };
68*3a9fd824SRoger Pau Monné typedef enum xenbus_state XenbusState;
69*3a9fd824SRoger Pau Monné 
70*3a9fd824SRoger Pau Monné #endif /* _XEN_PUBLIC_IO_XENBUS_H */
71*3a9fd824SRoger Pau Monné 
72*3a9fd824SRoger Pau Monné /*
73*3a9fd824SRoger Pau Monné  * Local variables:
74*3a9fd824SRoger Pau Monné  * mode: C
75*3a9fd824SRoger Pau Monné  * c-file-style: "BSD"
76*3a9fd824SRoger Pau Monné  * c-basic-offset: 4
77*3a9fd824SRoger Pau Monné  * tab-width: 4
78*3a9fd824SRoger Pau Monné  * indent-tabs-mode: nil
79*3a9fd824SRoger Pau Monné  * End:
80*3a9fd824SRoger Pau Monné  */
81