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 
24 // -----------------------------------------------------------------------------
25 // Unit Test Seems
26 // -----------------------------------------------------------------------------
27 
28 int
30 { return 0; }
31 
32 int64_t
33 __attribute__((weak)) bf_send_ioctl(int fd, unsigned long request)
34 {
35  (void) fd;
36  (void) request;
37 
38  return 0;
39 }
40 
41 int64_t
42 __attribute__((weak)) bf_read_ioctl(int fd, unsigned long request, void *data)
43 {
44  (void) fd;
45  (void) request;
46  (void) data;
47 
48  return 0;
49 }
50 
51 int64_t
52 __attribute__((weak)) bf_write_ioctl(int fd, unsigned long request, const void *data)
53 {
54  (void) fd;
55  (void) request;
56  (void) data;
57 
58  return 0;
59 }
60 
61 // -----------------------------------------------------------------------------
62 // Unit Test Seems
63 // -----------------------------------------------------------------------------
64 
66 { }
67 
68 void
70 { }
71 
72 void
73 ioctl::call_ioctl_add_module(const binary_data &module_data)
74 { (void) module_data; }
75 
76 void
78 { }
79 
80 void
82 { }
83 
84 void
86 { }
87 
88 void
90 { }
91 
92 void
93 ioctl::call_ioctl_dump_vmm(gsl::not_null<drr_pointer> drr, vcpuid_type vcpuid)
94 { (void) drr; (void) vcpuid; }
95 
96 void
97 ioctl::call_ioctl_vmm_status(gsl::not_null<status_pointer> status)
98 { (void) status; }
99 
100 void
101 ioctl::call_ioctl_vmcall(gsl::not_null<registers_pointer> regs, cpuid_type cpuid)
102 { (void) regs; (void) cpuid; }
int64_t bf_read_ioctl(int64_t fd, unsigned long request, void *data)
int64_t bf_ioctl_open()
virtual void call_ioctl_vmm_status(gsl::not_null< status_pointer > status)
Definition: ioctl.cpp:82
int64_t unsigned long request
Definition: ioctl.cpp:34
virtual void call_ioctl_start_vmm()
Definition: ioctl.cpp:61
int64_t unsigned long void * data
Definition: ioctl.cpp:43
ioctl()
Definition: ioctl.cpp:25
Definition: vcpuid.h:29
debug_ring_resources_t * drr
virtual void call_ioctl_stop_vmm()
Definition: ioctl.cpp:68
virtual void call_ioctl_unload_vmm()
Definition: ioctl.cpp:54
int64_t bf_write_ioctl(int64_t fd, unsigned long request, const void *data)
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
int __attribute__((weak)) bf_ioctl_open()
Definition: ioctl.cpp:29
int64_t bf_send_ioctl(int64_t fd, unsigned long request)
virtual void call_ioctl_vmcall(gsl::not_null< registers_pointer > regs, cpuid_type cpuid)
Definition: ioctl.cpp:89
virtual void call_ioctl_add_module(const binary_data &module_data)
Definition: ioctl.cpp:37