1
2
3
4#ifndef __VBOX_UTILS_H__
5#define __VBOX_UTILS_H__
6
7#include <linux/printk.h>
8#include <linux/vbox_vmmdev_types.h>
9
10struct vbg_dev;
11
12
13
14
15
16__printf(1, 2) void vbg_info(const char *fmt, ...);
17__printf(1, 2) void vbg_warn(const char *fmt, ...);
18__printf(1, 2) void vbg_err(const char *fmt, ...);
19__printf(1, 2) void vbg_err_ratelimited(const char *fmt, ...);
20
21
22#if defined(DEBUG) && !defined(CONFIG_DYNAMIC_DEBUG)
23__printf(1, 2) void vbg_debug(const char *fmt, ...);
24#else
25#define vbg_debug pr_debug
26#endif
27
28int vbg_hgcm_connect(struct vbg_dev *gdev, u32 requestor,
29 struct vmmdev_hgcm_service_location *loc,
30 u32 *client_id, int *vbox_status);
31
32int vbg_hgcm_disconnect(struct vbg_dev *gdev, u32 requestor,
33 u32 client_id, int *vbox_status);
34
35int vbg_hgcm_call(struct vbg_dev *gdev, u32 requestor, u32 client_id,
36 u32 function, u32 timeout_ms,
37 struct vmmdev_hgcm_function_parameter *parms, u32 parm_count,
38 int *vbox_status);
39
40
41
42
43
44
45int vbg_status_code_to_errno(int rc);
46
47
48
49
50
51struct vbg_dev *vbg_get_gdev(void);
52
53
54
55
56
57void vbg_put_gdev(struct vbg_dev *gdev);
58
59#endif
60