|
ReactOS 0.4.17-dev-1281-g065abb3
|
#include <pshpack1.h>#include <poppack.h>

Go to the source code of this file.
Classes | |
| struct | HubDescContext |
| struct | HubLpmInfo |
| struct | HubMsOs20SetInfo |
| struct | HubPlatformFeatures |
| struct | HubMsOs20Common |
| struct | HubMsOs20SetHeader |
| struct | HubMsOs20Subset |
| struct | HubMsOs20CompatibleId |
| struct | HubMsOs20Registry |
| struct | HubMsOs20ResumeTime |
| struct | HubMsOs20ModelId |
| struct | HubMsOs20Ccgp |
| struct | HubMsOsString |
| struct | HubMsOsHeader |
| struct | HubMsOsContainerId |
| struct | HubMsOsExtConfigHeader |
| struct | HubMsOsExtConfigFunction |
| struct | HubMsOsExtConfig |
| struct | HubBosInfo |
| struct | HubMsOs20Info |
Macros | |
| #define | HUB_DESC_BITMAP_ULONGS 8 |
| #define | HUB_BOS_SUPERSPEED_CAPABLE 0x00000001 |
| #define | HUB_BOS_ENHANCED_SUPERSPEED_CAPABLE 0x00000002 |
| #define | HUB_BOS_CHARGING_POLICY 0x00000004 |
| #define | HUB_MSOS20_SET_INFO 0x00000001 |
| #define | HUB_MSOS20_SET_HEADER 0x00000002 |
| #define | HUB_MSOS20_ALT_ENUM 0x00000004 |
| #define | HUB_MSOS20_CONFIG_SUBSET 0x00000008 |
| #define | HUB_MSOS20_FUNCTION_SUBSET 0x00000010 |
| #define | HUB_MSOS20_COMPATIBLE_ID 0x00000020 |
| #define | HUB_MSOS20_REGISTRY 0x00000040 |
| #define | HUB_MSOS20_RESUME_TIME 0x00000080 |
| #define | HUB_MSOS20_MODEL_ID 0x00000100 |
| #define | HUB_MSOS20_CCGP 0x00000200 |
Typedefs | |
| typedef VOID(NTAPI * | PFN_HUB_DESC_LOG) (_In_opt_ PVOID Context, _In_ HubDescCode Code, _In_ BOOLEAN Warning) |
| #define HUB_BOS_CHARGING_POLICY 0x00000004 |
Definition at line 318 of file desccheck.h.
| #define HUB_BOS_ENHANCED_SUPERSPEED_CAPABLE 0x00000002 |
Definition at line 317 of file desccheck.h.
| #define HUB_BOS_SUPERSPEED_CAPABLE 0x00000001 |
Definition at line 316 of file desccheck.h.
| #define HUB_DESC_BITMAP_ULONGS 8 |
Definition at line 263 of file desccheck.h.
| #define HUB_MSOS20_ALT_ENUM 0x00000004 |
Definition at line 490 of file desccheck.h.
| #define HUB_MSOS20_CCGP 0x00000200 |
Definition at line 497 of file desccheck.h.
| #define HUB_MSOS20_COMPATIBLE_ID 0x00000020 |
Definition at line 493 of file desccheck.h.
| #define HUB_MSOS20_CONFIG_SUBSET 0x00000008 |
Definition at line 491 of file desccheck.h.
| #define HUB_MSOS20_FUNCTION_SUBSET 0x00000010 |
Definition at line 492 of file desccheck.h.
| #define HUB_MSOS20_MODEL_ID 0x00000100 |
Definition at line 496 of file desccheck.h.
| #define HUB_MSOS20_REGISTRY 0x00000040 |
Definition at line 494 of file desccheck.h.
| #define HUB_MSOS20_RESUME_TIME 0x00000080 |
Definition at line 495 of file desccheck.h.
| #define HUB_MSOS20_SET_HEADER 0x00000002 |
Definition at line 489 of file desccheck.h.
| #define HUB_MSOS20_SET_INFO 0x00000001 |
Definition at line 488 of file desccheck.h.
| typedef VOID(NTAPI * PFN_HUB_DESC_LOG) (_In_opt_ PVOID Context, _In_ HubDescCode Code, _In_ BOOLEAN Warning) |
Logging hook. Called for every finding after the bitmap bit is set.
Definition at line 267 of file desccheck.h.
|
strong |
Definition at line 14 of file desccheck.h.
| _In_reads_bytes_ | ( | Length | ) |
| _Inout_updates_bytes_ | ( | Length | ) |
| _IRQL_requires_ | ( | PASSIVE_LEVEL | ) | const |
Whole BOS set. Outputs are filled even on FALSE, and a Billboard capability with bLength 40 or 44 gets its bLength fixed in the buffer.
MS OS 2.0 descriptor set. SetInfo is the entry the BOS walk selected; on failure Info->Flags is cleared.
| C_ASSERT | ( | sizeof(HubMsOs20CompatibleId) | = =20 | ) |
| C_ASSERT | ( | sizeof(HubMsOs20SetHeader) | = =10 | ) |
| C_ASSERT | ( | sizeof(HubMsOs20SetInfo) | = =8 | ) |
| C_ASSERT | ( | sizeof(HubMsOs20Subset) | = =8 | ) |
| C_ASSERT | ( | sizeof(HubMsOsContainerId) | = =24 | ) |
| C_ASSERT | ( | sizeof(HubMsOsExtConfig) | = =40 | ) |
| C_ASSERT | ( | sizeof(HubMsOsExtConfigHeader) | = =16 | ) |
| C_ASSERT | ( | sizeof(HubMsOsString) | = =18 | ) |
| C_ASSERT | ( | sizeof(HubPlatformFeatures) | = =26 | ) |
| BOOLEAN NTAPI HubDescCheck20Hub | ( | _In_ const HubDescContext * | Context, |
| _In_reads_bytes_opt_(Length) PUSB_HUB_DESCRIPTOR | Descriptor, | ||
| _In_ ULONG | Length | ||
| ) |
USB 2.0 hub descriptor. Hub ParseHubDescriptor for Full and High speed hubs.
Definition at line 3198 of file desccheck.cpp.
Referenced by HubCheckUsb2HubDescriptor().
| BOOLEAN NTAPI HubDescCheck30Hub | ( | _In_ const HubDescContext * | Context, |
| _In_reads_bytes_opt_(Length) PUSB_30_HUB_DESCRIPTOR | Descriptor, | ||
| _In_ ULONG | Length | ||
| ) |
USB 3.0 hub descriptor. Hub ParseHubDescriptor for SuperSpeed hubs.
Definition at line 3272 of file desccheck.cpp.
Referenced by HubCheckUsb3HubDescriptor().
| BOOLEAN NTAPI HubDescCheckBosHeader | ( | _In_ const HubDescContext * | Context, |
| _In_reads_bytes_opt_(Length) PUSB_BOS_DESCRIPTOR | Descriptor, | ||
| _In_ ULONG | Length | ||
| ) |
The 5 byte BOS header on its own. BosHeaderValid.
Definition at line 2197 of file desccheck.cpp.
Referenced by DeviceMachine::BosHeaderValid().
| BOOLEAN NTAPI HubDescCheckConfiguration | ( | _In_ const HubDescContext * | Context, |
| _In_reads_bytes_opt_(Length) PUSB_CONFIGURATION_DESCRIPTOR | Descriptor, | ||
| _In_ ULONG | Length, | ||
| _Out_opt_ PBOOLEAN | SupportsStreams | ||
| ) |
Whole configuration descriptor set. SupportsStreams reflects the last companion.
Definition at line 1237 of file desccheck.cpp.
Referenced by DeviceMachine::ConfigDescriptorValid(), HubCheckConfigDescriptor(), and HubValidateHubConfiguration().
| BOOLEAN NTAPI HubDescCheckDevice | ( | _In_ const HubDescContext * | Context, |
| _In_reads_bytes_opt_(Length) PUSB_DEVICE_DESCRIPTOR | Descriptor, | ||
| _In_ ULONG | Length, | ||
| _Inout_opt_ PBOOLEAN | IsBillboard | ||
| ) |
Device descriptor. Length is the bytes returned; IsBillboard is only ever set TRUE.
Definition at line 1367 of file desccheck.cpp.
Referenced by DeviceMachine::DeviceDescriptorValid(), and DeviceMachine::FirstDescriptorValid().
| BOOLEAN NTAPI HubDescCheckMsOsContainerId | ( | _In_ const HubDescContext * | Context, |
| _In_reads_bytes_(Length) const HubMsOsContainerId * | Descriptor, | ||
| _In_ ULONG | Length | ||
| ) |
MS OS 1.0 container ID. ContainerIdKnown.
Definition at line 2541 of file desccheck.cpp.
Referenced by DeviceMachine::ContainerIdKnown().
| BOOLEAN NTAPI HubDescCheckMsOsContainerIdHeader | ( | _In_ const HubDescContext * | Context, |
| _In_reads_bytes_(Length) const HubMsOsHeader * | Descriptor, | ||
| _In_ ULONG | Length | ||
| ) |
MS OS 1.0 container ID header. ContainerIdHeaderValid.
Definition at line 2505 of file desccheck.cpp.
Referenced by DeviceMachine::ContainerIdHeaderValid().
| BOOLEAN NTAPI HubDescCheckMsOsExtConfig | ( | _In_ const HubDescContext * | Context, |
| _In_reads_bytes_(sizeof(HubMsOsExtConfig)) const HubMsOsExtConfig * | Descriptor, | ||
| _In_ ULONG | Length | ||
| ) |
MS OS 1.0 extended configuration. The buffer must hold the 40 bytes the validated header promised, whatever Length says.
Definition at line 2606 of file desccheck.cpp.
Referenced by DeviceMachine::ExtendedConfigValid().
| BOOLEAN NTAPI HubDescCheckMsOsExtConfigHeader | ( | _In_ const HubDescContext * | Context, |
| _In_reads_bytes_(Length) const HubMsOsExtConfigHeader * | Descriptor, | ||
| _In_ ULONG | Length | ||
| ) |
MS OS 1.0 extended configuration header. ExtendedConfigHeaderValid.
Definition at line 2563 of file desccheck.cpp.
Referenced by DeviceMachine::ExtendedConfigHeaderValid().
| BOOLEAN NTAPI HubDescCheckMsOsString | ( | _In_ const HubDescContext * | Context, |
| _In_ const HubMsOsString * | Descriptor | ||
| ) |
MS OS string descriptor (index 0xEE): signature only. MsOsDescriptorValid.
Definition at line 2490 of file desccheck.cpp.
Referenced by DeviceMachine::MsOsDescriptorValid().
| BOOLEAN NTAPI HubDescCheckSerialNumber | ( | _In_ const HubDescContext * | Context, |
| _In_reads_bytes_ *Length PUSB_STRING_DESCRIPTOR | Descriptor, | ||
| _Inout_ PULONG | Length | ||
| ) |
Serial number string. Length is the bytes returned on entry and the string bytes plus room for a NUL on success.
Definition at line 2418 of file desccheck.cpp.
Referenced by DeviceMachine::SerialNumberValid().
| BOOLEAN NTAPI HubDescCheckString | ( | _In_ const HubDescContext * | Context, |
| _In_reads_bytes_(Length) PUSB_STRING_DESCRIPTOR | Descriptor, | ||
| _In_ ULONG | Length, | ||
| _Out_opt_ PULONG | AdjustedLength | ||
| ) |
String descriptor. AdjustedLength is the usable byte count.
Definition at line 2400 of file desccheck.cpp.
Referenced by DeviceMachine::AltModeStringValid(), DeviceMachine::BillboardStringValid(), and HubCacheString().
| PCSTR NTAPI HubDescCodeName | ( | _In_ HubDescCode | Code | ) |
Name of a finding for debug prints.
Definition at line 128 of file desccheck.cpp.
Referenced by HubDescLog(), and HubLogHubFinding().
| PUSB_COMMON_DESCRIPTOR NTAPI HubDescFind | ( | _In_reads_bytes_(TotalLength) PVOID | Buffer, |
| _In_ ULONG | TotalLength, | ||
| _In_ PVOID | Position, | ||
| _In_ UCHAR | Type | ||
| ) |
First descriptor of Type at or after Position, or NULL. Stops on a zero bLength.
Definition at line 3333 of file desccheck.cpp.
Referenced by HubDescFindInterface().
| PUSB_INTERFACE_DESCRIPTOR NTAPI HubDescFindInterface | ( | _In_ PUSB_CONFIGURATION_DESCRIPTOR | Config, |
| _In_ PVOID | Position, | ||
| _In_ LONG | Number, | ||
| _In_ LONG | Alternate, | ||
| _In_ LONG | Class, | ||
| _In_ LONG | SubClass, | ||
| _In_ LONG | Protocol, | ||
| _Out_opt_ PBOOLEAN | HasAlternates | ||
| ) |
First matching interface at or after Position; -1 matches anything. HasAlternates is TRUE when that interface number has other settings.
Definition at line 3371 of file desccheck.cpp.
Referenced by HubPickCompatIdInterface(), DeviceMachine::PrepareConfigLists(), and DeviceMachine::PrepareInterfaceLists().
| VOID NTAPI HubDescInitDeviceContext | ( | _Out_ HubDescContext * | Context, |
| _In_ USHORT | BcdUsb, | ||
| _In_ USB_DEVICE_SPEED | Speed, | ||
| _In_ BOOLEAN | Win8Behavior, | ||
| _In_ ULONG | SspIsochBurstCount, | ||
| _In_opt_ PULONG | Bitmap | ||
| ) |
Device context: reads the global strictness flags. Set Log and LogContext afterwards.
Definition at line 91 of file desccheck.cpp.
Referenced by HubCheckConfigDescriptor(), HubDeviceDescContext(), and DeviceMachine::SerialNumberValid().
| VOID NTAPI HubDescInitHubContext | ( | _Out_ HubDescContext * | Context, |
| _In_ USHORT | BcdUsb, | ||
| _In_ USB_DEVICE_SPEED | Speed | ||
| ) |
Hub context: version and speed only, global flags are never applied.
Definition at line 112 of file desccheck.cpp.
Referenced by HubBuildDescContext().
| VOID NTAPI HubDescLog | ( | _In_ const HubDescContext * | Context, |
| _In_ HubDescCode | Code, | ||
| _In_ BOOLEAN | Warning | ||
| ) |
Records one finding: sets the bitmap bit and calls the log hook.
Definition at line 383 of file desccheck.cpp.
Referenced by CheckBillboardCap(), CheckHeader(), CheckMsOs20Ccgp(), CheckMsOs20CompatibleId(), CheckMsOs20Id(), CheckMsOs20ModelId(), CheckMsOs20Platform(), CheckMsOs20Registry(), CheckMsOs20ResumeTime(), CheckMsOs20SetHeader(), CheckMsOs20Subset(), DeviceMachine::ConfigDescriptorValid(), HubDescCheck20Hub(), HubDescCheck30Hub(), HubDescCheckConfiguration(), HubDescCheckDevice(), HubDescCheckMsOsContainerId(), HubDescCheckMsOsContainerIdHeader(), HubDescCheckMsOsExtConfig(), HubDescCheckMsOsExtConfigHeader(), HubDescCheckSerialNumber(), HubLogConfigTotalLengthMismatch(), if(), Note(), NoteFatal(), WalkMsOs20Set(), and while().
Steps to the next MS OS 2.0 descriptor, or NULL at End. FALSE when a length runs past End.
Definition at line 2647 of file desccheck.cpp.
Referenced by CheckMsOs20Subset(), DeviceMachine::InstallMsOs20Values(), and WalkMsOs20Set().
| _In_ ULONG _Out_opt_ HubBosInfo _Out_opt_ PUSHORT _Out_opt_ PUSHORT _Inout_opt_ PBOOLEAN _Inout_opt_ HubLpmInfo _Inout_opt_ PULONG DeviceFlags |
Definition at line 588 of file desccheck.h.
Definition at line 583 of file desccheck.h.
Definition at line 582 of file desccheck.h.
| _In_ ULONG _Out_opt_ HubBosInfo _Out_opt_ PUSHORT _Out_opt_ PUSHORT _Inout_opt_ PBOOLEAN _Inout_opt_ HubLpmInfo* Lpm |
Definition at line 587 of file desccheck.h.
| _In_ ULONG _Out_opt_ HubBosInfo _Out_opt_ PUSHORT _Out_opt_ PUSHORT _Inout_opt_ PBOOLEAN LtmCapable |
Definition at line 586 of file desccheck.h.
| _In_ ULONG _In_ const HubMsOs20SetInfo* SetInfo |
Definition at line 663 of file desccheck.h.
Definition at line 584 of file desccheck.h.
Definition at line 585 of file desccheck.h.