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
22struct monitor_lmp_binding;
23
24/// Handlers for incoming/outgoing capabilities on the monitor binding
25struct 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 */
32typedef void monitor_bind_cont_fn(void *st, errval_t err,
33                                  struct monitor_binding *_binding);
34
35errval_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
39errval_t monitor_client_lmp_accept(struct monitor_lmp_binding *mcb,
40                                   struct waitset *ws, size_t lmp_buflen_words);
41
42errval_t monitor_client_new_binding(monitor_bind_cont_fn *cont, void *st,
43                                    struct waitset *ws, size_t lmp_buflen_words);
44
45
46errval_t monitor_client_blocking_rpc_init(void);
47
48errval_t monitor_cap_set_remote(struct capref cap, bool remote);
49
50errval_t monitor_debug_print_cababilities(void);
51
52errval_t monitor_cap_identify_remote(struct capref cap, struct capability *ret);
53
54__END_DECLS
55
56#endif // BARRELFISH_MONITOR_CLIENT_H
57