ReactOS  0.4.14-dev-57-g333b8f1
hdl.h File Reference
#include <cportlib/cportlib.h>
#include <ndk/extypes.h>
Include dependency graph for hdl.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

struct  _HEADLESS_LOG_ENTRY
 
struct  _HEADLESS_CMD_SET_BLUE_SCREEN_DATA
 
struct  _HEADLESS_GLOBALS
 
struct  _HEADLESS_RSP_QUERY_INFO
 
struct  _HEADLESS_CMD_ENABLE_TERMINAL
 
struct  _HEADLESS_CMD_PUT_STRING
 
struct  _HEADLESS_CMD_SET_COLOR
 
struct  _HEADLESS_CMD_POSITION_CURSOR
 
struct  _HEADLESS_RSP_GET_BYTE
 

Macros

#define _HDL_
 
#define _HDL_DEBUG_   0x00
 
#define HDL_XXX_DEBUG   0x01
 
#define HDLTRACE(x, fmt, ...)   DPRINT(fmt, ##__VA_ARGS__)
 

Typedefs

typedef enum _HEADLESS_LOG_MESSAGE HEADLESS_LOG_MESSAGE
 
typedef struct _HEADLESS_LOG_ENTRY HEADLESS_LOG_ENTRY
 
typedef struct _HEADLESS_LOG_ENTRYPHEADLESS_LOG_ENTRY
 
typedef struct _HEADLESS_CMD_SET_BLUE_SCREEN_DATA HEADLESS_CMD_SET_BLUE_SCREEN_DATA
 
typedef struct _HEADLESS_CMD_SET_BLUE_SCREEN_DATAPHEADLESS_CMD_SET_BLUE_SCREEN_DATA
 
typedef struct _HEADLESS_GLOBALS HEADLESS_GLOBALS
 
typedef struct _HEADLESS_GLOBALSPHEADLESS_GLOBALS
 
typedef enum _HEADLESS_CMD HEADLESS_CMD
 
typedef enum _HEADLESS_CMDPHEADLESS_CMD
 
typedef enum _HEADLESS_TERM_PORT_TYPE HEADLESS_TERM_PORT_TYPE
 
typedef enum _HEADLESS_TERM_PORT_TYPEPHEADLESS_TERM_PORT_TYPE
 
typedef enum _HEADLESS_TERM_SERIAL_PORT HEADLESS_TERM_SERIAL_PORT
 
typedef enum _HEADLESS_TERM_SERIAL_PORTPHEADLESS_TERM_SERIAL_PORT
 
typedef struct _HEADLESS_RSP_QUERY_INFO HEADLESS_RSP_QUERY_INFO
 
typedef struct _HEADLESS_RSP_QUERY_INFOPHEADLESS_RSP_QUERY_INFO
 
typedef struct _HEADLESS_CMD_ENABLE_TERMINAL HEADLESS_CMD_ENABLE_TERMINAL
 
typedef struct _HEADLESS_CMD_ENABLE_TERMINALPHEADLESS_CMD_ENABLE_TERMINAL
 
typedef struct _HEADLESS_CMD_PUT_STRING HEADLESS_CMD_PUT_STRING
 
typedef struct _HEADLESS_CMD_PUT_STRINGPHEADLESS_CMD_PUT_STRING
 
typedef struct _HEADLESS_CMD_SET_COLOR HEADLESS_CMD_SET_COLOR
 
typedef struct _HEADLESS_CMD_SET_COLORPHEADLESS_CMD_SET_COLOR
 
typedef struct _HEADLESS_CMD_POSITION_CURSOR HEADLESS_CMD_POSITION_CURSOR
 
typedef struct _HEADLESS_CMD_POSITION_CURSORPHEADLESS_CMD_POSITION_CURSOR
 
typedef struct _HEADLESS_RSP_GET_BYTE HEADLESS_RSP_GET_BYTE
 
typedef struct _HEADLESS_RSP_GET_BYTEPHEADLESS_RSP_GET_BYTE
 

Enumerations

enum  _HEADLESS_LOG_MESSAGE {
  HeadlessLogDriverLoad = 1, HeadlessLogDriverSuccess, HeadlessLogDriverFailed, HeadlessLogEventFailed,
  HeadlessLogObjectFailed, HeadlessLogDirectoryFailed, HeadlessLogPnpFailed, HeadlessLogPnpFailed2,
  HeadlessLogBootDriversFailed, HeadlessLogNtdllFailed, HeadlessLogSystemDriversFailed, HeadlessLogReassignSystemRootFailed,
  HeadlessLogProtectSystemRootFailed, HeadlessLogConvertSystemRootFailed, HeadlessLogConvertDeviceNameFailed, HeadlessLogGroupOrderListFailed,
  HeadlessLogGroupTableFailed
}
 
