summaryrefslogtreecommitdiffstats
path: root/private/ntos/nbt/nt/netbtkd/kdextlib.h
diff options
context:
space:
mode:
authorAdam <you@example.com>2020-05-17 05:51:50 +0200
committerAdam <you@example.com>2020-05-17 05:51:50 +0200
commite611b132f9b8abe35b362e5870b74bce94a1e58e (patch)
treea5781d2ec0e085eeca33cf350cf878f2efea6fe5 /private/ntos/nbt/nt/netbtkd/kdextlib.h
downloadNT4.0-e611b132f9b8abe35b362e5870b74bce94a1e58e.tar
NT4.0-e611b132f9b8abe35b362e5870b74bce94a1e58e.tar.gz
NT4.0-e611b132f9b8abe35b362e5870b74bce94a1e58e.tar.bz2
NT4.0-e611b132f9b8abe35b362e5870b74bce94a1e58e.tar.lz
NT4.0-e611b132f9b8abe35b362e5870b74bce94a1e58e.tar.xz
NT4.0-e611b132f9b8abe35b362e5870b74bce94a1e58e.tar.zst
NT4.0-e611b132f9b8abe35b362e5870b74bce94a1e58e.zip
Diffstat (limited to 'private/ntos/nbt/nt/netbtkd/kdextlib.h')
-rw-r--r--private/ntos/nbt/nt/netbtkd/kdextlib.h139
1 files changed, 139 insertions, 0 deletions
diff --git a/private/ntos/nbt/nt/netbtkd/kdextlib.h b/private/ntos/nbt/nt/netbtkd/kdextlib.h
new file mode 100644
index 000000000..10bb0fbf9
--- /dev/null
+++ b/private/ntos/nbt/nt/netbtkd/kdextlib.h
@@ -0,0 +1,139 @@
+
+/*++
+
+Copyright (c) 1990 Microsoft Corporation
+
+Module Name:
+
+ rdr2kd.h
+
+Abstract:
+
+ Redirector Kernel Debugger extension
+
+Author:
+
+ Balan Sethu Raman (SethuR) 11-May-1994
+
+Revision History:
+
+ 11-Nov-1994 SethuR Created
+
+--*/
+
+#ifndef _KDEXTLIB_H_
+#define _KDEXTLIB_H_
+
+#include <windef.h>
+
+//
+// The help strings printed out
+//
+
+extern LPSTR Extensions[];
+
+//
+// The FIELD_DESCRIPTOR data structure is used to describe the field in a structure sufficiently
+// for displaying information during debugging. The three pieces of information that are required
+// are 1) the name of the field, 2) the offset in the corresponding structure and 3) a type descriptor.
+// The type descriptor covers most primitive types.
+//
+// The task of generating these descriptors by augmenting the front end, but that will have to
+// wait till we play around with these extensions and modify the data structures to meet most
+// of the requirements.
+//
+// There are some types that can benefit from some auxillary information in the descriptors. A
+// case in point is the "enum" defeinition. Merely printing out a numerical value for an enum
+// type will invariably force the person using these extensions to refer to the corresponding
+// include file. In order to avoid this we will accept an additional array for enum types that
+// contains a textual description of the numerical value.
+//
+// There are certain conventions that have been adopted to ease the definition of the macros
+// as well as facilitate the automation of the generation of these descriptors.
+// These are as follows ....
+//
+// 1) All ENUM_VALUE_DESCRIPTOR definitions are named EnumValueDescrsOf_ENUMTYPENAME, where
+// ENUMTYPENAME defines the corresponding enumerated type.
+//
+
+typedef struct _ENUM_VALUE_DESCRIPTOR {
+ ULONG EnumValue;
+ LPSTR EnumName;
+} ENUM_VALUE_DESCRIPTOR;
+
+typedef enum _FIELD_TYPE_CLASS {
+ FieldTypeByte,
+ FieldTypeChar,
+ FieldTypeBoolean,
+ FieldTypeBool,
+ FieldTypeULong,
+ FieldTypeLong,
+ FieldTypeUShort,
+ FieldTypeShort,
+ FieldTypePointer,
+ FieldTypeULongULong,
+ FieldTypeListEntry,
+ FieldTypeIpAddr,
+ FieldTypeMacAddr,
+ FieldTypeNBName,
+ FieldTypeUnicodeString,
+ FieldTypeAnsiString,
+ FieldTypeSymbol,
+ FieldTypeEnum,
+ FieldTypeByteBitMask,
+ FieldTypeWordBitMask,
+ FieldTypeDWordBitMask,
+ FieldTypeFloat,
+ FieldTypeDouble,
+ FieldTypeStruct,
+ FieldTypeLargeInteger,
+ FieldTypeFileTime
+} FIELD_TYPE_CLASS, *PFIELD_TYPE_CLASS;
+
+typedef struct _FIELD_DESCRIPTOR_ {
+ FIELD_TYPE_CLASS FieldType; // The type of variable to be printed
+ LPSTR Name; // The name of the field
+ USHORT Offset; // The offset of the field in the structure
+ union {
+ ENUM_VALUE_DESCRIPTOR *pEnumValueDescriptor; // Auxillary information for enumerated types.
+ } AuxillaryInfo;
+} FIELD_DESCRIPTOR;
+
+#define FIELD3(FieldType,StructureName, FieldName) \
+ {FieldType, #FieldName , FIELD_OFFSET(StructureName,FieldName) ,NULL}
+
+#define FIELD4(FieldType, StructureName, FieldName, AuxInfo) \
+ {FieldType, #FieldName , FIELD_OFFSET(StructureName,FieldName) ,AuxInfo}
+
+//
+// The structs that are displayed by the debugger extensions are further
+// described in another array. Each entry in the array contains the name of
+// the structure and the associated Field descriptor list.
+//
+
+typedef struct _STRUCT_DESCRITOR_ {
+ LPSTR StructName;
+ ULONG StructSize;
+ FIELD_DESCRIPTOR *FieldDescriptors;
+} STRUCT_DESCRIPTOR;
+
+#define STRUCT(StructTypeName,FieldDescriptors) \
+ { #StructTypeName,sizeof(StructTypeName),FieldDescriptors}
+
+//
+// The array of structs handled by the debugger extension.
+//
+
+extern STRUCT_DESCRIPTOR Structs[];
+
+//
+// Support for displaying global variables
+//
+
+extern LPSTR GlobalBool[];
+extern LPSTR GlobalShort[];
+extern LPSTR GlobalLong[];
+extern LPSTR GlobalPtrs[];
+
+#endif // _KDEXTLIB_H_
+