libintrovirt v0.57.4
IntroVirt introspection library
Loading...
Searching...
No Matches
TypeTable.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
21
22#include <cstdint>
23
24namespace introvirt {
25namespace windows {
26namespace nt {
27
35class TypeTable {
36 public:
43 virtual ObjectType normalize(uint32_t type) const = 0;
44
54 virtual ObjectType normalize(const guest_ptr<void>& address) const = 0;
55
62 virtual uint32_t native(ObjectType type) const = 0;
63
64 virtual ~TypeTable() = default;
65};
66
67} // namespace nt
68} // namespace windows
69} // namespace introvirt
Definition guest_ptr.hh:88
Class for managing NT object types.
Definition TypeTable.hh:35
virtual uint32_t native(ObjectType type) const =0
Convert a normalized ObjectType to it's native representation.
virtual ObjectType normalize(uint32_t type) const =0
Convert a native object type to our normalized representation.
virtual ObjectType normalize(const guest_ptr< void > &address) const =0
Get the type of object from the pointer to an OBJECT_TYPE.
Type-safe guest virtual address pointer and guest_ptr template.
ObjectType
Enum for Windows kernel object types.
Definition ObjectType.hh:31
Core IntroVirt classes.
Definition Cr0.hh:20