xref: /netbsd-src/sys/arch/xen/xenbus/xenbus_comms.h (revision 92b2c35b566efe87639ab98b8357a27b5a39f250)
1 /* $NetBSD: xenbus_comms.h,v 1.8 2020/05/13 13:19:38 jdolecek 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);
34 int xb_init_comms(device_t);
35 void xb_suspend_comms(device_t);
36 int xb_resume_comms(device_t);
37 
38 void xb_xenstored_make_ready(void);
39 
40 /* Low level routines. */
41 int xb_write(const void *data, unsigned len);
42 int xb_read(void *data, unsigned len);
43 int xs_input_avail(void);
44 
45 extern struct xenstore_domain_interface *xenstore_interface;
46 
47 extern int xenstored_ready;
48 
49 #endif /* _XENBUS_COMMS_H */
50 
51 /*
52  * Local variables:
53  *  c-file-style: "linux"
54  *  indent-tabs-mode: t
55  *  c-indent-level: 8
56  *  c-basic-offset: 8
57  *  tab-width: 8
58  * End:
59  */
60