libintrovirt v0.57.4
IntroVirt introspection library
Loading...
Searching...
No Matches
FILE_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#include <introvirt/fwd.hh>
22#include <introvirt/util/json/json.hh>
24
25#include <cstdint>
26#include <memory>
27#include <ostream>
28#include <string>
29
30namespace introvirt {
31namespace windows {
32namespace nt {
33
39 public:
46
52 virtual guest_ptr<void> ptr() const = 0;
53
59 virtual uint32_t buffer_size() const = 0;
60
66 virtual void write(std::ostream& os, const std::string& linePrefix = "") const = 0;
67
73 virtual Json::Value json() const = 0;
74
83 static std::unique_ptr<FILE_INFORMATION> make_unique(const NtKernel& kernel,
84 FILE_INFORMATION_CLASS information_class,
85 const guest_ptr<void>& ptr,
86 uint32_t buffer_size);
87
88 virtual ~FILE_INFORMATION() = default;
89};
90
91} /* namespace nt */
92} /* namespace windows */
93} /* namespace introvirt */
Definition guest_ptr.hh:88
An abstract class reprseneting a more specific file information buffer.
Definition FILE_INFORMATION.hh:38
virtual FILE_INFORMATION_CLASS FileInformationClass() const =0
Get the type of file information held in the buffer.
static std::unique_ptr< FILE_INFORMATION > make_unique(const NtKernel &kernel, FILE_INFORMATION_CLASS information_class, const guest_ptr< void > &ptr, uint32_t buffer_size)
Create a KEY_VALUE_INFORMATION parser instance.
virtual void write(std::ostream &os, const std::string &linePrefix="") const =0
Write a description to the ostream.
virtual uint32_t buffer_size() const =0
Get the size of the buffer.
virtual guest_ptr< void > ptr() const =0
Get the address that the buffer is at.
virtual Json::Value json() const =0
Return the file information class as a JSON representation.
Abstraction for the Windows NT kernel.
Definition NtKernel.hh:37
Type-safe guest virtual address pointer and guest_ptr template.
FILE_INFORMATION_CLASS
Definition FILE_INFORMATION_CLASS.hh:24
Core IntroVirt classes.
Definition Cr0.hh:20