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