enum  _HEADLESS_CMD {
  HeadlessCmdEnableTerminal = 1, HeadlessCmdCheckForReboot, HeadlessCmdPutString, HeadlessCmdClearDisplay,
  HeadlessCmdClearToEndOfDisplay, HeadlessCmdClearToEndOfLine, HeadlessCmdDisplayAttributesOff, HeadlessCmdDisplayInverseVideo,
  HeadlessCmdSetColor, HeadlessCmdPositionCursor, HeadlessCmdTerminalPoll, HeadlessCmdGetByte,
  HeadlessCmdGetLine, HeadlessCmdStartBugCheck, HeadlessCmdDoBugCheckProcessing, HeadlessCmdQueryInformation,
  HeadlessCmdAddLogEntry, HeadlessCmdDisplayLog, HeadlessCmdSetBlueScreenData, HeadlessCmdSendBlueScreenData,
  HeadlessCmdQueryGUID, HeadlessCmdPutData
}
 
enum  _HEADLESS_TERM_PORT_TYPE { HeadlessUndefinedPortType = 0, HeadlessSerialPort }
 
enum  _HEADLESS_TERM_SERIAL_PORT {
  SerialPortUndefined = 0, ComPort1, ComPort2, ComPort3,
  ComPort4
}
 

Functions

NTSTATUS NTAPI HeadlessDispatch (IN HEADLESS_CMD Command, IN PVOID InputBuffer, IN SIZE_T InputBufferSize, OUT PVOID OutputBuffer, OUT PSIZE_T OutputBufferSize)
 

Variables

PHEADLESS_GLOBALS HeadlessGlobals
 

Macro Definition Documentation

◆ _HDL_

#define _HDL_

Definition at line 8 of file hdl.h.

◆ _HDL_DEBUG_

#define _HDL_DEBUG_   0x00

Definition at line 15 of file hdl.h.

◆ HDL_XXX_DEBUG

#define HDL_XXX_DEBUG   0x01

Definition at line 20 of file hdl.h.

◆ HDLTRACE

