T119: implement syscall and monitor interface to debug_print_capabilities
[barrelfish] / include / barrelfish / monitor_client.h
1 /**
2  * \file
3  * \brief Client for interacting with the monitor
4  */
5
6 /*
7  * Copyright (c) 2010, 2011, ETH Zurich.
8  * All rights reserved.
9  *
10  * This file is distributed under the terms in the attached LICENSE file.
11  * If you do not find this file, copies can be found by writing to:
12  * ETH Zurich D-INFK, Haldeneggsteig 4, CH-8092 Zurich. Attn: Systems Group.
13  */
14
15 #ifndef BARRELFISH_MONITOR_CLIENT_H
16 #define BARRELFISH_MONITOR_CLIENT_H
17
18 #include <sys/cdefs.h>
19
20 __BEGIN_DECLS
21
22 struct monitor_lmp_binding;
23
24 /// Handlers for incoming/outgoing capabilities on the monitor binding
25 struct monitor_cap_handlers {
26     void *st; ///< state pointer passed to handler functions
27     void (*cap_receive_handler)(void *st, errval_t success, struct capref cap,
28                                 uint32_t capid);
29 };
30
31 /* XXX: duplicate of monitor_bind_continuation_fn in generated code */
32 typedef void monitor_bind_cont_fn(void *st, errval_t err,
33                                   struct monitor_binding *_binding);
34
35 errval_t monitor_client_lmp_bind(struct monitor_lmp_binding *mcb,
36                                  monitor_bind_cont_fn *cont, void *st,
37                                  struct waitset *ws, size_t lmp_buflen_words);
38
39 errval_t monitor_client_lmp_accept(struct monitor_lmp_binding *mcb,
40                                    struct waitset *ws, size_t lmp_buflen_words);
41
42 errval_t monitor_client_new_binding(monitor_bind_cont_fn *cont, void *st,
43                                     struct waitset *ws, size_t lmp_buflen_words);
44
45
46 errval_t monitor_client_blocking_rpc_init(void);
47
48 errval_t monitor_cap_set_remote(struct capref cap, bool remote);
49
50 errval_t monitor_debug_print_cababilities(void);
51
52 __END_DECLS
53
54 #endif // BARRELFISH_MONITOR_CLIENT_H