libintrovirt v0.57.4
IntroVirt introspection library
Loading...
Searching...
No Matches
KEY_VALUE_INFORMATION.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
21
23#include <introvirt/util/json/json.hh>
25
26#include <cstdint>
27#include <string>
28
29namespace introvirt {
30namespace windows {
31namespace nt {
32
38 public:
44 virtual uint32_t TitleIndex() const = 0;
45
51 virtual void TitleIndex(uint32_t TitleIndex) = 0;
52
58 virtual REG_TYPE Type() const = 0;
59
65 virtual void Type(REG_TYPE Type) = 0;
66
75 virtual const std::string& Name() const = 0;
76
85 virtual KEY_VALUE* Data() = 0;
86
90 virtual const KEY_VALUE* Data() const = 0;
91
98
104 virtual guest_ptr<void> ptr() const = 0;
105
111 virtual uint32_t buffer_size() const = 0;
112
118 virtual void write(std::ostream& os, const std::string& linePrefix = "") const = 0;
119
125 virtual Json::Value json() const = 0;
126
135 static std::unique_ptr<KEY_VALUE_INFORMATION>
136 make_unique(const NtKernel& kernel, KEY_VALUE_INFORMATION_CLASS information_class,
137 const guest_ptr<void>& ptr, uint32_t buffer_size);
138
139 virtual ~KEY_VALUE_INFORMATION() = default;
140};
141
142} // namespace nt
143} // namespace windows
144} // namespace introvirt
Definition guest_ptr.hh:88
An abstract class reprseneting a more specific key information buffer.
Definition KEY_VALUE_INFORMATION.hh:37
virtual KEY_VALUE * Data()=0
Get the "Data" value if present.
virtual uint32_t TitleIndex() const =0
Get the TitleIndex parameter.
virtual Json::Value json() const =0
Return the file system information class as a JSON representation.
virtual guest_ptr< void > ptr() const =0
Get the address that the buffer is at.
virtual KEY_VALUE_INFORMATION_CLASS KeyValueInformationClass() const =0
Get the type of key value information held in the buffer.
static std::unique_ptr< KEY_VALUE_INFORMATION > make_unique(const NtKernel &kernel, KEY_VALUE_INFORMATION_CLASS information_class, const guest_ptr< void > &ptr, uint32_t buffer_size)
Create a KEY_VALUE_INFORMATION parser instance.
virtual const KEY_VALUE * Data() const =0
Get the "Data" value if present.
virtual uint32_t buffer_size() const =0
Get the size of the buffer.
virtual void TitleIndex(uint32_t TitleIndex)=0
Set the TitleIndex parameter.
virtual void write(std::ostream &os, const std::string &linePrefix="") const =0
Write a description to the ostream.
virtual const std::string & Name() const =0
Get the "Name" value if present.
virtual void Type(REG_TYPE Type)=0
Set the type of key value data.
virtual REG_TYPE Type() const =0
Get the type of key value data.
Definition KEY_VALUE.hh:33
Abstraction for the Windows NT kernel.
Definition NtKernel.hh:37
Type-safe guest virtual address pointer and guest_ptr template.
KEY_VALUE_INFORMATION_CLASS
Definition KEY_VALUE_INFORMATION_CLASS.hh:25
REG_TYPE
Definition REG_TYPE.hh:25
Core IntroVirt classes.
Definition Cr0.hh:20