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 
28 {
29 public:
30 
31  using module_len_type = size_t;
32  using module_data_type = const char *;
38  using handle_type = int;
39 
40  ioctl_private();
41  ~ioctl_private() override;
42 
43  virtual void open();
45  virtual void call_ioctl_add_module(gsl::not_null<module_data_type> data);
46  virtual void call_ioctl_load_vmm();
47  virtual void call_ioctl_unload_vmm();
48  virtual void call_ioctl_start_vmm();
49  virtual void call_ioctl_stop_vmm();
50  virtual void call_ioctl_dump_vmm(gsl::not_null<drr_pointer> drr, vcpuid_type vcpuid);
51  virtual void call_ioctl_vmm_status(gsl::not_null<status_pointer> status);
52  virtual void call_ioctl_vmcall(gsl::not_null<registers_pointer> regs, cpuid_type cpuid);
53 
54 private:
55 
56  handle_type fd;
57 };
58 
59 #endif
ioctl::status_pointer status_pointer
Definition: ioctl_private.h:36
uint64_t vcpuid_type
Definition: ioctl.h:56
virtual void call_ioctl_stop_vmm()
virtual void call_ioctl_load_vmm()
registers_type * registers_pointer
Definition: ioctl.h:60
int64_t unsigned long void * data
const char * module_data_type
Definition: ioctl_private.h:32
virtual void call_ioctl_add_module_length(module_len_type len)
status_type * status_pointer
Definition: ioctl.h:58
Definition: vcpuid.h:29
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)
drr_type * drr_pointer
Definition: ioctl.h:54
~ioctl_private() override
virtual void call_ioctl_vmcall(gsl::not_null< registers_pointer > regs, cpuid_type cpuid)
virtual void call_ioctl_add_module(gsl::not_null< module_data_type > data)
size_t module_len_type
Definition: ioctl_private.h:31
ioctl::vcpuid_type vcpuid_type
Definition: ioctl_private.h:35
virtual void open()
ioctl::cpuid_type cpuid_type
Definition: ioctl_private.h:34
virtual void call_ioctl_unload_vmm()
uint64_t cpuid_type
Definition: ioctl.h:55