1181624Skmacy/***************************************************************************** 2181624Skmacy * xenbus.h 3181624Skmacy * 4181624Skmacy * Xenbus protocol details. 5181624Skmacy * 6181624Skmacy * Permission is hereby granted, free of charge, to any person obtaining a copy 7181624Skmacy * of this software and associated documentation files (the "Software"), to 8181624Skmacy * deal in the Software without restriction, including without limitation the 9181624Skmacy * rights to use, copy, modify, merge, publish, distribute, sublicense, and/or 10181624Skmacy * sell copies of the Software, and to permit persons to whom the Software is 11181624Skmacy * furnished to do so, subject to the following conditions: 12181624Skmacy * 13181624Skmacy * The above copyright notice and this permission notice shall be included in 14181624Skmacy * all copies or substantial portions of the Software. 15181624Skmacy * 16181624Skmacy * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 17181624Skmacy * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 18181624Skmacy * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 19181624Skmacy * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 20181624Skmacy * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING 21181624Skmacy * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER 22181624Skmacy * DEALINGS IN THE SOFTWARE. 23181624Skmacy * 24181624Skmacy * Copyright (C) 2005 XenSource Ltd. 25181624Skmacy */ 26181624Skmacy 27181624Skmacy#ifndef _XEN_PUBLIC_IO_XENBUS_H 28181624Skmacy#define _XEN_PUBLIC_IO_XENBUS_H 29181624Skmacy 30181624Skmacy/* 31181624Skmacy * The state of either end of the Xenbus, i.e. the current communication 32181624Skmacy * status of initialisation across the bus. States here imply nothing about 33181624Skmacy * the state of the connection between the driver and the kernel's device 34181624Skmacy * layers. 35181624Skmacy */ 36181624Skmacyenum xenbus_state { 37181624Skmacy XenbusStateUnknown = 0, 38181624Skmacy 39214077Sgibbs /* 40214077Sgibbs * Initializing: Back-end is initializing. 41214077Sgibbs */ 42181624Skmacy XenbusStateInitialising = 1, 43181624Skmacy 44181624Skmacy /* 45181624Skmacy * InitWait: Finished early initialisation but waiting for information 46181624Skmacy * from the peer or hotplug scripts. 47181624Skmacy */ 48181624Skmacy XenbusStateInitWait = 2, 49181624Skmacy 50181624Skmacy /* 51181624Skmacy * Initialised: Waiting for a connection from the peer. 52181624Skmacy */ 53181624Skmacy XenbusStateInitialised = 3, 54181624Skmacy 55214077Sgibbs /* 56214077Sgibbs * Connected: The normal state for a front to backend connection. 57214077Sgibbs */ 58181624Skmacy XenbusStateConnected = 4, 59181624Skmacy 60181624Skmacy /* 61181624Skmacy * Closing: The device is being closed due to an error or an unplug event. 62181624Skmacy */ 63181624Skmacy XenbusStateClosing = 5, 64181624Skmacy 65214077Sgibbs /* 66214077Sgibbs * Closed: No connection exists between front and back end. 67222975Sgibbs * 68222975Sgibbs * For backend devices with the "online" attribute, the front can 69222975Sgibbs * request a reconnect at any time. To handle this transition 70222975Sgibbs * gracefully, backend devices must reinitialize any XenStore data 71222975Sgibbs * used to negotiate features with a peer before transitioning to 72222975Sgibbs * the closed state. When a reconnect request occurs, the 73222975Sgibbs * XenBus backend support code will automatically transition the 74222975Sgibbs * backend device from Closed to InitWait, kicking off the ring 75222975Sgibbs * and feature negotiation process. 76214077Sgibbs */ 77183375Skmacy XenbusStateClosed = 6, 78183375Skmacy 79183375Skmacy /* 80183375Skmacy * Reconfiguring: The device is being reconfigured. 81183375Skmacy */ 82183375Skmacy XenbusStateReconfiguring = 7, 83183375Skmacy 84183375Skmacy XenbusStateReconfigured = 8 85181624Skmacy}; 86181624Skmacytypedef enum xenbus_state XenbusState; 87181624Skmacy 88181624Skmacy#endif /* _XEN_PUBLIC_IO_XENBUS_H */ 89181624Skmacy 90181624Skmacy/* 91181624Skmacy * Local variables: 92181624Skmacy * mode: C 93181624Skmacy * c-set-style: "BSD" 94181624Skmacy * c-basic-offset: 4 95181624Skmacy * tab-width: 4 96181624Skmacy * indent-tabs-mode: nil 97181624Skmacy * End: 98181624Skmacy */ 99