ioctl.cpp
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 #include <ioctl.h>
23 #include <ioctl_private.h>
24 
26 {
27  m_d = std::make_shared<ioctl_private>();
28 }
29 
30 void
32 {
33  auto d = std::dynamic_pointer_cast<ioctl_private>(m_d);
34 
35  if (d)
36  d->open();
37 }
38 
39 void
41 {
42  auto d = std::dynamic_pointer_cast<ioctl_private>(m_d);
43 
44  if (d)
45  {
46  d->call_ioctl_add_module_length(str.length());
47  d->call_ioctl_add_module(str.c_str());
48  }
49 }
50 
51 void
53 {
54  auto d = std::dynamic_pointer_cast<ioctl_private>(m_d);
55 
56  if (d)
58 }
59 
60 void
62 {
63  auto d = std::dynamic_pointer_cast<ioctl_private>(m_d);
64 
65  if (d)
67 }
68 
69 void
71 {
72  auto d = std::dynamic_pointer_cast<ioctl_private>(m_d);
73 
74  if (d)
76 }
77 
78 void
80 {
81  auto d = std::dynamic_pointer_cast<ioctl_private>(m_d);
82 
83  if (d)
85 }
86 
87 void
89 {
90  auto d = std::dynamic_pointer_cast<ioctl_private>(m_d);
91 
92  if (d)
93  d->call_ioctl_dump_vmm(drr);
94 }
95 
96 void
98 {
99  auto d = std::dynamic_pointer_cast<ioctl_private>(m_d);
100 
101  if (d)
102  d->call_ioctl_vmm_status(status);
103 }
virtual void call_ioctl_stop_vmm()
virtual void call_ioctl_load_vmm()
virtual void call_ioctl_vmm_status(gsl::not_null< status_pointer > status)
Definition: ioctl.cpp:82
virtual void call_ioctl_start_vmm()
Definition: ioctl.cpp:61
virtual void call_ioctl_add_module_length(module_len_type len)
ioctl()
Definition: ioctl.cpp:25
virtual void call_ioctl_vmm_status(gsl::not_null< status_pointer > status)
debug_ring_resources_t * drr
virtual void call_ioctl_stop_vmm()
Definition: ioctl.cpp:68
virtual void call_ioctl_start_vmm()
void uint64_t uint64_t uint64_t *rdx noexcept
virtual void call_ioctl_dump_vmm(gsl::not_null< drr_pointer > drr, vcpuid_type vcpuid)
virtual void call_ioctl_unload_vmm()
Definition: ioctl.cpp:54
virtual void call_ioctl_dump_vmm(gsl::not_null< drr_pointer > drr, vcpuid_type vcpuid)
Definition: ioctl.cpp:75
virtual void call_ioctl_load_vmm()
Definition: ioctl.cpp:47
virtual void open()
Definition: ioctl.cpp:30
virtual void open()
virtual void call_ioctl_unload_vmm()
virtual void call_ioctl_add_module(const binary_data &module_data)
Definition: ioctl.cpp:37