xref: /freebsd/sys/contrib/xen/io/xenbus.h (revision 3a9fd824)
13a9fd824SRoger Pau Monné /*****************************************************************************
23a9fd824SRoger Pau Monné  * xenbus.h
33a9fd824SRoger Pau Monné  *
43a9fd824SRoger Pau Monné  * Xenbus protocol details.
53a9fd824SRoger Pau Monné  *
63a9fd824SRoger Pau Monné  * Permission is hereby granted, free of charge, to any person obtaining a copy
73a9fd824SRoger Pau Monné  * of this software and associated documentation files (the "Software"), to
83a9fd824SRoger Pau Monné  * deal in the Software without restriction, including without limitation the
93a9fd824SRoger Pau Monné  * rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
103a9fd824SRoger Pau Monné  * sell copies of the Software, and to permit persons to whom the Software is
113a9fd824SRoger Pau Monné  * furnished to do so, subject to the following conditions:
123a9fd824SRoger Pau Monné  *
133a9fd824SRoger Pau Monné  * The above copyright notice and this permission notice shall be included in
143a9fd824SRoger Pau Monné  * all copies or substantial portions of the Software.
153a9fd824SRoger Pau Monné  *
163a9fd824SRoger Pau Monné  * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
173a9fd824SRoger Pau Monné  * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
183a9fd824SRoger Pau Monné  * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
193a9fd824SRoger Pau Monné  * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
203a9fd824SRoger Pau Monné  * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
213a9fd824SRoger Pau Monné  * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
223a9fd824SRoger Pau Monné  * DEALINGS IN THE SOFTWARE.
233a9fd824SRoger Pau Monné  *
243a9fd824SRoger Pau Monné  * Copyright (C) 2005 XenSource Ltd.
253a9fd824SRoger Pau Monné  */
263a9fd824SRoger Pau Monné 
273a9fd824SRoger Pau Monné #ifndef _XEN_PUBLIC_IO_XENBUS_H
283a9fd824SRoger Pau Monné #define _XEN_PUBLIC_IO_XENBUS_H
293a9fd824SRoger Pau Monné 
303a9fd824SRoger Pau Monné /*
313a9fd824SRoger Pau Monné  * The state of either end of the Xenbus, i.e. the current communication
323a9fd824SRoger Pau Monné  * status of initialisation across the bus.  States here imply nothing about
333a9fd824SRoger Pau Monné  * the state of the connection between the driver and the kernel's device
343a9fd824SRoger Pau Monné  * layers.
353a9fd824SRoger Pau Monné  */
363a9fd824SRoger Pau Monné enum xenbus_state {
373a9fd824SRoger Pau Monné     XenbusStateUnknown       = 0,
383a9fd824SRoger Pau Monné 
393a9fd824SRoger Pau Monné     XenbusStateInitialising  = 1,
403a9fd824SRoger Pau Monné 
413a9fd824SRoger Pau Monné     /*
423a9fd824SRoger Pau Monné      * InitWait: Finished early initialisation but waiting for information
433a9fd824SRoger Pau Monné      * from the peer or hotplug scripts.
443a9fd824SRoger Pau Monné      */
453a9fd824SRoger Pau Monné     XenbusStateInitWait      = 2,
463a9fd824SRoger Pau Monné 
473a9fd824SRoger Pau Monné     /*
483a9fd824SRoger Pau Monné      * Initialised: Waiting for a connection from the peer.
493a9fd824SRoger Pau Monné      */
503a9fd824SRoger Pau Monné     XenbusStateInitialised   = 3,
513a9fd824SRoger Pau Monné 
523a9fd824SRoger Pau Monné     XenbusStateConnected     = 4,
533a9fd824SRoger Pau Monné 
543a9fd824SRoger Pau Monné     /*
553a9fd824SRoger Pau Monné      * Closing: The device is being closed due to an error or an unplug event.
563a9fd824SRoger Pau Monné      */
573a9fd824SRoger Pau Monné     XenbusStateClosing       = 5,
583a9fd824SRoger Pau Monné 
593a9fd824SRoger Pau Monné     XenbusStateClosed        = 6,
603a9fd824SRoger Pau Monné 
613a9fd824SRoger Pau Monné     /*
623a9fd824SRoger Pau Monné      * Reconfiguring: The device is being reconfigured.
633a9fd824SRoger Pau Monné      */
643a9fd824SRoger Pau Monné     XenbusStateReconfiguring = 7,
653a9fd824SRoger Pau Monné 
663a9fd824SRoger Pau Monné     XenbusStateReconfigured  = 8
673a9fd824SRoger Pau Monné };
683a9fd824SRoger Pau Monné typedef enum xenbus_state XenbusState;
693a9fd824SRoger Pau Monné 
703a9fd824SRoger Pau Monné #endif /* _XEN_PUBLIC_IO_XENBUS_H */
713a9fd824SRoger Pau Monné 
723a9fd824SRoger Pau Monné /*
733a9fd824SRoger Pau Monné  * Local variables:
743a9fd824SRoger Pau Monné  * mode: C
753a9fd824SRoger Pau Monné  * c-file-style: "BSD"
763a9fd824SRoger Pau Monné  * c-basic-offset: 4
773a9fd824SRoger Pau Monné  * tab-width: 4
783a9fd824SRoger Pau Monné  * indent-tabs-mode: nil
793a9fd824SRoger Pau Monné  * End:
803a9fd824SRoger Pau Monné  */
81