/*++ Copyright (c) Microsoft Corporation. All rights reserved. Module Name: NetPowerOffloadList.h Environment: user mode NOTE: This header is generated by stubwork. To modify contents, add or remove or tags in the corresponding .x and .y template files. --*/ #pragma once #ifndef WDF_EXTERN_C #ifdef __cplusplus #define WDF_EXTERN_C extern "C" #define WDF_EXTERN_C_START extern "C" { #define WDF_EXTERN_C_END } #else #define WDF_EXTERN_C #define WDF_EXTERN_C_START #define WDF_EXTERN_C_END #endif #endif WDF_EXTERN_C_START typedef struct _NET_POWER_OFFLOAD_LIST { ULONG Size; void * Reserved[4]; } NET_POWER_OFFLOAD_LIST; inline void NET_POWER_OFFLOAD_LIST_INIT( _Out_ NET_POWER_OFFLOAD_LIST * List ) { RtlZeroMemory(List, sizeof(*List)); List->Size = sizeof(*List); } // // NET Function: NetDeviceGetPowerOffloadList // typedef _IRQL_requires_(PASSIVE_LEVEL) WDFAPI void (NTAPI *PFN_NETDEVICEGETPOWEROFFLOADLIST)( _In_ PNET_DRIVER_GLOBALS DriverGlobals, _In_ WDFDEVICE Device, _Inout_ NET_POWER_OFFLOAD_LIST* List ); _IRQL_requires_(PASSIVE_LEVEL) FORCEINLINE void NetDeviceGetPowerOffloadList( _In_ WDFDEVICE Device, _Inout_ NET_POWER_OFFLOAD_LIST* List ) { #if defined(NET_EVERYTHING_ALWAYS_AVAILABLE) ((PFN_NETDEVICEGETPOWEROFFLOADLIST) NetFunctions[NetDeviceGetPowerOffloadListTableIndex])(NetDriverGlobals, Device, List); #else if (NET_IS_FUNCTION_AVAILABLE(NetDeviceGetPowerOffloadList)) { ((PFN_NETDEVICEGETPOWEROFFLOADLIST) NetFunctions[NetDeviceGetPowerOffloadListTableIndex])(NetDriverGlobals, Device, List); } else { ((PFN_WDFDRIVERERRORREPORTAPIMISSING) WdfFunctions[WdfDriverErrorReportApiMissingTableIndex])(WdfDriverGlobals, WdfGetDriver(), NetFrameworkExtensionName, NetDeviceGetPowerOffloadListTableIndex, FALSE); } #endif } // // NET Function: NetPowerOffloadListGetCount // typedef _IRQL_requires_(PASSIVE_LEVEL) WDFAPI SIZE_T (NTAPI *PFN_NETPOWEROFFLOADLISTGETCOUNT)( _In_ PNET_DRIVER_GLOBALS DriverGlobals, _In_ CONST NET_POWER_OFFLOAD_LIST* List ); _IRQL_requires_(PASSIVE_LEVEL) FORCEINLINE SIZE_T NetPowerOffloadListGetCount( _In_ CONST NET_POWER_OFFLOAD_LIST* List ) { #if defined(NET_EVERYTHING_ALWAYS_AVAILABLE) return ((PFN_NETPOWEROFFLOADLISTGETCOUNT) NetFunctions[NetPowerOffloadListGetCountTableIndex])(NetDriverGlobals, List); #else if (NET_IS_FUNCTION_AVAILABLE(NetPowerOffloadListGetCount)) { return ((PFN_NETPOWEROFFLOADLISTGETCOUNT) NetFunctions[NetPowerOffloadListGetCountTableIndex])(NetDriverGlobals, List); } else { ((PFN_WDFDRIVERERRORREPORTAPIMISSING) WdfFunctions[WdfDriverErrorReportApiMissingTableIndex])(WdfDriverGlobals, WdfGetDriver(), NetFrameworkExtensionName, NetPowerOffloadListGetCountTableIndex, FALSE); return (SIZE_T)0; } #endif } // // NET Function: NetPowerOffloadListGetElement // typedef _IRQL_requires_(PASSIVE_LEVEL) WDFAPI NETPOWEROFFLOAD (NTAPI *PFN_NETPOWEROFFLOADLISTGETELEMENT)( _In_ PNET_DRIVER_GLOBALS DriverGlobals, _In_ CONST NET_POWER_OFFLOAD_LIST* List, _In_ SIZE_T Index ); _IRQL_requires_(PASSIVE_LEVEL) FORCEINLINE NETPOWEROFFLOAD NetPowerOffloadListGetElement( _In_ CONST NET_POWER_OFFLOAD_LIST* List, _In_ SIZE_T Index ) { #if defined(NET_EVERYTHING_ALWAYS_AVAILABLE) return ((PFN_NETPOWEROFFLOADLISTGETELEMENT) NetFunctions[NetPowerOffloadListGetElementTableIndex])(NetDriverGlobals, List, Index); #else if (NET_IS_FUNCTION_AVAILABLE(NetPowerOffloadListGetElement)) { return ((PFN_NETPOWEROFFLOADLISTGETELEMENT) NetFunctions[NetPowerOffloadListGetElementTableIndex])(NetDriverGlobals, List, Index); } else { ((PFN_WDFDRIVERERRORREPORTAPIMISSING) WdfFunctions[WdfDriverErrorReportApiMissingTableIndex])(WdfDriverGlobals, WdfGetDriver(), NetFrameworkExtensionName, NetPowerOffloadListGetElementTableIndex, FALSE); return (NETPOWEROFFLOAD)0; } #endif } WDF_EXTERN_C_END