1*8ac98aedSDavid Woodhouse /* SPDX-License-Identifier: MIT */ 2a3434a2dSAnthony PERARD /***************************************************************************** 3a3434a2dSAnthony PERARD * xenbus.h 4a3434a2dSAnthony PERARD * 5a3434a2dSAnthony PERARD * Xenbus protocol details. 6a3434a2dSAnthony PERARD * 7a3434a2dSAnthony PERARD * Copyright (C) 2005 XenSource Ltd. 8a3434a2dSAnthony PERARD */ 9a3434a2dSAnthony PERARD 10a3434a2dSAnthony PERARD #ifndef _XEN_PUBLIC_IO_XENBUS_H 11a3434a2dSAnthony PERARD #define _XEN_PUBLIC_IO_XENBUS_H 12a3434a2dSAnthony PERARD 13a3434a2dSAnthony PERARD /* 14a3434a2dSAnthony PERARD * The state of either end of the Xenbus, i.e. the current communication 15a3434a2dSAnthony PERARD * status of initialisation across the bus. States here imply nothing about 16a3434a2dSAnthony PERARD * the state of the connection between the driver and the kernel's device 17a3434a2dSAnthony PERARD * layers. 18a3434a2dSAnthony PERARD */ 19a3434a2dSAnthony PERARD enum xenbus_state { 20a3434a2dSAnthony PERARD XenbusStateUnknown = 0, 21a3434a2dSAnthony PERARD 22a3434a2dSAnthony PERARD XenbusStateInitialising = 1, 23a3434a2dSAnthony PERARD 24a3434a2dSAnthony PERARD /* 25a3434a2dSAnthony PERARD * InitWait: Finished early initialisation but waiting for information 26a3434a2dSAnthony PERARD * from the peer or hotplug scripts. 27a3434a2dSAnthony PERARD */ 28a3434a2dSAnthony PERARD XenbusStateInitWait = 2, 29a3434a2dSAnthony PERARD 30a3434a2dSAnthony PERARD /* 31a3434a2dSAnthony PERARD * Initialised: Waiting for a connection from the peer. 32a3434a2dSAnthony PERARD */ 33a3434a2dSAnthony PERARD XenbusStateInitialised = 3, 34a3434a2dSAnthony PERARD 35a3434a2dSAnthony PERARD XenbusStateConnected = 4, 36a3434a2dSAnthony PERARD 37a3434a2dSAnthony PERARD /* 38a3434a2dSAnthony PERARD * Closing: The device is being closed due to an error or an unplug event. 39a3434a2dSAnthony PERARD */ 40a3434a2dSAnthony PERARD XenbusStateClosing = 5, 41a3434a2dSAnthony PERARD 42a3434a2dSAnthony PERARD XenbusStateClosed = 6, 43a3434a2dSAnthony PERARD 44a3434a2dSAnthony PERARD /* 45a3434a2dSAnthony PERARD * Reconfiguring: The device is being reconfigured. 46a3434a2dSAnthony PERARD */ 47a3434a2dSAnthony PERARD XenbusStateReconfiguring = 7, 48a3434a2dSAnthony PERARD 49a3434a2dSAnthony PERARD XenbusStateReconfigured = 8 50a3434a2dSAnthony PERARD }; 51a3434a2dSAnthony PERARD typedef enum xenbus_state XenbusState; 52a3434a2dSAnthony PERARD 53a3434a2dSAnthony PERARD #endif /* _XEN_PUBLIC_IO_XENBUS_H */ 5450c88402SJoao Martins 5550c88402SJoao Martins /* 5650c88402SJoao Martins * Local variables: 5750c88402SJoao Martins * mode: C 5850c88402SJoao Martins * c-file-style: "BSD" 5950c88402SJoao Martins * c-basic-offset: 4 6050c88402SJoao Martins * tab-width: 4 6150c88402SJoao Martins * indent-tabs-mode: nil 6250c88402SJoao Martins * End: 6350c88402SJoao Martins */ 64