| 1 | /* $NetBSD: xenbus_comms.h,v 1.6 2011/09/20 00:12:25 jym Exp $ */ |
| 2 | /* |
| 3 | * Private include for xenbus communications. |
| 4 | * |
| 5 | * Copyright (C) 2005 Rusty Russell, IBM Corporation |
| 6 | * |
| 7 | * This file may be distributed separately from the Linux kernel, or |
| 8 | * incorporated into other software packages, subject to the following license: |
| 9 | * |
| 10 | * Permission is hereby granted, free of charge, to any person obtaining a copy |
| 11 | * of this source file (the "Software"), to deal in the Software without |
| 12 | * restriction, including without limitation the rights to use, copy, modify, |
| 13 | * merge, publish, distribute, sublicense, and/or sell copies of the Software, |
| 14 | * and to permit persons to whom the Software is furnished to do so, subject to |
| 15 | * the following conditions: |
| 16 | * |
| 17 | * The above copyright notice and this permission notice shall be included in |
| 18 | * all copies or substantial portions of the Software. |
| 19 | * |
| 20 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR |
| 21 | * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, |
| 22 | * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE |
| 23 | * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER |
| 24 | * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING |
| 25 | * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS |
| 26 | * IN THE SOFTWARE. |
| 27 | */ |
| 28 | |
| 29 | #ifndef _XENBUS_COMMS_H |
| 30 | #define _XENBUS_COMMS_H |
| 31 | |
| 32 | void xenbus_kernfs_init(void); |
| 33 | int xs_init(device_t dev); |
| 34 | int xb_init_comms(device_t dev); |
| 35 | void xb_suspend_comms(device_t dev); |
| 36 | void xb_resume_comms(device_t dev); |
| 37 | |
| 38 | /* Low level routines. */ |
| 39 | int xb_write(const void *data, unsigned len); |
| 40 | int xb_read(void *data, unsigned len); |
| 41 | int xs_input_avail(void); |
| 42 | |
| 43 | extern struct xenstore_domain_interface *xenstore_interface; |
| 44 | |
| 45 | #endif /* _XENBUS_COMMS_H */ |
| 46 | |
| 47 | /* |
| 48 | * Local variables: |
| 49 | * c-file-style: "linux" |
| 50 | * indent-tabs-mode: t |
| 51 | * c-indent-level: 8 |
| 52 | * c-basic-offset: 8 |
| 53 | * tab-width: 8 |
| 54 | * End: |
| 55 | */ |
| 56 | |