libintrovirt v0.57.4
IntroVirt introspection library
Loading...
Searching...
No Matches
LUID_AND_ATTRIBUTES.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
18#include "LUID.hh"
19
20#include <introvirt/core/fwd.hh>
21
22#include <cstdint>
23#include <memory>
24
25namespace introvirt {
26namespace windows {
27namespace nt {
28
35
36class LUID_ATTRIBUTES;
37
39 public:
40 virtual LUID& Luid() = 0;
41 virtual const LUID& Luid() const = 0;
42
43 virtual LUID_ATTRIBUTES Attributes() const = 0;
44 virtual void Attributes(LUID_ATTRIBUTES attributes) = 0;
45
46 virtual guest_ptr<void> ptr() const = 0;
47
48 static std::unique_ptr<LUID_AND_ATTRIBUTES> make_unique(const guest_ptr<void>& ptr);
49 static std::shared_ptr<LUID_AND_ATTRIBUTES> make_shared(const guest_ptr<void>& ptr);
50
51 virtual ~LUID_AND_ATTRIBUTES() = default;
52};
53
55 public:
56 uint32_t value() const { return value_; }
57 operator uint32_t() const { return value_; }
58
59 LUID_ATTRIBUTES(uint32_t value) : value_(value) {}
60
61 private:
62 uint32_t value_;
63};
64
65const std::string& to_string(LUID_ATTRIBUTE_FLAGS);
66std::ostream& operator<<(std::ostream&, LUID_ATTRIBUTE_FLAGS);
67
69std::ostream& operator<<(std::ostream&, LUID_ATTRIBUTES);
70
71} /* namespace nt */
72} /* namespace windows */
73} /* namespace introvirt */
Definition guest_ptr.hh:88
Definition LUID_AND_ATTRIBUTES.hh:38
virtual LUID_ATTRIBUTES Attributes() const =0
static std::shared_ptr< LUID_AND_ATTRIBUTES > make_shared(const guest_ptr< void > &ptr)
virtual guest_ptr< void > ptr() const =0
virtual void Attributes(LUID_ATTRIBUTES attributes)=0
virtual const LUID & Luid() const =0
static std::unique_ptr< LUID_AND_ATTRIBUTES > make_unique(const guest_ptr< void > &ptr)
Definition LUID_AND_ATTRIBUTES.hh:54
LUID_ATTRIBUTES(uint32_t value)
Definition LUID_AND_ATTRIBUTES.hh:59
uint32_t value() const
Definition LUID_AND_ATTRIBUTES.hh:56
Definition LUID.hh:27
LUID_ATTRIBUTE_FLAGS
Definition LUID_AND_ATTRIBUTES.hh:29
@ SE_PRIVILEGE_ENABLED
Definition LUID_AND_ATTRIBUTES.hh:31
@ SE_PRIVILEGE_ENABLED_BY_DEFAULT
Definition LUID_AND_ATTRIBUTES.hh:30
@ SE_PRIVILEGE_USED_FOR_ACCESS
Definition LUID_AND_ATTRIBUTES.hh:33
@ SE_PRIVILEGE_REMOVED
Definition LUID_AND_ATTRIBUTES.hh:32
std::ostream & operator<<(std::ostream &, APPHELPCACHESERVICECLASS val)
const std::string & to_string(APPHELPCACHESERVICECLASS val)
Core IntroVirt classes.
Definition Cr0.hh:20