ioctl_private.h
Go to the documentation of this file.
1 //
2 // Bareflank Hypervisor
3 //
4 // Copyright (C) 2015 Assured Information Security, Inc.
5 // Author: Rian Quinn <quinnr@ainfosec.com>
6 // Author: Brendan Kerrigan <kerriganb@ainfosec.com>
7 //
8 // This library is free software; you can redistribute it and/or
9 // modify it under the terms of the GNU Lesser General Public
10 // License as published by the Free Software Foundation; either
11 // version 2.1 of the License, or (at your option) any later version.
12 //
13 // This library is distributed in the hope that it will be useful,
14 // but WITHOUT ANY WARRANTY; without even the implied warranty of
15 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
16 // Lesser General Public License for more details.
17 //
18 // You should have received a copy of the GNU Lesser General Public
19 // License along with this library; if not, write to the Free Software
20 // Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
21 
22 #ifndef IOCTL_PRIVATE_H
23 #define IOCTL_PRIVATE_H
24 
25 #include <ioctl.h>
26 #include <IOKit/IOKitLib.h>
27 
28 class ioctl_private : public ioctl_private_base
29 {
30 public:
31  ioctl_private();
32  ~ioctl_private() override;
33 
34  virtual void open();
35  virtual void call_ioctl_add_module_length(int64_t len);
36  virtual void call_ioctl_add_module(const char *data);
37  virtual void call_ioctl_load_vmm();
38  virtual void call_ioctl_unload_vmm();
39  virtual void call_ioctl_start_vmm();
40  virtual void call_ioctl_stop_vmm();
42  virtual void call_ioctl_vmm_status(int64_t *status);
43 
44 private:
45  virtual int64_t bf_write_ioctl(int fd, uint32_t cmd, void *arg);
46  virtual int64_t bf_read_ioctl(int fd, uint32_t cmd, void *arg);
47  virtual int64_t bf_send_ioctl(int fd, uint32_t cmd);
48 
49  virtual void ioctl_write(bf_ioctl_t *in, bf_ioctl_t *out);
50  virtual void ioctl_read(bf_ioctl_t *in, bf_ioctl_t *out);
51 
52  io_connect_t m_connect;
53 };
54 
55 #endif
virtual void call_ioctl_stop_vmm()
virtual void call_ioctl_load_vmm()
int64_t unsigned long void * data
virtual void call_ioctl_add_module_length(module_len_type len)
virtual void call_ioctl_vmm_status(gsl::not_null< status_pointer > status)
debug_ring_resources_t * drr
virtual void call_ioctl_start_vmm()
virtual void call_ioctl_dump_vmm(gsl::not_null< drr_pointer > drr, vcpuid_type vcpuid)
~ioctl_private() override
virtual void call_ioctl_add_module(gsl::not_null< module_data_type > data)
virtual void open()
virtual void call_ioctl_unload_vmm()