Bitdefender Hypervisor Memory Introspection
introtypes.h
Go to the documentation of this file.
1 /*
2  * Copyright (c) 2020 Bitdefender
3  * SPDX-License-Identifier: Apache-2.0
4  */
5 #ifndef _INTROTYPES_H_
6 #define _INTROTYPES_H_
7 
8 #include "env.h"
9 
10 #ifndef INT_COMPILER_MSVC
11 #include "compiler-gnu.h"
12 #else
13 #include "compiler-msvc.h"
14 #endif
15 
16 #include "intro_types.h"
17 
18 #if !defined(_M_X64) && !defined(_M_AMD64) && !defined(__amd64__) && \
19  !defined(__amd64) && !defined(__x86_64__) && !defined(__x86_64) && !defined(__LP64__)
20 # error "Unsupported architecture"
21 #endif
22 
23 #if defined(__MINGW32__) || defined(__MINGW64__)
24 # error "MINGW builds are not supported for now"
25 #endif
26 
27 #ifdef __CYGWIN__
28 # error "CYGWIN builds are not supported for now"
29 #endif
30 
31 #define BYTE_MAX UINT8_MAX
32 #define WORD_MAX UINT16_MAX
33 #define DWORD_MAX UINT32_MAX
34 #define QWORD_MAX UINT64_MAX
35 
36 //
37 // Some useful attributes (should be in introdefs.h really, but they make more sense here since some of them
38 // apply to types).
39 //
40 // See the following links for more details:
41 // https://gcc.gnu.org/onlinedocs/gcc/Common-Function-Attributes.html#Common-Function-Attributes
42 // https://gcc.gnu.org/onlinedocs/gcc/Common-Variable-Attributes.html#Common-Variable-Attributes
43 // https://gcc.gnu.org/onlinedocs/gcc/Common-Type-Attributes.html#Common-Type-Attributes
44 //
45 #ifndef INT_COMPILER_MSVC
46 # define __pure __attribute__((pure))
47 # define __section(x) __attribute__((section (x)))
48 # define __must_check __attribute__((warn_unused_result))
49 # define __nonstring __attribute__((nonstring))
50 # define __noreturn __attribute__((noreturn))
51 #else
52 # define __attribute__(x)
53 # define __pure
54 # define __section(Name)
55 # define __must_check
56 # define __nonstring
57 # define __nonnull(...)
58 # define __noreturn __declspec(noreturn)
59 #endif
60 
61 #define __forceinline __attribute__((always_inline)) inline
62 
63 #include "introstatus.h"
64 #include "introlists.h"
65 #include "intro_types.h"
66 
67 #include "glueiface.h"
68 #include "upperiface.h"
69 
70 typedef INTSTATUS
72  _In_ QWORD Node,
73  _In_ QWORD Aux
74  );
75 
76 #endif /* _INTROTYPES_H_ */
#define _In_
Definition: intro_sal.h:21
Exposes the types and constants used by various Introcore APIs defined in glueiface.h.
int INTSTATUS
The status data type.
Definition: introstatus.h:24
Defines an interface that exposes various services to the introspection engine.
unsigned long long QWORD
Definition: intro_types.h:53
INTSTATUS(* PFUNC_IterateListCallback)(QWORD Node, QWORD Aux)
Definition: introtypes.h:71
Defines an interface used by the introspection engine to communicate with an integrator.
Status values returned by most functions that can signal different success or failure states...