libintrovirt v0.57.4
IntroVirt introspection library
Loading...
Searching...
No Matches
HOSTENT.hh
Go to the documentation of this file.
1/*
2 * Copyright 2021 Assured Information Security, Inc.
3 *
4 * Licensed under the Apache License, Version 2.0 (the "License");
5 * you may not use this file except in compliance with the License.
6 * You may obtain a copy of the License at
7 *
8 * http://www.apache.org/licenses/LICENSE-2.0
9 *
10 * Unless required by applicable law or agreed to in writing, software
11 * distributed under the License is distributed on an "AS IS" BASIS,
12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 * See the License for the specific language governing permissions and
14 * limitations under the License.
15 */
16#pragma once
17
19
20#include <cstdint>
21#include <memory>
22
23namespace introvirt {
24namespace windows {
25namespace ws2_32 {
26
31class HOSTENT {
32 public:
33 // Direct structure members
34 virtual guest_ptr<char[]> ph_name() const = 0;
35 virtual void ph_name(const guest_ptr<char[]>& ptr) = 0;
36
38 virtual void ph_aliases(const guest_ptr<char*, guest_ptr_t>& ptr) = 0;
39
40 virtual uint16_t h_addrtype() const = 0;
41 virtual void h_addrtype(uint16_t h_addrtype) = 0;
42
43 virtual uint16_t h_length() const = 0;
44 virtual void h_length(uint16_t h_length) = 0;
45
47 virtual void ph_addr_list(const guest_ptr<uint8_t*, guest_ptr_t>& ptr) = 0;
48
49 // Helpers
50 virtual std::vector<guest_ptr<char[]>> h_aliases() const = 0;
51
55 static std::shared_ptr<HOSTENT> make_shared(const guest_ptr<void>& ptr, bool x64);
56
61 static size_t size(bool x64);
62
70 static size_t size(const Vcpu& vcpu);
71
72 virtual ~HOSTENT() = default;
73};
74
75} // namespace ws2_32
76} // namespace windows
77} // namespace introvirt
A class representing a single virtual processor.
Definition Vcpu.hh:33
Definition guest_ptr.hh:88
Definition HOSTENT.hh:31
virtual uint16_t h_length() const =0
static std::shared_ptr< HOSTENT > make_shared(const guest_ptr< void > &ptr, bool x64)
Create a HOSTENT.
virtual std::vector< guest_ptr< char[]> > h_aliases() const =0
virtual void ph_addr_list(const guest_ptr< uint8_t *, guest_ptr_t > &ptr)=0
virtual void ph_name(const guest_ptr< char[]> &ptr)=0
static size_t size(bool x64)
Get the size of the structure.
virtual guest_ptr< char *, guest_ptr_t > ph_aliases() const =0
virtual void h_addrtype(uint16_t h_addrtype)=0
virtual guest_ptr< char[]> ph_name() const =0
virtual guest_ptr< uint8_t *, guest_ptr_t > ph_addr_list() const =0
static size_t size(const Vcpu &vcpu)
Get the size of the structure.
virtual void h_length(uint16_t h_length)=0
virtual void ph_aliases(const guest_ptr< char *, guest_ptr_t > &ptr)=0
virtual uint16_t h_addrtype() const =0
Type-safe guest virtual address pointer and guest_ptr template.
Core IntroVirt classes.
Definition Cr0.hh:20