#define HDLTRACE (   x,
  fmt,
  ... 
)    DPRINT(fmt, ##__VA_ARGS__)

Definition at line 33 of file hdl.h.

Typedef Documentation

◆ HEADLESS_CMD

◆ HEADLESS_CMD_ENABLE_TERMINAL

◆ HEADLESS_CMD_POSITION_CURSOR

◆ HEADLESS_CMD_PUT_STRING

◆ HEADLESS_CMD_SET_BLUE_SCREEN_DATA

◆ HEADLESS_CMD_SET_COLOR

◆ HEADLESS_GLOBALS

◆ HEADLESS_LOG_ENTRY

◆ HEADLESS_LOG_MESSAGE

◆ HEADLESS_RSP_GET_BYTE

◆ HEADLESS_RSP_QUERY_INFO

◆ HEADLESS_TERM_PORT_TYPE

◆ HEADLESS_TERM_SERIAL_PORT

◆ PHEADLESS_CMD

◆ PHEADLESS_CMD_ENABLE_TERMINAL

◆ PHEADLESS_CMD_POSITION_CURSOR

◆ PHEADLESS_CMD_PUT_STRING

◆ PHEADLESS_CMD_SET_BLUE_SCREEN_DATA

◆ PHEADLESS_CMD_SET_COLOR

◆ PHEADLESS_GLOBALS

◆ PHEADLESS_LOG_ENTRY

◆ PHEADLESS_RSP_GET_BYTE

◆ PHEADLESS_RSP_QUERY_INFO

◆ PHEADLESS_TERM_PORT_TYPE

◆ PHEADLESS_TERM_SERIAL_PORT

Enumeration Type Documentation

◆ _HEADLESS_CMD

Enumerator
HeadlessCmdEnableTerminal 
HeadlessCmdCheckForReboot 
HeadlessCmdPutString 
HeadlessCmdClearDisplay 
HeadlessCmdClearToEndOfDisplay 
HeadlessCmdClearToEndOfLine 
HeadlessCmdDisplayAttributesOff 
HeadlessCmdDisplayInverseVideo 
HeadlessCmdSetColor 
HeadlessCmdPositionCursor 
HeadlessCmdTerminalPoll 
HeadlessCmdGetByte 
HeadlessCmdGetLine 
HeadlessCmdStartBugCheck 
HeadlessCmdDoBugCheckProcessing 
HeadlessCmdQueryInformation 
HeadlessCmdAddLogEntry 
HeadlessCmdDisplayLog 
HeadlessCmdSetBlueScreenData 
HeadlessCmdSendBlueScreenData 
HeadlessCmdQueryGUID 
HeadlessCmdPutData 

Definition at line 127 of file hdl.h.

128 {
enum _HEADLESS_CMD HEADLESS_CMD
enum _HEADLESS_CMD * PHEADLESS_CMD

◆ _HEADLESS_LOG_MESSAGE

Enumerator
HeadlessLogDriverLoad 
HeadlessLogDriverSuccess 
HeadlessLogDriverFailed 
HeadlessLogEventFailed 
HeadlessLogObjectFailed 
HeadlessLogDirectoryFailed 
HeadlessLogPnpFailed 
HeadlessLogPnpFailed2 
HeadlessLogBootDriversFailed 
HeadlessLogNtdllFailed 
HeadlessLogSystemDriversFailed 
HeadlessLogReassignSystemRootFailed 
HeadlessLogProtectSystemRootFailed 
HeadlessLogConvertSystemRootFailed 
HeadlessLogConvertDeviceNameFailed 
HeadlessLogGroupOrderListFailed 
HeadlessLogGroupTableFailed 

Definition at line 39 of file hdl.h.

40 {
58  //
59  // There are more, but not applicable to ReactOS, I believe
60  //
enum _HEADLESS_LOG_MESSAGE HEADLESS_LOG_MESSAGE

◆ _HEADLESS_TERM_PORT_TYPE

Enumerator
HeadlessUndefinedPortType 
HeadlessSerialPort 

Definition at line 153 of file hdl.h.

154 {
enum _HEADLESS_TERM_PORT_TYPE HEADLESS_TERM_PORT_TYPE
enum _HEADLESS_TERM_PORT_TYPE * PHEADLESS_TERM_PORT_TYPE

◆ _HEADLESS_TERM_SERIAL_PORT

Enumerator
SerialPortUndefined 
ComPort1 
ComPort2 
ComPort3 
ComPort4 

Definition at line 159 of file hdl.h.

160 {
162  ComPort1,
163  ComPort2,
164  ComPort3,
165  ComPort4
enum _HEADLESS_TERM_SERIAL_PORT * PHEADLESS_TERM_SERIAL_PORT
enum _HEADLESS_TERM_SERIAL_PORT HEADLESS_TERM_SERIAL_PORT
Definition: hdl.h:164
Definition: hdl.h:165
Definition: hdl.h:163
Definition: hdl.h:162

Function Documentation

◆ HeadlessDispatch()

NTSTATUS NTAPI HeadlessDispatch ( IN HEADLESS_CMD  Command,
IN PVOID  InputBuffer,
IN SIZE_T  InputBufferSize,
OUT PVOID  OutputBuffer,
OUT PSIZE_T  OutputBufferSize 
)

Definition at line 570 of file hdlsterm.c.

575 {
576  /* Check for stubs that will expect something even with headless off */
577  if (!HeadlessGlobals)
578  {
579  /* Don't allow the SAC to connect */
581 
582  /* Send bogus reply */
588  {
589  if (!(OutputBuffer) || !(OutputBufferSize))
590  {
592  }
593 
594  RtlZeroMemory(OutputBuffer, *OutputBufferSize);
595  }
596 
597  return STATUS_SUCCESS;
598  }
599 
600  /* Do the real work */
601  return HdlspDispatch(Command,
602  InputBuffer,
603  InputBufferSize,
604  OutputBuffer,
605  OutputBufferSize);
606 }
#define STATUS_INVALID_PARAMETER
Definition: udferr_usr.h:135
Definition: shell.h:41
CHAR InputBuffer[80]
Definition: conmgr.c:33
_Must_inspect_result_ __drv_aliasesMem _In_ PDEVICE_OBJECT _In_opt_ PVOID _In_ ULONG _Out_opt_ PVOID OutputBuffer
Definition: iofuncs.h:713
PHEADLESS_GLOBALS HeadlessGlobals
Definition: hdlsterm.c:16
NTSTATUS NTAPI HdlspDispatch(IN HEADLESS_CMD Command, IN PVOID InputBuffer, IN SIZE_T InputBufferSize, OUT PVOID OutputBuffer, OUT PSIZE_T OutputBufferSize)
Definition: hdlsterm.c:250
#define STATUS_UNSUCCESSFUL
Definition: udferr_usr.h:132
#define RtlZeroMemory(Destination, Length)
Definition: typedefs.h:261
return STATUS_SUCCESS
Definition: btrfs.c:2966

Referenced by ConMgrInitialize(), ConMgrProcessInputLine(), ConMgrWriteData(), DriverEntry(), InbvDisplayString(), InbvSetTextColor(), InbvSolidColorFill(), InitializeDeviceData(), InitializeMachineInformation(), RegisterBlueScreenMachineInformation(), TimerDpcRoutine(), and UTF8EncodeAndSend().

Variable Documentation

◆ HeadlessGlobals