ReactOS 0.4.16-dev-125-g798ea90
sacdrv.h
Go to the documentation of this file.
1/*
2 * PROJECT: ReactOS Drivers
3 * LICENSE: BSD - See COPYING.ARM in the top level directory
4 * FILE: drivers/sac/driver/sacdrv.h
5 * PURPOSE: Driver for the Server Administration Console (SAC) for EMS
6 * PROGRAMMERS: ReactOS Portable Systems Group
7 */
8
9#ifndef _SACDRV_H_
10#define _SACDRV_H_
11
12/* INCLUDES *******************************************************************/
13
14#include <ntifs.h>
15#include <stdio.h>
17#include <sacmsg.h>
18
19/* DEFINES ********************************************************************/
20
21//
22// SAC Heap Allocator Macros
23//
24#define SacAllocatePool(Length, Tag) \
25 MyAllocatePool(Length, Tag, __FILE__, __LINE__)
26#define SacFreePool(Pointer) \
27 MyFreePool((PVOID*)(&Pointer))
28
29//
30// SAC Debugging Macro and Constants
31//
32#define SAC_DBG_ENTRY_EXIT 0x01
33#define SAC_DBG_UTIL 0x02
34#define SAC_DBG_INIT 0x04
35#define SAC_DBG_MM 0x1000
36#define SAC_DBG_MACHINE 0x2000
37#define SAC_DBG(x, ...) \
38 if (SACDebug & x) \
39 { \
40 DbgPrint("SAC %s: ", __FUNCTION__); \
41 DbgPrint(__VA_ARGS__); \
42 }
43
44//
45// SAC Parameter Checking Macros
46//
47#define CHECK_PARAMETER_WITH_STATUS(Condition, Status) \
48{ \
49 if (!NT_VERIFY(Condition)) \
50 { \
51 return Status; \
52 } \
53}
54#define CHECK_PARAMETER(x) \
55 CHECK_PARAMETER_WITH_STATUS(x, STATUS_INVALID_PARAMETER)
56#define CHECK_PARAMETER1(x) \
57 CHECK_PARAMETER_WITH_STATUS(x, STATUS_INVALID_PARAMETER_1)
58#define CHECK_PARAMETER2(x) \
59 CHECK_PARAMETER_WITH_STATUS(x, STATUS_INVALID_PARAMETER_2)
60#define CHECK_PARAMETER3(x) \
61 CHECK_PARAMETER_WITH_STATUS(x, STATUS_INVALID_PARAMETER_3)
62#define CHECK_PARAMETER4(x) \
63 CHECK_PARAMETER_WITH_STATUS(x, STATUS_INVALID_PARAMETER_4)
64#define CHECK_ALLOCATION(x) \
65 CHECK_PARAMETER_WITH_STATUS(x, STATUS_NO_MEMORY)
66
67//
68// SAC Channel Event Macros
69//
70#define ChannelInitializeEvent(Channel, Attributes, x) \
71{ \
72 PVOID Object, WaitObject; \
73 if (Attributes->x) \
74 { \
75 if (!VerifyEventWaitable(Attributes->x, &Object, &WaitObject)) \
76 { \
77 Status = STATUS_INVALID_HANDLE; \
78 goto FailChannel; \
79 } \
80 Channel->x = Attributes->x; \
81 Channel->x##ObjectBody = Object; \
82 Channel->x##WaitObjectBody = WaitObject; \
83 } \
84}
85#define ChannelUninitializeEvent(Channel, x, f) \
86{ \
87 ASSERT(ChannelGetFlags(Channel) & (f)); \
88 ASSERT(Channel->x##ObjectBody); \
89 ASSERT(Channel->x##WaitObjectBody); \
90 if (Channel->x##ObjectBody) \
91 { \
92 ObDereferenceObject(Channel->x##ObjectBody); \
93 Channel->Flags &= ~(f); \
94 Channel->x = NULL; \
95 Channel->x##ObjectBody = NULL; \
96 Channel->x##WaitObjectBody = NULL; \
97 } \
98}
99#define ChannelSetEvent(Channel, x) \
100{ \
101 ASSERT(Channel->x); \
102 ASSERT(Channel->x##ObjectBody); \
103 ASSERT(Channel->x##WaitObjectBody); \
104 if (Channel->x##WaitObjectBody) \
105 { \
106 KeSetEvent(Channel->x##WaitObjectBody, EVENT_INCREMENT, FALSE); \
107 Status = STATUS_SUCCESS; \
108 } \
109 else \
110 { \
111 Status = STATUS_UNSUCCESSFUL; \
112 } \
113}
114#define ChannelClearEvent(Channel, x) \
115{ \
116 ASSERT(Channel->x); \
117 ASSERT(Channel->x##ObjectBody); \
118 ASSERT(Channel->x##WaitObjectBody); \
119 if (Channel->x##WaitObjectBody) \
120 { \
121 KeClearEvent(Channel->x##WaitObjectBody); \
122 Status = STATUS_SUCCESS; \
123 } \
124 else \
125 { \
126 Status = STATUS_UNSUCCESSFUL; \
127 } \
128}
129
130//
131// SAC Pool Tags, taken from pooltag.txt:
132//
133// Rcp? - sacdrv.sys - SAC Driver (Headless)
134// RcpA - sacdrv.sys - Internal memory mgr alloc block
135// RcpI - sacdrv.sys - Internal memory mgr initial heap block
136// RcpS - sacdrv.sys - Security related block
137#define GENERIC_TAG '?pcR'
138#define ALLOC_BLOCK_TAG 'ApcR'
139#define INITIAL_BLOCK_TAG 'IpcR'
140#define SECURITY_BLOCK_TAG 'SpcR'
141#define FREE_POOL_TAG 'FpcR'
142#define GLOBAL_BLOCK_TAG 'GpcR'
143#define CHANNEL_BLOCK_TAG 'CpcR'
144#define LOCAL_MEMORY_SIGNATURE 'SSEL'
145#define GLOBAL_MEMORY_SIGNATURE 'DAEH'
146
147//
148// Size Definitions
149//
150#define SAC_MEMORY_LIST_SIZE (1 * 1024 * 1024) // 1MB
151#define SAC_OBUFFER_SIZE (2 * 1024) // 2KB
152#define SAC_CHANNEL_NAME_SIZE 64
153#define SAC_CHANNEL_DESCRIPTION_SIZE 256
154#define SAC_MAX_CHANNELS 10
155#define SAC_SERIAL_PORT_BUFFER_SIZE 1024 // 1KB
156#define SAC_MAX_MESSAGES 200
157#define SAC_VTUTF8_COL_WIDTH 80
158#define SAC_VTUTF8_COL_HEIGHT 25
159#define SAC_VTUTF8_ROW_HEIGHT 24
160#define MAX_UTF8_ENCODE_BLOCK_LENGTH (Utf8ConversionBufferSize / 3 - 1)
161#define SAC_VTUTF8_OBUFFER_SIZE 0x2D00
162#define SAC_VTUTF8_IBUFFER_SIZE 0x2000
163#define SAC_RAW_OBUFFER_SIZE 0x2000
164#define SAC_RAW_IBUFFER_SIZE 0x2000
165
166//
167// Channel flags
168//
169#define SAC_CHANNEL_FLAG_INTERNAL 0x1
170#define SAC_CHANNEL_FLAG_CLOSE_EVENT 0x2
171#define SAC_CHANNEL_FLAG_HAS_NEW_DATA_EVENT 0x4
172#define SAC_CHANNEL_FLAG_LOCK_EVENT 0x8
173#define SAC_CHANNEL_FLAG_REDRAW_EVENT 0x10
174#define SAC_CHANNEL_FLAG_APPLICATION 0x20
175
176//
177// Cell Flags
178//
179#define SAC_CELL_FLAG_BLINK 1
180#define SAC_CELL_FLAG_BOLD 2
181#define SAC_CELL_FLAG_INVERTED 4
182
183//
184// Forward definitions
185//
186struct _SAC_CHANNEL;
187
188//
189// Structures used by the SAC Heap Allocator
190//
191typedef struct _SAC_MEMORY_ENTRY
192{
197typedef struct _SAC_MEMORY_LIST
198{
204
205typedef struct _SAC_MESSAGE_ENTRY
206{
210
211//
212// These are the VT-100/220/ANSI Escape Codes supported by SAC as input
213//
215{
241
242//
243// These are the VT-100/220/ANSI Escape Codes send by SAC as output
244//
246{
260
261//
262// Commands that the consumer and producer share
263//
265{
269 Restart
271
272//
273// SAC supports 3 different channel output types
274//
276{
279 Raw
281
282//
283// A SAC channel can be active or inactive
284//
286{
288 Active
290
291//
292// A SAC channel identifier
293//
294typedef struct _SAC_CHANNEL_ID
295{
299
300//
301// Reference-counted SAC channel semaphore lock
302//
303typedef struct _SAC_CHANNEL_LOCK
304{
308
309//
310// Structure of the cell-buffer when in VT-UTF8 Mode
311//
312typedef struct _SAC_CELL_DATA
313{
320
321//
322// Screen buffer when in VT-UTF8 Mode
323//
324typedef struct _SAC_VTUTF8_SCREEN
325{
328
329//
330// Small optimization to easily recognize the most common VT-100/ANSI codes
331//
333{
338
339//
340// Channel callbacks
341//
342typedef
345 IN struct _SAC_CHANNEL* Channel
346);
347
348typedef
351 IN struct _SAC_CHANNEL* Channel
352);
353
354typedef
357 IN struct _SAC_CHANNEL* Channel,
361);
362
363typedef
366 IN struct _SAC_CHANNEL* Channel,
369);
370
371typedef
374 IN struct _SAC_CHANNEL* Channel
375);
376
377typedef
380 IN struct _SAC_CHANNEL* Channel,
383);
384
385typedef
388 IN struct _SAC_CHANNEL* Channel,
392);
393
394typedef
397 IN struct _SAC_CHANNEL* Channel,
398 OUT PBOOLEAN BufferStatus
399);
400
401typedef
404 IN struct _SAC_CHANNEL* Channel
405);
406
407typedef
410 IN struct _SAC_CHANNEL* Channel
411);
412
413typedef
416 IN struct _SAC_CHANNEL* Channel,
419);
420
421//
422// A channel and its attributes
423//
424typedef struct _SAC_CHANNEL
425{
475
477{
488
489//
490// Cached Machine Information
491//
492typedef struct _SAC_MACHINE_INFO
493{
502
503//
504// The device extension for the SAC
505//
507{
524
525//
526// Dispatch Routines
527//
529NTAPI
532 IN PIRP Irp
533);
534
536NTAPI
539 IN PIRP Irp
540);
541
543NTAPI
546 IN PIRP Irp
547);
548
549VOID
550NTAPI
553);
554
555//
556// Initialization and shutdown routines
557//
558VOID
559NTAPI
561 VOID
562);
563
564VOID
565NTAPI
568);
569
571NTAPI
574);
575
577NTAPI
581);
582
584NTAPI
586 VOID
587);
588
589VOID
590NTAPI
592 VOID
593);
594
595VOID
596NTAPI
598 VOID
599);
600
601VOID
602NTAPI
604 VOID
605);
606
608NTAPI
610 IN PVOID ImageBase
611);
612
614NTAPI
616 VOID
617);
618
620NTAPI
622 OUT PBOOLEAN Permission
623);
624
626NTAPI
628 VOID
629);
630
632NTAPI
634 VOID
635);
636
637VOID
638NTAPI
640 VOID
641);
642
643//
644// DPC, Timer, Thread Callbacks
645//
646VOID
647NTAPI
649 IN PKDPC Dpc,
653);
654
655//
656// Custom SAC Heap Allocator Routines
657//
658PVOID
659NTAPI
661 IN SIZE_T PoolSize,
662 IN ULONG Tag,
663 IN PCHAR File,
665);
666
667VOID
668NTAPI
670 IN PVOID *Block
671);
672
673//
674// Connection Manager Routines
675//
677NTAPI
679 VOID
680);
681
682VOID
683NTAPI
685 IN PSAC_DEVICE_EXTENSION DeviceExtension
686);
687
689NTAPI
691 VOID
692);
693
695NTAPI
697 IN ULONG MessageIndex,
698 IN BOOLEAN LockHeld
699);
700
702NTAPI
704 IN ULONG MessageIndex
705);
706
707VOID
708NTAPI
711);
712
714NTAPI
716 IN PSAC_CHANNEL Channel,
719);
720
722NTAPI
724 IN PSAC_CHANNEL Channel
725);
726
728NTAPI
730 IN PSAC_CHANNEL Channel
731);
732
734NTAPI
737 IN PSAC_CHANNEL Channel,
739);
740
741//
742// Channel Manager Routines
743//
745NTAPI
747 VOID
748);
749
751NTAPI
753 VOID
754);
755
757NTAPI
759 OUT PSAC_CHANNEL *Channel,
761);
762
764NTAPI
766 IN SAC_CHANNEL_ID ChannelId,
767 OUT PSAC_CHANNEL* TargetChannel
768);
769
771NTAPI
773 IN PSAC_CHANNEL Channel
774);
775
777NTAPI
780 IN PULONG TargetIndex,
781 OUT PSAC_CHANNEL *TargetChannel
782);
783
785NTAPI
787 IN PSAC_CHANNEL Channel
788);
789
790//
791// Channel Routines
792//
794NTAPI
796 IN PSAC_CHANNEL Channel
797);
798
800NTAPI
802 IN PSAC_CHANNEL Channel,
803 IN PSAC_CHANNEL_ID ChannelId
804);
805
807NTAPI
809 IN PSAC_CHANNEL Channel,
812);
813
815NTAPI
817 IN PSAC_CHANNEL Channel
818);
819
821NTAPI
823 IN PSAC_CHANNEL Channel
824);
825
827NTAPI
829 IN PSAC_CHANNEL Channel
830);
831
833NTAPI
835 IN PSAC_CHANNEL Channel,
836 OUT PBOOLEAN Present
837);
838
840NTAPI
842 IN PSAC_CHANNEL Channel
843);
844
846NTAPI
848 IN PSAC_CHANNEL Channel,
850);
851
853NTAPI
855 IN PSAC_CHANNEL Channel,
856 IN PSAC_CHANNEL_ID ChannelId
857);
858
860NTAPI
862 IN PSAC_CHANNEL Channel,
864 IN SAC_CHANNEL_ID ChannelId
865);
866
868NTAPI
870 IN PSAC_CHANNEL Channel
871);
872
874NTAPI
876 IN PSAC_CHANNEL Channel,
879);
880
881WCHAR
882NTAPI
884 IN PSAC_CHANNEL Channel
885);
886
887ULONG
888NTAPI
890 IN PSAC_CHANNEL Channel
891);
892
894NTAPI
896 IN PSAC_CHANNEL Channel,
899 IN OUT PULONG ResultBufferSize
900);
901
902//
903// RAW Channel Table
904//
906NTAPI
908 IN PSAC_CHANNEL Channel
909);
910
912NTAPI
914 IN PSAC_CHANNEL Channel
915);
916
918NTAPI
920 IN PSAC_CHANNEL Channel,
924);
925
927NTAPI
929 IN PSAC_CHANNEL Channel,
932);
933
935NTAPI
937 IN PSAC_CHANNEL Channel
938);
939
941NTAPI
943 IN PSAC_CHANNEL Channel,
946);
947
949NTAPI
951 IN PSAC_CHANNEL Channel,
955);
956
958NTAPI
960 IN PSAC_CHANNEL Channel,
961 OUT PBOOLEAN BufferStatus
962);
963
964ULONG
965NTAPI
967 IN PSAC_CHANNEL Channel
968);
969
970WCHAR
971NTAPI
973 IN PSAC_CHANNEL Channel
974);
975
977NTAPI
979 IN PSAC_CHANNEL Channel,
982);
983
984//
985// VT-UTF8 Channel Table
986//
988NTAPI
990 IN PSAC_CHANNEL Channel
991);
992
994NTAPI
996 IN PSAC_CHANNEL Channel
997);
998
1000NTAPI
1002 IN PSAC_CHANNEL Channel,
1003 IN PCHAR Buffer,
1006);
1007
1009NTAPI
1011 IN PSAC_CHANNEL Channel,
1012 IN PCHAR String,
1014);
1015
1017NTAPI
1019 IN PSAC_CHANNEL Channel
1020);
1021
1023NTAPI
1025 IN PSAC_CHANNEL Channel,
1026 IN PCHAR String,
1028);
1029
1031NTAPI
1033 IN PSAC_CHANNEL Channel,
1034 IN PCHAR Buffer,
1037);
1038
1040NTAPI
1042 IN PSAC_CHANNEL Channel,
1043 OUT PBOOLEAN BufferStatus
1044);
1045
1046ULONG
1047NTAPI
1049 IN PSAC_CHANNEL Channel
1050);
1051
1052WCHAR
1053NTAPI
1055 IN PSAC_CHANNEL Channel
1056);
1057
1059NTAPI
1061 IN PSAC_CHANNEL Channel,
1062 IN PCHAR Buffer,
1064);
1065
1066
1067//
1068// Helper Routines
1069//
1070BOOLEAN
1071NTAPI
1073 IN CHAR Utf8Char,
1074 IN PCHAR Utf8Buffer,
1075 OUT PWCHAR Utf8Value
1076);
1077
1078ULONG
1079NTAPI
1081 IN ULONG MessageIndex
1082);
1083
1085NTAPI
1087 OUT PCHAR Char
1088);
1089
1091NTAPI
1094);
1095
1097NTAPI
1099 IN PWCHAR *Buffer,
1100 IN PWCHAR ExtraData
1101);
1102
1103PWCHAR
1104NTAPI
1106 IN ULONG MessageIndex
1107);
1108
1109BOOLEAN
1110NTAPI
1113 OUT PVOID *WaitObject,
1114 OUT PVOID *ActualWaitObject
1115);
1116
1117BOOLEAN
1118NTAPI
1120 IN PWCHAR SourceBuffer,
1121 IN ULONG SourceBufferLength,
1122 OUT PCHAR DestinationBuffer,
1124 OUT PULONG UTF8Count,
1125 OUT PULONG ProcessedCount
1126);
1127
1128//
1129// SAC Command Functions
1130//
1131VOID
1132NTAPI
1135);
1136
1137VOID
1138NTAPI
1140 VOID
1141);
1142
1143VOID
1144NTAPI
1146 VOID
1147);
1148
1149VOID
1150NTAPI
1152 IN PCHAR InputTime
1153);
1154
1155VOID
1156NTAPI
1158 IN PCHAR KillString
1159);
1160
1161VOID
1162NTAPI
1164 IN PCHAR PrioString
1165);
1166
1167VOID
1168NTAPI
1170 IN PCHAR PrioString
1171);
1172
1173VOID
1174NTAPI
1176 IN PCHAR LimitString
1177);
1178
1179VOID
1180NTAPI
1182 VOID
1183);
1184
1185VOID
1186NTAPI
1188 VOID
1189);
1190
1191VOID
1192NTAPI
1194 IN PCHAR ChannelString
1195);
1196
1197VOID
1198NTAPI
1200 IN PCHAR InputString
1201);
1202
1203VOID
1204NTAPI
1206 VOID
1207);
1208
1209VOID
1210NTAPI
1212 VOID
1213);
1214
1215VOID
1216NTAPI
1219);
1220
1221VOID
1222NTAPI
1224 IN PCHAR IpString
1225);
1226
1227VOID
1228NTAPI
1230 VOID
1231);
1232
1233//
1234// External data
1235//
1236extern ULONG SACDebug;
1240extern PCHAR SerialPortBuffer;
1246
1247//
1248// Function to initialize a SAC Semaphore Lock
1249//
1251VOID
1253{
1254 KeInitializeSemaphore(&Lock->Lock, 1, 1);
1255}
1256
1257//
1258// Function to acquire a SAC Semaphore Lock
1259//
1261VOID
1263{
1265 ASSERT(Lock->RefCount == 0);
1266 _InterlockedIncrement(&Lock->RefCount);
1267}
1268
1269//
1270// Function to release a SAC Semaphore Lock
1271//
1273VOID
1275{
1276 ASSERT(Lock->RefCount == 1);
1277 _InterlockedDecrement(&Lock->RefCount);
1279}
1280
1281//
1282// Function to check if the SAC Mutex Lock is held
1283//
1285VOID
1287{
1289 ASSERT(KeReadStateMutex(&CurrentChannelLock) == 0);
1290}
1291
1292//
1293// Function to check if the SAC Mutex Lock is held
1294//
1296VOID
1298{
1301}
1302
1303//
1304// Function to acquire the SAC Mutex Lock
1305//
1307VOID
1309{
1313}
1314
1315//
1316// Function to release the SAC Mutex Lock
1317//
1319VOID
1321{
1325}
1326
1327//
1328// Locking Macros
1329//
1330#define ChannelLockCreates() SacAcquireLock(&ChannelCreateLock);
1331#define ChannelUnlockCreates() SacReleaseLock(&ChannelCreateLock);
1332#define ChannelLockOBuffer(x) SacAcquireLock(&x->ChannelOBufferLock);
1333#define ChannelUnlockOBuffer(x) SacReleaseLock(&x->ChannelOBufferLock);
1334#define ChannelLockIBuffer(x) SacAcquireLock(&x->ChannelIBufferLock);
1335#define ChannelUnlockIBuffer(x) SacReleaseLock(&x->ChannelIBufferLock);
1336#define ChannelLockAttributes(x) SacAcquireLock(&x->ChannelAttributeLock);
1337#define ChannelUnlockAttributes(x) SacReleaseLock(&x->ChannelAttributeLock);
1338#define ChannelSlotLock(x) SacAcquireLock(&ChannelSlotLock[x]);
1339#define ChannelSlotUnlock(x) SacReleaseLock(&ChannelSlotLock[x]);
1340
1341//
1342// Channel Accessors
1343//
1345ULONG
1347{
1348 return Channel->Flags;
1349}
1350
1352LONG
1354{
1355 /* Return the index of the channel */
1356 return Channel->Index;
1357}
1358
1360BOOLEAN
1362{
1363 /* Return if there's any new data in the input buffer */
1364 return Channel->ChannelHasNewIBufferData;
1365}
1366
1367//
1368// FIXME: ANSI.H
1369//
1370//
1371// Source: http://en.wikipedia.org/wiki/ANSI_escape_code
1372//
1374{
1375 //
1376 // Attribute modifiers (mostly supported)
1377 //
1388
1389 //
1390 // Font selectors (not supported)
1391 //
1402
1403 //
1404 // Additional attributes (not supported)
1405 //
1408
1409 //
1410 // Attribute Un-modifiers (mostly supported)
1411 //
1420
1421 //
1422 // Standard Text Color
1423 //
1434
1435 //
1436 // Extended Text Color (not supported)
1437 //
1440
1441 //
1442 // Standard Background Color
1443 //
1454
1455 //
1456 // Extended Background Color (not supported)
1457 //
1460
1461 //
1462 // Extra Attributes (not supported)
1463 //
1473 Reserved5
1474
1475 //
1476 // Ideograms (not supported)
1477 //
1479
1480//
1481// The following site is a good reference on VT100/ANSI escape codes
1482// http://www.termsys.demon.co.uk/vtansi.htm
1483//
1484#define VT_ANSI_ESCAPE L'\x1B'
1485#define VT_ANSI_COMMAND L'['
1486
1487#define VT_ANSI_CURSOR_UP_CHAR L'A'
1488#define VT_ANSI_CURSOR_UP L"[A"
1489
1490#define VT_ANSI_CURSOR_DOWN_CHAR L'B'
1491#define VT_ANSI_CURSOR_DOWN L"[B"
1492
1493#define VT_ANSI_CURSOR_RIGHT_CHAR L'C'
1494#define VT_ANSI_CURSOR_RIGHT L"[C"
1495
1496#define VT_ANSI_CURSOR_LEFT_CHAR L'D'
1497#define VT_ANSI_CURSOR_LEFT L"[D"
1498
1499#define VT_ANSI_ERASE_LINE_CHAR L'K'
1500#define VT_ANSI_ERASE_END_LINE L"[K"
1501#define VT_ANSI_ERASE_START_LINE L"[1K"
1502#define VT_ANSI_ERASE_ENTIRE_LINE L"[2K"
1503
1504#define VT_ANSI_ERASE_SCREEN_CHAR L'J'
1505#define VT_ANSI_ERASE_DOWN_SCREEN L"[J"
1506#define VT_ANSI_ERASE_UP_SCREEN L"[1J"
1507#define VT_ANSI_ERASE_ENTIRE_SCREEN L"[2J"
1508
1509#define VT_ANSI_BACKTAB_CHAR L'Z'
1510#define VT_220_BACKTAB L"[0Z"
1511
1512#define VT_ANSI_SET_ATTRIBUTE_CHAR L'm'
1513#define VT_ANSI_SEPARATOR_CHAR L';'
1514#define VT_ANSI_HVP_CURSOR_CHAR L'f'
1515#define VT_ANSI_CUP_CURSOR_CHAR L'H'
1516#define VT_ANSI_SCROLL_CHAR L'r'
1517
1518#endif /* _SACDRV_H_ */
unsigned char BOOLEAN
LONG NTSTATUS
Definition: precomp.h:26
@ Reboot
Definition: bl.h:891
Definition: bufpool.h:45
Definition: File.h:16
PSAC_CHANNEL CurrentChannel
Definition: conmgr.c:26
_In_ PIRP Irp
Definition: csq.h:116
#define BufferSize
Definition: mmc.h:75
#define NULL
Definition: types.h:112
#define FALSE
Definition: types.h:117
#define NTSTATUS
Definition: precomp.h:21
LONG KPRIORITY
Definition: compat.h:803
ULONG KSPIN_LOCK
Definition: env_spec_w32.h:72
#define KeWaitForSingleObject(pEvt, foo, a, b, c)
Definition: env_spec_w32.h:478
ULONG Handle
Definition: gdb_input.c:15
long __cdecl _InterlockedIncrement(_Interlocked_operand_ long volatile *_Addend)
long __cdecl _InterlockedDecrement(_Interlocked_operand_ long volatile *_Addend)
#define C_ASSERT(e)
Definition: intsafe.h:73
#define ASSERT(a)
Definition: mode.c:44
_In_ PDRIVER_UNLOAD UnloadHandler
Definition: ndis.h:4688
_In_ NDIS_STATUS EventCode
Definition: ndis.h:4751
#define KernelMode
Definition: asm.h:34
_In_ ULONG _In_ ULONG _In_ ULONG Length
Definition: ntddpcm.h:102
VOID NTAPI KeInitializeMutex(IN PKMUTEX Mutex, IN ULONG Level)
Definition: mutex.c:67
LONG NTAPI KeReleaseMutex(IN PKMUTEX Mutex, IN BOOLEAN Wait)
Definition: mutex.c:189
long LONG
Definition: pedump.c:60
char DoPrint
Definition: rsym64.c:9
struct _SAC_CHANNEL * PSAC_CHANNEL
ULONG SACDebug
Definition: data.c:15
NTSTATUS NTAPI ChannelClose(IN PSAC_CHANNEL Channel)
Definition: channel.c:558
#define SAC_CHANNEL_DESCRIPTION_SIZE
Definition: sacdrv.h:153
NTSTATUS NTAPI VTUTF8ChannelOEcho(IN PSAC_CHANNEL Channel, IN PCHAR String, IN ULONG Length)
Definition: vtutf8chan.c:1077
NTSTATUS NTAPI ChanMgrGetNextActiveChannel(IN PSAC_CHANNEL CurrentChannel, IN PULONG TargetIndex, OUT PSAC_CHANNEL *TargetChannel)
Definition: chanmgr.c:521
NTSTATUS NTAPI UTF8EncodeAndSend(IN PWCHAR String)
Definition: util.c:165
BOOLEAN NTAPI ConMgrSimpleEventMessage(IN ULONG MessageIndex, IN BOOLEAN LockHeld)
Definition: conmgr.c:252
VOID NTAPI ConMgrWorkerProcessEvents(IN PSAC_DEVICE_EXTENSION DeviceExtension)
Definition: conmgr.c:835
NTSTATUS(NTAPI * PSAC_CHANNEL_DESTROY)(IN struct _SAC_CHANNEL *Channel)
Definition: sacdrv.h:350
ULONG NTAPI RawChannelIBufferLength(IN PSAC_CHANNEL Channel)
Definition: rawchan.c:310
VOID NTAPI DoRaisePriorityCommand(IN PCHAR PrioString)
Definition: concmd.c:452
BOOLEAN NTAPI VerifyEventWaitable(IN HANDLE Handle, OUT PVOID *WaitObject, OUT PVOID *ActualWaitObject)
Definition: util.c:1172
VOID NTAPI DoChannelCommand(IN PCHAR ChannelString)
Definition: concmd.c:484
NTSTATUS NTAPI VTUTF8ChannelOFlush(IN PSAC_CHANNEL Channel)
Definition: vtutf8chan.c:725
BOOLEAN GlobalDoThreads
Definition: sacdrv.h:1243
NTSTATUS NTAPI ImposeSacCmdServiceStartTypePolicy(VOID)
Definition: util.c:1008
BOOLEAN NTAPI InitializeDeviceData(IN PDEVICE_OBJECT DeviceObject)
Definition: data.c:216
VOID NTAPI DoCrashCommand(VOID)
Definition: concmd.c:466
VOID NTAPI MyFreePool(IN PVOID *Block)
Definition: memory.c:234
enum _SAC_POST_COMMANDS SAC_POST_COMMANDS
VOID NTAPI FreeMemoryManagement(VOID)
Definition: memory.c:62
LONG CurrentChannelRefCount
Definition: conmgr.c:23
WCHAR(NTAPI * PSAC_CHANNEL_IREAD_LAST)(IN struct _SAC_CHANNEL *Channel)
Definition: sacdrv.h:409
VOID NTAPI DoGetNetInfo(IN BOOLEAN DoPrint)
Definition: concmd.c:557
ULONG Utf8ConversionBufferSize
Definition: util.c:18
VOID NTAPI DoLimitMemoryCommand(IN PCHAR LimitString)
Definition: concmd.c:459
ULONG NTAPI ChannelIBufferLength(IN PSAC_CHANNEL Channel)
Definition: channel.c:163
enum _SAC_CHANNEL_STATUS * PSAC_CHANNEL_STATUS
NTSTATUS(NTAPI * PSAC_CHANNEL_IREAD)(IN struct _SAC_CHANNEL *Channel, IN PCHAR Buffer, IN ULONG BufferSize, IN PULONG ReturnBufferSize)
Definition: sacdrv.h:387
struct _SAC_MEMORY_LIST SAC_MEMORY_LIST
BOOLEAN NTAPI ConMgrIsWriteEnabled(IN PSAC_CHANNEL Channel)
Definition: conmgr.c:155
FORCEINLINE ULONG ChannelGetFlags(IN PSAC_CHANNEL Channel)
Definition: sacdrv.h:1346
FORCEINLINE VOID SacAcquireMutexLock(VOID)
Definition: sacdrv.h:1308
NTSTATUS NTAPI PreloadGlobalMessageTable(IN PVOID ImageBase)
Definition: util.c:280
_VT_ANSI_ATTRIBUTES
Definition: sacdrv.h:1374
@ ItalicOff
Definition: sacdrv.h:1413
@ AlternateFont2
Definition: sacdrv.h:1394
@ Reserved3
Definition: sacdrv.h:1471
@ Inverse
Definition: sacdrv.h:1385
@ AlternateFont7
Definition: sacdrv.h:1399
@ SetBackColorCyan
Definition: sacdrv.h:1451
@ SetColorBlue
Definition: sacdrv.h:1429
@ SetBackColorBlack
Definition: sacdrv.h:1445
@ SetBackColor256
Definition: sacdrv.h:1458
@ AlternateFont9
Definition: sacdrv.h:1401
@ SetBackColorStart
Definition: sacdrv.h:1444
@ SetBackColorGreen
Definition: sacdrv.h:1447
@ BoldOff
Definition: sacdrv.h:1412
@ SetcolorMAgent
Definition: sacdrv.h:1430
@ OverlinedOff
Definition: sacdrv.h:1469
@ SetBackColorWhite
Definition: sacdrv.h:1452
@ AlternateFont3
Definition: sacdrv.h:1395
@ Normal
Definition: sacdrv.h:1378
@ Strikethrough
Definition: sacdrv.h:1387
@ SetColorWhite
Definition: sacdrv.h:1432
@ Reserved
Definition: sacdrv.h:1416
@ SlowBlink
Definition: sacdrv.h:1383
@ Reserved4
Definition: sacdrv.h:1472
@ SetColorBlack
Definition: sacdrv.h:1425
@ SetBackColorMax
Definition: sacdrv.h:1453
@ AlternateFont5
Definition: sacdrv.h:1397
@ InverseOff
Definition: sacdrv.h:1417
@ Encircled
Definition: sacdrv.h:1466
@ ConcealOff
Definition: sacdrv.h:1418
@ Reserved2
Definition: sacdrv.h:1470
@ SetColor256
Definition: sacdrv.h:1438
@ AlternateFont1
Definition: sacdrv.h:1393
@ SetBackColorYellow
Definition: sacdrv.h:1448
@ AlternateFont6
Definition: sacdrv.h:1398
@ DoubleUnderline
Definition: sacdrv.h:1407
@ Bold
Definition: sacdrv.h:1379
@ SetBackColorBlue
Definition: sacdrv.h:1449
@ SeTextColorDefault
Definition: sacdrv.h:1439
@ Underline
Definition: sacdrv.h:1382
@ AlternateFont8
Definition: sacdrv.h:1400
@ Alternatefont4
Definition: sacdrv.h:1396
@ SetColorYellow
Definition: sacdrv.h:1428
@ SetBackColorDefault
Definition: sacdrv.h:1459
@ Italic
Definition: sacdrv.h:1381
@ SetBackcolorMAgent
Definition: sacdrv.h:1450
@ PrimaryFont
Definition: sacdrv.h:1392
@ SetColorGreen
Definition: sacdrv.h:1427
@ SetColorRed
Definition: sacdrv.h:1426
@ Faint
Definition: sacdrv.h:1380
@ Reserved5
Definition: sacdrv.h:1473
@ Overlined
Definition: sacdrv.h:1467
@ FastBlink
Definition: sacdrv.h:1384
@ Fraktur
Definition: sacdrv.h:1406
@ UnderlineOff
Definition: sacdrv.h:1414
@ Conceal
Definition: sacdrv.h:1386
@ FramedOff
Definition: sacdrv.h:1468
@ SetColorStart
Definition: sacdrv.h:1424
@ SetColorMax
Definition: sacdrv.h:1433
@ Framed
Definition: sacdrv.h:1465
@ StrikethroughOff
Definition: sacdrv.h:1419
@ SetColorCyan
Definition: sacdrv.h:1431
@ SetBackColorRed
Definition: sacdrv.h:1446
@ BlinkOff
Definition: sacdrv.h:1415
@ Reserved1
Definition: sacdrv.h:1464
NTSTATUS NTAPI ChannelGetName(IN PSAC_CHANNEL Channel, OUT PWCHAR *Name)
Definition: channel.c:297
FORCEINLINE VOID SacAcquireLock(IN PSAC_CHANNEL_LOCK Lock)
Definition: sacdrv.h:1262
LONG SerialPortProducerIndex
Definition: sacdrv.h:1241
NTSTATUS NTAPI RegisterBlueScreenMachineInformation(VOID)
Definition: util.c:1104
BOOLEAN GlobalPagingNeeded
Definition: conmgr.c:35
NTSTATUS NTAPI ChanMgrReleaseChannel(IN PSAC_CHANNEL Channel)
Definition: chanmgr.c:243
struct _SAC_CHANNEL_ATTRIBUTES * PSAC_CHANNEL_ATTRIBUTES
struct _SAC_MACHINE_INFO SAC_MACHINE_INFO
struct _SAC_DEVICE_EXTENSION SAC_DEVICE_EXTENSION
NTSTATUS NTAPI RawChannelIRead(IN PSAC_CHANNEL Channel, IN PCHAR Buffer, IN ULONG BufferSize, IN PULONG ReturnBufferSize)
Definition: rawchan.c:246
NTSTATUS NTAPI DispatchDeviceControl(IN PDEVICE_OBJECT DeviceObject, IN PIRP Irp)
Definition: dispatch.c:21
FORCEINLINE VOID SacReleaseLock(IN PSAC_CHANNEL_LOCK Lock)
Definition: sacdrv.h:1274
KMUTEX CurrentChannelLock
Definition: conmgr.c:24
VOID NTAPI DoLockCommand(VOID)
Definition: concmd.c:498
BOOLEAN NTAPI SacTranslateUtf8ToUnicode(IN CHAR Utf8Char, IN PCHAR Utf8Buffer, OUT PWCHAR Utf8Value)
Definition: util.c:41
VOID NTAPI DoMachineInformationCommand(VOID)
Definition: concmd.c:477
NTSTATUS(NTAPI * PSAC_CHANNEL_IBUFFER_FULL)(IN struct _SAC_CHANNEL *Channel, OUT PBOOLEAN BufferStatus)
Definition: sacdrv.h:396
VOID NTAPI DoFullInfoCommand(VOID)
Definition: concmd.c:409
struct _SAC_CHANNEL_LOCK * PSAC_CHANNEL_LOCK
NTSTATUS NTAPI ChannelIRead(IN PSAC_CHANNEL Channel, IN PCHAR Buffer, IN ULONG BufferSize, IN OUT PULONG ResultBufferSize)
Definition: channel.c:131
VOID NTAPI FreeMachineInformation(VOID)
Definition: util.c:1156
NTSTATUS(NTAPI * PSAC_CHANNEL_OWRITE)(IN struct _SAC_CHANNEL *Channel, IN PCHAR String, IN ULONG Length)
Definition: sacdrv.h:379
PCHAR SerialPortBuffer
Definition: util.c:35
LONG SerialPortConsumerIndex
Definition: util.c:34
BOOLEAN NTAPI SacTranslateUnicodeToUtf8(IN PWCHAR SourceBuffer, IN ULONG SourceBufferLength, OUT PCHAR DestinationBuffer, IN ULONG DestinationBufferSize, OUT PULONG UTF8Count, OUT PULONG ProcessedCount)
Definition: util.c:91
NTSTATUS NTAPI RawChannelOWrite(IN PSAC_CHANNEL Channel, IN PCHAR String, IN ULONG Length)
Definition: rawchan.c:195
FORCEINLINE VOID SacInitializeLock(IN PSAC_CHANNEL_LOCK Lock)
Definition: sacdrv.h:1252
struct _SAC_MEMORY_LIST * PSAC_MEMORY_LIST
PSAC_MESSAGE_ENTRY GlobalMessageTable
Definition: util.c:31
VOID NTAPI SacPutString(IN PWCHAR String)
Definition: conmgr.c:41
VOID NTAPI DoRebootCommand(IN BOOLEAN Reboot)
Definition: concmd.c:355
NTSTATUS NTAPI RawChannelDestroy(IN PSAC_CHANNEL Channel)
Definition: rawchan.c:39
struct _SAC_MACHINE_INFO * PSAC_MACHINE_INFO
BOOLEAN NTAPI InitializeMemoryManagement(VOID)
Definition: memory.c:23
struct _SAC_MEMORY_ENTRY SAC_MEMORY_ENTRY
VOID NTAPI DoSetIpAddressCommand(IN PCHAR IpString)
Definition: concmd.c:564
NTSTATUS(NTAPI * PSAC_CHANNEL_OECHO)(IN struct _SAC_CHANNEL *Channel, IN PCHAR String, IN ULONG Length)
Definition: sacdrv.h:365
enum _SAC_ANSI_COMMANDS SAC_ANSI_COMMANDS
ULONG NTAPI GetMessageLineCount(IN ULONG MessageIndex)
Definition: util.c:1233
struct _SAC_MESSAGE_ENTRY * PSAC_MESSAGE_ENTRY
VOID NTAPI DoTlistCommand(VOID)
Definition: concmd.c:571
NTSTATUS NTAPI GetCommandConsoleLaunchingPermission(OUT PBOOLEAN Permission)
Definition: util.c:981
NTSTATUS NTAPI ChanMgrInitialize(VOID)
Definition: chanmgr.c:118
NTSTATUS NTAPI VTUTF8ChannelIWrite(IN PSAC_CHANNEL Channel, IN PCHAR Buffer, IN ULONG BufferSize)
Definition: vtutf8chan.c:1339
NTSTATUS NTAPI ChanMgrCreateChannel(OUT PSAC_CHANNEL *Channel, IN PSAC_CHANNEL_ATTRIBUTES Attributes)
Definition: chanmgr.c:345
NTSTATUS NTAPI ChanMgrShutdown(VOID)
Definition: chanmgr.c:144
NTSTATUS NTAPI ChannelIWrite(IN PSAC_CHANNEL Channel, IN PCHAR Buffer, IN ULONG BufferSize)
Definition: channel.c:116
NTSTATUS NTAPI VTUTF8ChannelORead(IN PSAC_CHANNEL Channel, IN PCHAR Buffer, IN ULONG BufferSize, OUT PULONG ByteCount)
Definition: vtutf8chan.c:714
VOID NTAPI InitializeMachineInformation(VOID)
Definition: util.c:692
NTSTATUS(NTAPI * PSAC_CHANNEL_OREAD)(IN struct _SAC_CHANNEL *Channel, IN PCHAR Buffer, IN ULONG BufferSize, OUT PULONG ByteCount)
Definition: sacdrv.h:356
NTSTATUS(NTAPI * PSAC_CHANNEL_OFLUSH)(IN struct _SAC_CHANNEL *Channel)
Definition: sacdrv.h:373
VOID NTAPI InitializeCmdEventInfo(VOID)
Definition: util.c:1062
enum _SAC_CHANNEL_TYPE SAC_CHANNEL_TYPE
VOID NTAPI TimerDpcRoutine(IN PKDPC Dpc, IN PVOID DeferredContext, IN PVOID SystemArgument1, IN PVOID SystemArgument2)
Definition: dispatch.c:61
VOID NTAPI FreeGlobalData(VOID)
Definition: data.c:100
NTSTATUS NTAPI ChannelDestroy(IN PSAC_CHANNEL Channel)
Definition: channel.c:77
#define SAC_CHANNEL_NAME_SIZE
Definition: sacdrv.h:152
NTSTATUS NTAPI ConMgrInitialize(VOID)
Definition: conmgr.c:163
FORCEINLINE BOOLEAN ChannelHasNewIBufferData(IN PSAC_CHANNEL Channel)
Definition: sacdrv.h:1361
PCHAR Utf8ConversionBuffer
Definition: util.c:17
NTSTATUS NTAPI ConMgrWriteData(IN PSAC_CHANNEL Channel, IN PVOID Buffer, IN ULONG BufferLength)
Definition: conmgr.c:111
NTSTATUS NTAPI VTUTF8ChannelCreate(IN PSAC_CHANNEL Channel)
Definition: vtutf8chan.c:677
ULONG(NTAPI * PSAC_CHANNEL_IBUFFER_LENGTH)(IN struct _SAC_CHANNEL *Channel)
Definition: sacdrv.h:403
FORCEINLINE VOID SacReleaseMutexLock(VOID)
Definition: sacdrv.h:1320
struct _SAC_CELL_DATA SAC_CELL_DATA
_SAC_CHANNEL_TYPE
Definition: sacdrv.h:276
@ Cmd
Definition: sacdrv.h:278
@ Raw
Definition: sacdrv.h:279
@ VtUtf8
Definition: sacdrv.h:277
NTSTATUS NTAPI RawChannelOEcho(IN PSAC_CHANNEL Channel, IN PCHAR String, IN ULONG Length)
Definition: rawchan.c:115
NTSTATUS NTAPI ConMgrShutdown(VOID)
Definition: conmgr.c:372
WCHAR NTAPI RawChannelIReadLast(IN PSAC_CHANNEL Channel)
Definition: rawchan.c:320
NTSTATUS NTAPI VTUTF8ChannelIBufferIsFull(IN PSAC_CHANNEL Channel, OUT PBOOLEAN BufferStatus)
Definition: vtutf8chan.c:1291
NTSTATUS NTAPI RawChannelCreate(IN PSAC_CHANNEL Channel)
Definition: rawchan.c:17
NTSTATUS NTAPI ChanMgrCloseChannel(IN PSAC_CHANNEL Channel)
Definition: chanmgr.c:593
ULONG NTAPI VTUTF8ChannelIBufferLength(IN PSAC_CHANNEL Channel)
Definition: vtutf8chan.c:1303
_SAC_ANSI_COMMANDS
Definition: sacdrv.h:215
@ SacFontBoldOff
Definition: sacdrv.h:224
@ SacCursorLeft
Definition: sacdrv.h:219
@ SacFontBold
Definition: sacdrv.h:223
@ SacEraseScreen
Definition: sacdrv.h:233
@ SacFontInverse
Definition: sacdrv.h:225
@ SacSetBackgroundColor
Definition: sacdrv.h:237
@ SacEraseLine
Definition: sacdrv.h:230
@ SacSetColorsAndAttributes
Definition: sacdrv.h:239
@ SacFontBlinkOff
Definition: sacdrv.h:222
@ SacCursorUp
Definition: sacdrv.h:216
@ SacFontNormal
Definition: sacdrv.h:220
@ SacCursorRight
Definition: sacdrv.h:218
@ SacSetCursorPosition
Definition: sacdrv.h:234
@ SacFontInverseOff
Definition: sacdrv.h:226
@ SacEraseEndOfLine
Definition: sacdrv.h:228
@ SacFontBlink
Definition: sacdrv.h:221
@ SacEraseEndOfScreen
Definition: sacdrv.h:231
@ SacEraseStartOfLine
Definition: sacdrv.h:229
@ SacEraseStartOfScreen
Definition: sacdrv.h:232
@ SacSetFontColor
Definition: sacdrv.h:238
@ SacCursorDown
Definition: sacdrv.h:217
@ SacBackTab
Definition: sacdrv.h:227
@ SacSetScrollRegion
Definition: sacdrv.h:235
@ SacSetColors
Definition: sacdrv.h:236
NTSTATUS NTAPI RawChannelIWrite(IN PSAC_CHANNEL Channel, IN PCHAR Buffer, IN ULONG BufferSize)
Definition: rawchan.c:343
NTSTATUS(NTAPI * PSAC_CHANNEL_CREATE)(IN struct _SAC_CHANNEL *Channel)
Definition: sacdrv.h:344
VOID NTAPI DoSetTimeCommand(IN PCHAR InputTime)
Definition: concmd.c:431
NTSTATUS NTAPI ChannelOFlush(IN PSAC_CHANNEL Channel)
Definition: channel.c:103
VOID NTAPI DoLowerPriorityCommand(IN PCHAR PrioString)
Definition: concmd.c:445
NTSTATUS NTAPI ConMgrFlushData(IN PSAC_CHANNEL Channel)
Definition: conmgr.c:139
struct _SAC_VTUTF8_SCREEN SAC_VTUTF8_SCREEN
BOOLEAN NTAPI ChannelIsEqual(IN PSAC_CHANNEL Channel, IN PSAC_CHANNEL_ID ChannelId)
Definition: channel.c:25
BOOLEAN CommandConsoleLaunchingEnabled
Definition: data.c:16
struct _SAC_MEMORY_ENTRY * PSAC_MEMORY_ENTRY
struct _SAC_CELL_DATA * PSAC_CELL_DATA
enum _SAC_CHANNEL_STATUS SAC_CHANNEL_STATUS
struct _SAC_STATIC_ESCAPE_STRING SAC_STATIC_ESCAPE_STRING
struct _SAC_CHANNEL_ATTRIBUTES SAC_CHANNEL_ATTRIBUTES
struct _SAC_VTUTF8_SCREEN * PSAC_VTUTF8_SCREEN
VOID NTAPI FreeDeviceData(IN PDEVICE_OBJECT DeviceObject)
Definition: data.c:147
FORCEINLINE LONG ChannelGetIndex(IN PSAC_CHANNEL Channel)
Definition: sacdrv.h:1353
VOID NTAPI DoCmdCommand(IN PCHAR InputString)
Definition: concmd.c:491
NTSTATUS(NTAPI * PSAC_CHANNEL_IWRITE)(IN struct _SAC_CHANNEL *Channel, IN PCHAR Buffer, IN ULONG BufferSize)
Definition: sacdrv.h:415
NTSTATUS NTAPI ChannelCreate(IN PSAC_CHANNEL Channel, IN PSAC_CHANNEL_ATTRIBUTES Attributes, IN SAC_CHANNEL_ID ChannelId)
Definition: channel.c:457
struct _SAC_CHANNEL_LOCK SAC_CHANNEL_LOCK
VOID NTAPI DoPagingCommand(VOID)
Definition: concmd.c:420
struct _SAC_CHANNEL_ID * PSAC_CHANNEL_ID
NTSTATUS NTAPI ChannelHasRedrawEvent(IN PSAC_CHANNEL Channel, OUT PBOOLEAN Present)
Definition: channel.c:209
NTSTATUS NTAPI SerialBufferGetChar(OUT PCHAR Char)
Definition: util.c:1212
NTSTATUS NTAPI ConMgrHandleEvent(IN ULONG EventCode, IN PSAC_CHANNEL Channel, OUT PVOID Data)
Definition: conmgr.c:888
enum _SAC_ANSI_DISPATCH SAC_ANSI_DISPATCH
struct _SAC_CHANNEL SAC_CHANNEL
NTSTATUS NTAPI ChannelClearRedrawEvent(IN PSAC_CHANNEL Channel)
Definition: channel.c:198
NTSTATUS NTAPI ChannelOWrite(IN PSAC_CHANNEL Channel, IN PCHAR Buffer, IN ULONG BufferSize)
Definition: channel.c:87
NTSTATUS NTAPI VTUTF8ChannelOWrite(IN PSAC_CHANNEL Channel, IN PCHAR String, IN ULONG Length)
Definition: vtutf8chan.c:1167
_SAC_ANSI_DISPATCH
Definition: sacdrv.h:246
@ SacAnsiSetColors
Definition: sacdrv.h:250
@ SacAnsiClearEndOfLine
Definition: sacdrv.h:249
@ SacAnsiClearBlinkAttribute
Definition: sacdrv.h:256
@ SacAnsiSetInverseAttribute
Definition: sacdrv.h:253
@ SacAnsiSetBoldAttribute
Definition: sacdrv.h:257
@ SacAnsiClearInverseAttribute
Definition: sacdrv.h:254
@ SacAnsiClearBoldAttribute
Definition: sacdrv.h:258
@ SacAnsiClearAttributes
Definition: sacdrv.h:252
@ SacAnsiClearScreen
Definition: sacdrv.h:247
@ SacAnsiSetBlinkAttribute
Definition: sacdrv.h:255
@ SacAnsiSetPosition
Definition: sacdrv.h:251
@ SacAnsiClearEndOfScreen
Definition: sacdrv.h:248
struct _SAC_MESSAGE_ENTRY SAC_MESSAGE_ENTRY
NTSTATUS NTAPI RawChannelIBufferIsFull(IN PSAC_CHANNEL Channel, OUT PBOOLEAN BufferStatus)
Definition: rawchan.c:297
NTSTATUS NTAPI TearDownGlobalMessageTable(VOID)
Definition: util.c:379
NTSTATUS NTAPI VTUTF8ChannelIRead(IN PSAC_CHANNEL Channel, IN PCHAR Buffer, IN ULONG BufferSize, IN PULONG ReturnBufferSize)
Definition: vtutf8chan.c:1234
BOOLEAN NTAPI InitializeGlobalData(IN PUNICODE_STRING RegistryPath, IN PDRIVER_OBJECT DriverObject)
Definition: data.c:374
WCHAR NTAPI ChannelIReadLast(IN PSAC_CHANNEL Channel)
Definition: channel.c:150
VOID NTAPI DoHelpCommand(VOID)
Definition: concmd.c:529
NTSTATUS NTAPI RawChannelORead(IN PSAC_CHANNEL Channel, IN PCHAR Buffer, IN ULONG BufferSize, OUT PULONG ByteCount)
Definition: rawchan.c:58
FORCEINLINE VOID SacInitializeMutexLock(VOID)
Definition: sacdrv.h:1297
WCHAR NTAPI VTUTF8ChannelIReadLast(IN PSAC_CHANNEL Channel)
Definition: vtutf8chan.c:1313
#define SAC_VTUTF8_ROW_HEIGHT
Definition: sacdrv.h:159
_SAC_CHANNEL_STATUS
Definition: sacdrv.h:286
@ Inactive
Definition: sacdrv.h:287
NTSTATUS NTAPI TranslateMachineInformationXML(IN PWCHAR *Buffer, IN PWCHAR ExtraData)
Definition: util.c:541
NTSTATUS NTAPI DispatchShutdownControl(IN PDEVICE_OBJECT DeviceObject, IN PIRP Irp)
Definition: dispatch.c:29
struct _SAC_DEVICE_EXTENSION * PSAC_DEVICE_EXTENSION
BOOLEAN NTAPI ChannelIsActive(IN PSAC_CHANNEL Channel)
Definition: channel.c:250
PVOID NTAPI MyAllocatePool(IN SIZE_T PoolSize, IN ULONG Tag, IN PCHAR File, IN ULONG Line)
Definition: memory.c:91
struct _SAC_CHANNEL_ID SAC_CHANNEL_ID
#define SAC_VTUTF8_COL_WIDTH
Definition: sacdrv.h:157
_SAC_POST_COMMANDS
Definition: sacdrv.h:265
@ Nothing
Definition: sacdrv.h:266
@ Restart
Definition: sacdrv.h:269
@ Shutdown
Definition: sacdrv.h:267
@ Close
Definition: sacdrv.h:268
struct _SAC_STATIC_ESCAPE_STRING * PSAC_STATIC_ESCAPE_STRING
NTSTATUS NTAPI ChannelSetRedrawEvent(IN PSAC_CHANNEL Channel)
Definition: channel.c:176
NTSTATUS NTAPI ChanMgrGetByHandle(IN SAC_CHANNEL_ID ChannelId, OUT PSAC_CHANNEL *TargetChannel)
Definition: chanmgr.c:202
NTSTATUS NTAPI VTUTF8ChannelDestroy(IN PSAC_CHANNEL Channel)
Definition: vtutf8chan.c:702
FORCEINLINE VOID SacAssertMutexLockHeld(VOID)
Definition: sacdrv.h:1286
enum _VT_ANSI_ATTRIBUTES VT_ANSI_ATTRIBUTES
BOOLEAN NTAPI SacPutSimpleMessage(IN ULONG MessageIndex)
Definition: conmgr.c:57
NTSTATUS NTAPI RawChannelOFlush(IN PSAC_CHANNEL Channel)
Definition: rawchan.c:172
VOID NTAPI DoKillCommand(IN PCHAR KillString)
Definition: concmd.c:438
VOID NTAPI KeInitializeSemaphore(IN PKSEMAPHORE Semaphore, IN LONG Count, IN LONG Limit)
Definition: semphobj.c:22
LONG NTAPI KeReleaseSemaphore(IN PKSEMAPHORE Semaphore, IN KPRIORITY Increment, IN LONG Adjustment, IN BOOLEAN Wait)
Definition: semphobj.c:54
_In_ DWORD _In_ DWORD ReturnBufferSize
Definition: setupapi.h:1897
Definition: ncftp.h:79
Definition: ketypes.h:699
Definition: typedefs.h:120
WCHAR Char
Definition: sacdrv.h:317
UCHAR CellBackColor
Definition: sacdrv.h:314
UCHAR CellForeColor
Definition: sacdrv.h:315
UCHAR CellFlags
Definition: sacdrv.h:316
SAC_CHANNEL_TYPE ChannelType
Definition: sacdrv.h:478
WCHAR DescriptionBuffer[SAC_CHANNEL_DESCRIPTION_SIZE+1]
Definition: sacdrv.h:480
WCHAR NameBuffer[SAC_CHANNEL_NAME_SIZE+1]
Definition: sacdrv.h:479
GUID ChannelGuid
Definition: sacdrv.h:296
ULONG ChannelId
Definition: sacdrv.h:297
KSEMAPHORE Lock
Definition: sacdrv.h:306
PSAC_CHANNEL_OECHO ChannelOutputEcho
Definition: sacdrv.h:463
PFILE_OBJECT FileObject
Definition: sacdrv.h:440
LONG Index
Definition: sacdrv.h:426
PSAC_CHANNEL_OREAD ChannelOutputRead
Definition: sacdrv.h:465
PVOID CloseEventObjectBody
Definition: sacdrv.h:429
PVOID RedrawEventObjectBody
Definition: sacdrv.h:438
SAC_CHANNEL_ID ChannelId
Definition: sacdrv.h:427
SAC_CHANNEL_TYPE ChannelType
Definition: sacdrv.h:441
PKEVENT HasNewDataEventWaitObjectBody
Definition: sacdrv.h:433
UCHAR CellFlags
Definition: sacdrv.h:455
HANDLE RedrawEvent
Definition: sacdrv.h:437
PSAC_CHANNEL_IWRITE ChannelInputWrite
Definition: sacdrv.h:466
HANDLE CloseEvent
Definition: sacdrv.h:428
SAC_CHANNEL_LOCK ChannelOBufferLock
Definition: sacdrv.h:472
ULONG Flags
Definition: sacdrv.h:445
WCHAR NameBuffer[SAC_CHANNEL_NAME_SIZE+1]
Definition: sacdrv.h:443
LONG ChannelHasNewIBufferData
Definition: sacdrv.h:450
UCHAR CursorCol
Definition: sacdrv.h:452
PSAC_CHANNEL_OFLUSH ChannelOutputFlush
Definition: sacdrv.h:462
PCHAR OBuffer
Definition: sacdrv.h:456
PSAC_CHANNEL_IREAD ChannelInputRead
Definition: sacdrv.h:467
PSAC_CHANNEL_IREAD_LAST ChannelInputReadLast
Definition: sacdrv.h:468
UCHAR CursorRow
Definition: sacdrv.h:451
UCHAR CellForeColor
Definition: sacdrv.h:453
SAC_CHANNEL_LOCK ChannelAttributeLock
Definition: sacdrv.h:471
HANDLE LockEvent
Definition: sacdrv.h:434
PSAC_CHANNEL_DESTROY ChannelDestroy
Definition: sacdrv.h:461
ULONG IBufferIndex
Definition: sacdrv.h:448
PCHAR IBuffer
Definition: sacdrv.h:449
SAC_CHANNEL_STATUS ChannelStatus
Definition: sacdrv.h:442
PKEVENT LockEventWaitObjectBody
Definition: sacdrv.h:436
LONG ChannelHasNewOBufferData
Definition: sacdrv.h:459
PKEVENT RedrawEventWaitObjectBody
Definition: sacdrv.h:439
ULONG OBufferFirstGoodIndex
Definition: sacdrv.h:458
PSAC_CHANNEL_IBUFFER_FULL ChannelInputBufferIsFull
Definition: sacdrv.h:469
PSAC_CHANNEL_OWRITE ChannelOutputWrite
Definition: sacdrv.h:464
SAC_CHANNEL_LOCK ChannelIBufferLock
Definition: sacdrv.h:473
PSAC_CHANNEL_CREATE ChannelCreate
Definition: sacdrv.h:460
GUID ApplicationType
Definition: sacdrv.h:446
PSAC_CHANNEL_IBUFFER_LENGTH ChannelInputBufferLength
Definition: sacdrv.h:470
HANDLE HasNewDataEvent
Definition: sacdrv.h:431
UCHAR CellBackColor
Definition: sacdrv.h:454
PVOID LockEventObjectBody
Definition: sacdrv.h:435
WCHAR DescriptionBuffer[SAC_CHANNEL_DESCRIPTION_SIZE+1]
Definition: sacdrv.h:444
ULONG OBufferIndex
Definition: sacdrv.h:457
LONG WriteEnabled
Definition: sacdrv.h:447
PVOID HasNewDataEventObjectBody
Definition: sacdrv.h:432
PKEVENT CloseEventWaitObjectBody
Definition: sacdrv.h:430
BOOLEAN PriorityFail
Definition: sacdrv.h:511
BOOLEAN Initialized
Definition: sacdrv.h:509
KSPIN_LOCK Lock
Definition: sacdrv.h:515
LIST_ENTRY List
Definition: sacdrv.h:522
HANDLE WorkerThreadHandle
Definition: sacdrv.h:518
BOOLEAN RundownInProgress
Definition: sacdrv.h:512
PEPROCESS Process
Definition: sacdrv.h:514
KEVENT WorkerThreadEvent
Definition: sacdrv.h:519
PDEVICE_OBJECT DeviceObject
Definition: sacdrv.h:508
KPRIORITY PriorityBoost
Definition: sacdrv.h:513
PWCHAR ProductType
Definition: sacdrv.h:499
PWCHAR MajorVersion
Definition: sacdrv.h:497
PWCHAR BuildNumber
Definition: sacdrv.h:498
PWCHAR MachineGuid
Definition: sacdrv.h:495
PWCHAR ProcessorArchitecture
Definition: sacdrv.h:496
PWCHAR ServicePack
Definition: sacdrv.h:500
PWCHAR MachineName
Definition: sacdrv.h:494
Definition: sacdrv.h:192
ULONG Size
Definition: sacdrv.h:195
ULONG Tag
Definition: sacdrv.h:194
ULONG Signature
Definition: sacdrv.h:193
ULONG Signature
Definition: sacdrv.h:199
PSAC_MEMORY_ENTRY LocalDescriptor
Definition: sacdrv.h:200
struct _SAC_MEMORY_LIST * Next
Definition: sacdrv.h:202
Definition: sacdrv.h:206
ULONG Index
Definition: sacdrv.h:207
PWCHAR Buffer
Definition: sacdrv.h:208
SAC_CELL_DATA Cell[SAC_VTUTF8_ROW_HEIGHT][SAC_VTUTF8_COL_WIDTH]
Definition: sacdrv.h:326
_In_ ULONG _In_ ULONG _In_ ULONG DestinationBufferSize
Definition: tdikrnl.h:1007
uint32_t * PULONG
Definition: typedefs.h:59
unsigned char * PBOOLEAN
Definition: typedefs.h:53
#define NTAPI
Definition: typedefs.h:36
ULONG_PTR SIZE_T
Definition: typedefs.h:80
#define IN
Definition: typedefs.h:39
uint16_t * PWCHAR
Definition: typedefs.h:56
uint32_t ULONG
Definition: typedefs.h:59
#define OUT
Definition: typedefs.h:40
char * PCHAR
Definition: typedefs.h:51
_Must_inspect_result_ _In_ WDFDMAENABLER _In_ _In_opt_ PWDF_OBJECT_ATTRIBUTES Attributes
_In_ PDEVICE_OBJECT DeviceObject
Definition: wdfdevice.h:2055
_Must_inspect_result_ _In_ WDFDEVICE _In_ BOOLEAN _In_opt_ PVOID Tag
Definition: wdfdevice.h:4065
_Must_inspect_result_ _In_ WDFDEVICE _In_ DEVICE_REGISTRY_PROPERTY _In_ ULONG BufferLength
Definition: wdfdevice.h:3771
_Must_inspect_result_ _In_ WDFDEVICE _In_ WDFSTRING String
Definition: wdfdevice.h:2433
_Must_inspect_result_ _In_ PWDF_DPC_CONFIG _In_ PWDF_OBJECT_ATTRIBUTES _Out_ WDFDPC * Dpc
Definition: wdfdpc.h:112
_Must_inspect_result_ _In_ PDRIVER_OBJECT _In_ PCUNICODE_STRING RegistryPath
Definition: wdfdriver.h:215
_Must_inspect_result_ _In_ PDRIVER_OBJECT DriverObject
Definition: wdfdriver.h:213
_In_ WDFMEMORY _Out_opt_ size_t * BufferSize
Definition: wdfmemory.h:254
_Must_inspect_result_ _In_opt_ PWDF_OBJECT_ATTRIBUTES _Out_ WDFWAITLOCK * Lock
Definition: wdfsync.h:127
#define FORCEINLINE
Definition: wdftypes.h:67
#define GetMessage
Definition: winuser.h:5802
_In_ USHORT _In_ ULONG _In_ PSOCKADDR _In_ PSOCKADDR _Reserved_ ULONG _In_opt_ PVOID _In_opt_ const WSK_CLIENT_CONNECTION_DISPATCH * Dispatch
Definition: wsk.h:188
_Must_inspect_result_ typedef _In_ PHYSICAL_ADDRESS _In_ LARGE_INTEGER ByteCount
Definition: iotypes.h:1099
* PFILE_OBJECT
Definition: iotypes.h:1998
#define SEMAPHORE_INCREMENT
Definition: iotypes.h:610
@ Executive
Definition: ketypes.h:415
_In_opt_ PVOID _In_opt_ PVOID SystemArgument1
Definition: ketypes.h:688
_In_opt_ PVOID DeferredContext
Definition: ketypes.h:687
_In_opt_ PVOID _In_opt_ PVOID _In_opt_ PVOID SystemArgument2
Definition: ketypes.h:689
_In_ ULONG _In_ BOOLEAN Active
Definition: potypes.h:561
unsigned char UCHAR
Definition: xmlstorage.h:181
__wchar_t WCHAR
Definition: xmlstorage.h:180
char CHAR
Definition: xmlstorage.h:175