20#if defined(__cplusplus)
26#if defined(WIN32) && !defined(__MINGW32__)
27 #define DLLCALLCONV __stdcall
28 #if !defined(_SAL_VERSION)
44 #define WD_DRIVER_NAME_PREFIX "\\\\.\\"
46 #define WD_DRIVER_NAME_PREFIX "/dev/"
48 #define WD_DRIVER_NAME_PREFIX ""
52 #define __FUNCTION__ __func__
55#define WD_DEFAULT_DRIVER_NAME_BASE "windrvr" WD_VER_ITOA
56#define WD_DEFAULT_DRIVER_NAME \
57 WD_DRIVER_NAME_PREFIX WD_DEFAULT_DRIVER_NAME_BASE
59#define WD_MAX_DRIVER_NAME_LENGTH 128
60#define WD_MAX_KP_NAME_LENGTH 128
61#define WD_VERSION_STR_LENGTH 128
63#if defined(WD_DRIVER_NAME_CHANGE)
105 #define WD_DRIVER_NAME WD_DriverName(NULL)
107 #define WD_DRIVER_NAME WD_DEFAULT_DRIVER_NAME
110#define WD_PROD_NAME "WinDriver"
119#error No platform is defined. Please define either x86, x86_64, ARM or ARM64.
121#if (defined(x86_64) && defined (ARM64)) || \
122 (defined(x86_64) && defined (ARM)) || \
123 (defined(x86_64) && defined (x86)) || \
124 (defined(ARM64) && defined (x86)) || \
125 (defined(ARM64) && defined (ARM)) || \
126 (defined(x86) && defined(ARM))
127#error Cannot have more than one platform defined in a WinDriver compilation.
132 #define WD_CPU_SPEC " x86_64"
134 #define WD_CPU_SPEC " ARM"
136 #define WD_CPU_SPEC " ARM64"
138 #define WD_CPU_SPEC " X86"
142 #define WD_FILE_FORMAT " sys"
144 #define WD_FILE_FORMAT " kext"
146 #define WD_FILE_FORMAT " ko"
149#if defined(KERNEL_64BIT)
150 #define WD_DATA_MODEL " 64bit"
152 #define WD_DATA_MODEL " 32bit"
155#if defined(__KERNEL__) && defined(WINNT)
156 #if (NTDDI_VERSION >= NTDDI_WIN10_VB)
157 #define WD_VER_STR_SUFFIX ""
159 #define WD_VER_STR_SUFFIX " for Windows 10 (Build 18632 and Lower)"
162 #define WD_VER_STR_SUFFIX ""
165#define WD_VER_STR WD_PROD_NAME " v" WD_VERSION_STR \
166 " Jungo Connectivity (c) 1997 - " COPYRIGHTS_YEAR_STR \
167 " Build Date: " __DATE__ \
168 WD_CPU_SPEC WD_DATA_MODEL WD_FILE_FORMAT WD_VER_STR_SUFFIX
170#if !defined(POSIX) && defined(LINUX)
174#if !defined(UNIX) && defined(POSIX)
178#if !defined(WIN32) && defined(WINNT)
182#if !defined(WIN32) && !defined(UNIX) && !defined(APPLE)
186#if defined(_KERNEL_MODE) && !defined(KERNEL)
190#if defined(KERNEL) && !defined(__KERNEL__)
194#if defined(_KERNEL) && !defined(__KERNEL__)
198#if defined( __KERNEL__) && !defined(_KERNEL)
202#if defined(LINUX) && defined(__x86_64__) && !defined(__KERNEL__)
205 __asm__(
".symver memcpy,memcpy@GLIBC_2.2.5");
211 #if !defined(__P_TYPES__)
216 typedef unsigned char UCHAR;
217 typedef unsigned short USHORT;
218 typedef unsigned int UINT;
219 #if !defined (APPLE_USB)
220 typedef unsigned long ULONG;
224 typedef unsigned char *PBYTE;
227 typedef unsigned short *PWORD;
228 typedef u32 DWORD, *PDWORD;
229 typedef PVOID HANDLE;
231 #if !defined(__KERNEL__)
245 #if defined(__KERNEL__)
249 #include <asm-generic/ioctl.h>
250 #include <asm-generic/errno.h>
255 #include <sys/ioctl.h>
256 #include <sys/mman.h>
258 #include <sys/types.h>
259 #include <sys/stat.h>
262 typedef unsigned long long UINT64;
264 #include <libkern/OSTypes.h>
265 #include <libkern/OSAtomic.h>
266 typedef UInt16 UINT16;
271 #include <IOKit/IOTypes.h>
272 #if defined(__KERNEL__)
273 typedef struct OSObject* FILEHANDLE;
274 typedef UInt32 PRCHANDLE;
276 #include <IOKit/IOKitLib.h>
279 kWinDriverMethodSyncIoctl = 0,
280 kWinDriverNumOfMethods,
282 #if !defined(__KERNEL__)
295 #define PTR2INT(value) ((UInt64)(value))
297 #define PTR2INT(value) ((UInt32)(value))
299 #define MAC_UC_MAGIC_MASK 0xFF0000FF
300 #define MAC_UC_MAGIC_NUM 0x7E000041
301 #define MAC_UC_64BIT_APP 0x100
305 #if defined(__KERNEL__)
306 #if !defined (CMAKE_WD_BUILD)
307 int sprintf(
char *buffer,
const char *format, ...);
311 #include <winioctl.h>
313 #define stricmp _stricmp
317#if !defined(__KERNEL__)
319 #if !defined(va_copy) && !defined(__va_copy)
320 #define va_copy(ap2,ap1) (ap2)=(ap1)
322 #if !defined(va_copy) && defined(__va_copy)
323 #define va_copy __va_copy
331#if !defined(_WINDEF_)
333 typedef unsigned short int WORD;
336#if !defined(_BASETSD_H_)
349#if defined(KERNEL_64BIT)
369#if defined(KERNEL_64BIT)
376 typedef unsigned long UPTR;
434 #define DMA_BIT_MASK(n) (((n) == 64) ? ~0ULL : ((1ULL<<(n))-1))
493#define DMA_ADDRESS_WIDTH_MASK 0x7f000000
495#define DMA_OPTIONS_ALL \
496 (DMA_KERNEL_BUFFER_ALLOC | DMA_KBUF_BELOW_16M | DMA_LARGE_BUFFER \
497 | DMA_ALLOW_CACHE | DMA_KERNEL_ONLY_MAP | DMA_FROM_DEVICE | DMA_TO_DEVICE \
498 | DMA_ALLOW_64BIT_ADDRESS | DMA_ALLOW_NO_HCARD | DMA_GET_EXISTING_BUF \
499 | DMA_RESERVED_MEM | DMA_KBUF_ALLOC_SPECIFY_ADDRESS_WIDTH \
500 | DMA_ADDRESS_WIDTH_MASK)
502#define DMA_DIRECTION_MASK DMA_TO_FROM_DEVICE
505#define DMA_READ_FROM_DEVICE DMA_FROM_DEVICE
506#define DMA_WRITE_TO_DEVICE DMA_TO_DEVICE
508#define DMA_OPTIONS_ADDRESS_WIDTH_SHIFT 24
519#if defined (i386) && defined(KERNEL_64BIT)
520 #define PAD_TO_64(pName) DWORD dwPad_##pName;
522 #define PAD_TO_64(pName)
557 PVOID DMATransactionCallbackCtx;
561 DWORD dwMaxTransferSize;
562 DWORD dwTransferElementSize;
563 DWORD dwBytesTransferred;
665 DWORD dwEnabledIntType;
674#define WD_LICENSE_LENGTH 3072
733 UPTR pUserDirectAddr;
782 DWORD fCheckLockOnly;
787 CHAR cDescription[100];
790#define WD_PROCESS_NAME_LENGTH 128
956 DWORD dwMicroSeconds;
1014 DWORD dwLevelMessageBox;
1019#define DEBUG_USER_BUF_LEN 2048
1034 DWORD hKernelPlugIn;
1482#define WD_IPC_ALL_MSG (WD_IPC_UNICAST_MSG | WD_IPC_MULTICAST_MSG)
1490#define WD_ACTIONS_POWER (WD_POWER_CHANGED_D0 | WD_POWER_CHANGED_D1 | \
1491 WD_POWER_CHANGED_D2 | WD_POWER_CHANGED_D3 | WD_POWER_SYSTEM_WORKING | \
1492 WD_POWER_SYSTEM_SLEEPING1 | WD_POWER_SYSTEM_SLEEPING3 | \
1493 WD_POWER_SYSTEM_HIBERNATE | WD_POWER_SYSTEM_SHUTDOWN)
1494#define WD_ACTIONS_ALL (WD_ACTIONS_POWER | WD_INSERT | WD_REMOVE)
1512 DWORD hKernelPlugIn;
1539 DWORD dwNumMatchTables;
1545 DWORD applications_num;
1556 #define BZERO(buf) memset(&(buf), 0, sizeof(buf))
1559#ifndef INVALID_HANDLE_VALUE
1560 #define INVALID_HANDLE_VALUE ((HANDLE)(-1))
1564 #define CTL_CODE(DeviceType, Function, Method, Access) ( \
1565 ((DeviceType)<<16) | ((Access)<<14) | ((Function)<<2) | (Method) \
1568 #define METHOD_BUFFERED 0
1569 #define METHOD_IN_DIRECT 1
1570 #define METHOD_OUT_DIRECT 2
1571 #define METHOD_NEITHER 3
1572 #define FILE_ANY_ACCESS 0
1573 #define FILE_READ_ACCESS 1
1574 #define FILE_WRITE_ACCESS 2
1577#if defined(LINUX) && defined(KERNEL_64BIT)
1579 #define WD_CTL_CODE(wFuncNum) \
1580 _IOC(_IOC_READ|_IOC_WRITE, WD_TYPE, wFuncNum, 0)
1581 #define WD_CTL_DECODE_FUNC(IoControlCode) _IOC_NR(IoControlCode)
1582 #define WD_CTL_DECODE_TYPE(IoControlCode) _IOC_TYPE(IoControlCode)
1585 #define WD_CTL_CODE(wFuncNum) (wFuncNum)
1586 #define WD_CTL_DECODE_FUNC(IoControlCode) (IoControlCode)
1587 #define WD_CTL_DECODE_TYPE(IoControlCode) (WD_TYPE)
1590 #define WD_TYPE 38200
1591 #if defined(KERNEL_64BIT)
1592 #define FUNC_MASK 0x400
1594 #define FUNC_MASK 0x0
1596 #define WD_CTL_CODE(wFuncNum) CTL_CODE(WD_TYPE, (wFuncNum | FUNC_MASK), \
1597 METHOD_NEITHER, FILE_ANY_ACCESS)
1598 #define WD_CTL_DECODE_FUNC(IoControlCode) ((IoControlCode >> 2) & 0xfff)
1599 #define WD_CTL_DECODE_TYPE(IoControlCode) \
1600 DEVICE_TYPE_FROM_CTL_CODE(IoControlCode)
1604 #define WD_CTL_IS_64BIT_AWARE(IoControlCode) \
1605 (_IOC_DIR(IoControlCode) & (_IOC_READ|_IOC_WRITE))
1607 #define WD_CTL_IS_64BIT_AWARE(IoControlCode) TRUE
1609 #define WD_CTL_IS_64BIT_AWARE(IoControlCode) \
1610 (WD_CTL_DECODE_FUNC(IoControlCode) & FUNC_MASK)
1616#define IOCTL_WD_KERNEL_BUF_LOCK WD_CTL_CODE(0x9f3)
1617#define IOCTL_WD_KERNEL_BUF_UNLOCK WD_CTL_CODE(0x9f4)
1618#define IOCTL_WD_DMA_LOCK WD_CTL_CODE(0x9be)
1619#define IOCTL_WD_DMA_UNLOCK WD_CTL_CODE(0x902)
1620#define IOCTL_WD_TRANSFER WD_CTL_CODE(0x98c)
1621#define IOCTL_WD_MULTI_TRANSFER WD_CTL_CODE(0x98d)
1622#define IOCTL_WD_PCI_SCAN_CARDS WD_CTL_CODE(0x9fa)
1623#define IOCTL_WD_PCI_GET_CARD_INFO WD_CTL_CODE(0x9e8)
1624#define IOCTL_WD_VERSION WD_CTL_CODE(0x910)
1625#define IOCTL_WD_PCI_CONFIG_DUMP WD_CTL_CODE(0x91a)
1626#define IOCTL_WD_KERNEL_PLUGIN_OPEN WD_CTL_CODE(0x91b)
1627#define IOCTL_WD_KERNEL_PLUGIN_CLOSE WD_CTL_CODE(0x91c)
1628#define IOCTL_WD_KERNEL_PLUGIN_CALL WD_CTL_CODE(0x91d)
1629#define IOCTL_WD_INT_ENABLE WD_CTL_CODE(0x9b6)
1630#define IOCTL_WD_INT_DISABLE WD_CTL_CODE(0x9bb)
1631#define IOCTL_WD_INT_COUNT WD_CTL_CODE(0x9ba)
1632#define IOCTL_WD_SLEEP WD_CTL_CODE(0x927)
1633#define IOCTL_WD_DEBUG WD_CTL_CODE(0x928)
1634#define IOCTL_WD_DEBUG_DUMP WD_CTL_CODE(0x929)
1635#define IOCTL_WD_CARD_UNREGISTER WD_CTL_CODE(0x9e7)
1636#define IOCTL_WD_CARD_REGISTER WD_CTL_CODE(0x9e6)
1637#define IOCTL_WD_INT_WAIT WD_CTL_CODE(0x9b9)
1638#define IOCTL_WD_LICENSE WD_CTL_CODE(0x9f9)
1639#define IOCTL_WD_EVENT_REGISTER WD_CTL_CODE(0x9ef)
1640#define IOCTL_WD_EVENT_UNREGISTER WD_CTL_CODE(0x9f0)
1641#define IOCTL_WD_EVENT_PULL WD_CTL_CODE(0x9f1)
1642#define IOCTL_WD_EVENT_SEND WD_CTL_CODE(0x9f2)
1643#define IOCTL_WD_DEBUG_ADD WD_CTL_CODE(0x964)
1644#define IOCTL_WD_USAGE WD_CTL_CODE(0x976)
1645#define IOCTL_WDU_GET_DEVICE_DATA WD_CTL_CODE(0x9a7)
1646#define IOCTL_WDU_SET_INTERFACE WD_CTL_CODE(0x981)
1647#define IOCTL_WDU_RESET_PIPE WD_CTL_CODE(0x982)
1648#define IOCTL_WDU_TRANSFER WD_CTL_CODE(0x983)
1649#define IOCTL_WDU_HALT_TRANSFER WD_CTL_CODE(0x985)
1650#define IOCTL_WDU_WAKEUP WD_CTL_CODE(0x98a)
1651#define IOCTL_WDU_RESET_DEVICE WD_CTL_CODE(0x98b)
1652#define IOCTL_WD_GET_DEVICE_PROPERTY WD_CTL_CODE(0x990)
1653#define IOCTL_WD_CARD_CLEANUP_SETUP WD_CTL_CODE(0x995)
1654#define IOCTL_WD_DMA_SYNC_CPU WD_CTL_CODE(0x99f)
1655#define IOCTL_WD_DMA_SYNC_IO WD_CTL_CODE(0x9a0)
1656#define IOCTL_WDU_STREAM_OPEN WD_CTL_CODE(0x9a8)
1657#define IOCTL_WDU_STREAM_CLOSE WD_CTL_CODE(0x9a9)
1658#define IOCTL_WDU_STREAM_START WD_CTL_CODE(0x9af)
1659#define IOCTL_WDU_STREAM_STOP WD_CTL_CODE(0x9b0)
1660#define IOCTL_WDU_STREAM_FLUSH WD_CTL_CODE(0x9aa)
1661#define IOCTL_WDU_STREAM_GET_STATUS WD_CTL_CODE(0x9b5)
1662#define IOCTL_WDU_SELECTIVE_SUSPEND WD_CTL_CODE(0x9ae)
1663#define IOCTL_WD_PCI_SCAN_CAPS WD_CTL_CODE(0x9e5)
1664#define IOCTL_WD_IPC_REGISTER WD_CTL_CODE(0x9eb)
1665#define IOCTL_WD_IPC_UNREGISTER WD_CTL_CODE(0x9ec)
1666#define IOCTL_WD_IPC_SCAN_PROCS WD_CTL_CODE(0x9ed)
1667#define IOCTL_WD_IPC_SEND WD_CTL_CODE(0x9ee)
1668#define IOCTL_WD_PCI_SRIOV_ENABLE WD_CTL_CODE(0x9f5)
1669#define IOCTL_WD_PCI_SRIOV_DISABLE WD_CTL_CODE(0x9f6)
1670#define IOCTL_WD_PCI_SRIOV_GET_NUMVFS WD_CTL_CODE(0x9f7)
1671#define IOCTL_WD_IPC_SHARED_INT_ENABLE WD_CTL_CODE(0x9fc)
1672#define IOCTL_WD_IPC_SHARED_INT_DISABLE WD_CTL_CODE(0x9fd)
1673#define IOCTL_WD_DMA_TRANSACTION_INIT WD_CTL_CODE(0x9fe)
1674#define IOCTL_WD_DMA_TRANSACTION_EXECUTE WD_CTL_CODE(0x9ff)
1675#define IOCTL_WD_DMA_TRANSFER_COMPLETED_AND_CHECK WD_CTL_CODE(0xa00)
1676#define IOCTL_WD_DMA_TRANSACTION_RELEASE WD_CTL_CODE(0xa01)
1687 #define WD_IOCTL_HEADER_CODE 0xa410b413UL
1690#if defined(__KERNEL__)
1693 DWORD __cdecl KP_DeviceIoControl(DWORD dwFuncNum, HANDLE h, PVOID pParam,
1695 #define WD_FUNCTION(wFuncNum, h, pParam, dwSize, fWait) \
1696 KP_DeviceIoControl((DWORD)wFuncNum, h, (PVOID)pParam, (DWORD)dwSize)
1698 #define REGKEY_BUFSIZE 256
1699 #define OS_CAN_NOT_DETECT_TEXT "OS CAN NOT DETECT"
1700 #define INSTALLATION_TYPE_NOT_DETECT_TEXT "unknown"
1709 DWORD dwMajorVersion;
1710 DWORD dwMinorVersion;
1739 DWORD WD_FUNCTION_LOCAL(
int wFuncNum, HANDLE h,
1740 PVOID pParam, DWORD dwSize, BOOL fWait);
1746 #define WD_OpenStreamLocal(read,sync) INVALID_HANDLE_VALUE
1748 #define WD_UStreamRead(hFile, pBuffer, dwNumberOfBytesToRead, \
1749 dwNumberOfBytesRead)\
1752 #define WD_UStreamWrite(hFile, pBuffer, dwNumberOfBytesToWrite, \
1753 dwNumberOfBytesWritten)\
1756 #if __ENVIRONMENT_MAC_OS_X_VERSION_MIN_REQUIRED__ >= 120000
1757 #define IO_MASTER_PORT IOMainPort
1759 #define IO_MASTER_PORT IOMasterPort
1763 static inline ULONG WD_FUNCTION_LOCAL(
int wFuncNum, HANDLE h,
1764 PVOID pParam, DWORD dwSize, BOOL fWait)
1766 WD_IOCTL_HEADER ioctl_hdr;
1769 ioctl_hdr.dwHeader = WD_IOCTL_HEADER_CODE;
1770 ioctl_hdr.dwSize = dwSize;
1771 ioctl_hdr.pData = pParam;
1774 return (ULONG)ioctl((
int)(
long)h, wFuncNum, &ioctl_hdr);
1778 #define WD_OpenLocal()\
1779 ((HANDLE)(long)open(WD_DRIVER_NAME, O_RDWR | O_SYNC))
1780 #define WD_OpenStreamLocal(read,sync) \
1781 ((HANDLE)(long)open(WD_DRIVER_NAME, \
1782 ((read) ? O_RDONLY : O_WRONLY) | \
1783 ((sync) ? O_SYNC : O_NONBLOCK)))
1785 #define WD_CloseLocal(h) close((int)(long)(h))
1787 #define WD_UStreamRead(hFile, pBuffer, dwNumberOfBytesToRead, \
1788 dwNumberOfBytesRead)\
1791 #define WD_UStreamWrite(hFile, pBuffer, dwNumberOfBytesToWrite, \
1792 dwNumberOfBytesWritten)\
1795 #elif defined(WIN32)
1796 #define WD_CloseLocal(h) CloseHandle(h)
1798 #define WD_UStreamRead(hFile, pBuffer, dwNumberOfBytesToRead, \
1799 dwNumberOfBytesRead)\
1800 ReadFile(hFile, pBuffer, dwNumberOfBytesToRead, \
1801 dwNumberOfBytesRead, NULL) ? WD_STATUS_SUCCESS : \
1804 #define WD_UStreamWrite(hFile, pBuffer, dwNumberOfBytesToWrite, \
1805 dwNumberOfBytesWritten)\
1806 WriteFile(hFile, pBuffer, dwNumberOfBytesToWrite, \
1807 dwNumberOfBytesWritten, NULL) ? WD_STATUS_SUCCESS : \
1811 #define WD_OpenLocal()\
1815 FILE_SHARE_READ | FILE_SHARE_WRITE,\
1816 NULL, OPEN_EXISTING, FILE_FLAG_OVERLAPPED, NULL)
1818 #define WD_OpenStreamLocal(read,sync) \
1821 (read) ? GENERIC_READ : GENERIC_WRITE,\
1822 FILE_SHARE_READ | FILE_SHARE_WRITE, NULL, OPEN_EXISTING, \
1823 (sync) ? 0 : FILE_FLAG_OVERLAPPED, NULL)
1825 static DWORD WD_FUNCTION_LOCAL(
int wFuncNum, HANDLE h, PVOID pParam,
1826 DWORD dwSize, BOOL fWait)
1835 DeviceIoControl(hWD, (DWORD)wFuncNum, pParam, dwSize, &rc,
1836 sizeof(DWORD), &dwTmp,
NULL);
1846 #define WD_FUNCTION WD_FUNCTION_LOCAL
1847 #define WD_Close WD_CloseLocal
1848 #define WD_Open WD_OpenLocal
1849 #define WD_StreamOpen WD_OpenStreamLocal
1850 #define WD_StreamClose WD_CloseLocal
1853#define SIZE_OF_WD_DMA(pDma) \
1854 ((DWORD)(sizeof(WD_DMA) + ((pDma)->dwPages <= WD_DMA_PAGES ? \
1855 0 : ((pDma)->dwPages - WD_DMA_PAGES) * sizeof(WD_DMA_PAGE))))
1856#define SIZE_OF_WD_EVENT(pEvent) \
1857 ((DWORD)(sizeof(WD_EVENT) + ((pEvent)->dwNumMatchTables > 0 ? \
1858 sizeof(WDU_MATCH_TABLE) * ((pEvent)->dwNumMatchTables - 1) : 0)))
1871#define WD_Debug(h,pDebug)\
1872 WD_FUNCTION(IOCTL_WD_DEBUG, h, pDebug, sizeof(WD_DEBUG), FALSE)
1885#define WD_DebugDump(h,pDebugDump)\
1886 WD_FUNCTION(IOCTL_WD_DEBUG_DUMP, h, pDebugDump, sizeof(WD_DEBUG_DUMP), \
1900#define WD_DebugAdd(h, pDebugAdd)\
1901 WD_FUNCTION(IOCTL_WD_DEBUG_ADD, h, pDebugAdd, sizeof(WD_DEBUG_ADD), FALSE)
1915#define WD_Transfer(h,pTransfer)\
1916 WD_FUNCTION(IOCTL_WD_TRANSFER, h, pTransfer, sizeof(WD_TRANSFER), FALSE)
1934#define WD_MultiTransfer(h, pTransferArray, dwNumTransfers) \
1935 WD_FUNCTION(IOCTL_WD_MULTI_TRANSFER, h, pTransferArray, \
1936 sizeof(WD_TRANSFER) * (dwNumTransfers), FALSE)
1951#define WD_KernelBufLock(h, pKerBuf)\
1952 WD_FUNCTION(IOCTL_WD_KERNEL_BUF_LOCK, h, pKerBuf, \
1953 sizeof(WD_KERNEL_BUFFER), FALSE)
1966#define WD_KernelBufUnlock(h, pKerBuf)\
1967 WD_FUNCTION(IOCTL_WD_KERNEL_BUF_UNLOCK, h, pKerBuf, \
1968 sizeof(WD_KERNEL_BUFFER), FALSE)
2032#define WD_DMALock(h,pDma)\
2033 WD_FUNCTION(IOCTL_WD_DMA_LOCK, h, pDma, SIZE_OF_WD_DMA(pDma), FALSE)
2047#define WD_DMAUnlock(h,pDma)\
2048 WD_FUNCTION(IOCTL_WD_DMA_UNLOCK, h, pDma, SIZE_OF_WD_DMA(pDma), FALSE)
2063#define WD_DMATransactionInit(h,pDma)\
2064 WD_FUNCTION(IOCTL_WD_DMA_TRANSACTION_INIT, h, pDma, SIZE_OF_WD_DMA(pDma), \
2077#define WD_DMATransactionExecute(h,pDma)\
2078 WD_FUNCTION(IOCTL_WD_DMA_TRANSACTION_EXECUTE, h, pDma, \
2079 SIZE_OF_WD_DMA(pDma), FALSE)
2091#define WD_DMATransferCompletedAndCheck(h,pDma)\
2092 WD_FUNCTION(IOCTL_WD_DMA_TRANSFER_COMPLETED_AND_CHECK, h, pDma, \
2093 SIZE_OF_WD_DMA(pDma), FALSE)
2106#define WD_DMATransactionRelease(h,pDma)\
2107 WD_FUNCTION(IOCTL_WD_DMA_TRANSACTION_RELEASE, h, pDma, \
2108 SIZE_OF_WD_DMA(pDma), FALSE)
2121#define WD_DMATransactionUninit(h,pDma)\
2122 WD_FUNCTION(IOCTL_WD_DMA_UNLOCK, h, pDma, SIZE_OF_WD_DMA(pDma), FALSE)
2147#define WD_DMASyncCpu(h,pDma)\
2148 WD_FUNCTION(IOCTL_WD_DMA_SYNC_CPU, h, pDma, SIZE_OF_WD_DMA(pDma), FALSE)
2174#define WD_DMASyncIo(h,pDma)\
2175 WD_FUNCTION(IOCTL_WD_DMA_SYNC_IO, h, pDma, SIZE_OF_WD_DMA(pDma), FALSE)
2228#define WD_CardRegister(h,pCard)\
2229 WD_FUNCTION(IOCTL_WD_CARD_REGISTER, h, pCard, sizeof(WD_CARD_REGISTER),\
2244#define WD_CardUnregister(h,pCard)\
2245 WD_FUNCTION(IOCTL_WD_CARD_UNREGISTER, h, pCard, sizeof(WD_CARD_REGISTER),\
2269#define WD_IpcRegister(h, pIpcRegister) \
2270 WD_FUNCTION(IOCTL_WD_IPC_REGISTER, h, pIpcRegister, \
2271 sizeof(WD_IPC_REGISTER), FALSE)
2285#define WD_IpcUnRegister(h, pProcInfo) \
2286 WD_FUNCTION(IOCTL_WD_IPC_UNREGISTER, h, pProcInfo, sizeof(WD_IPC_PROCESS), \
2302#define WD_IpcScanProcs(h, pIpcScanProcs) \
2303 WD_FUNCTION(IOCTL_WD_IPC_SCAN_PROCS, h, pIpcScanProcs, \
2304 sizeof(WD_IPC_SCAN_PROCS), FALSE)
2319#define WD_IpcSend(h, pIpcSend) \
2320 WD_FUNCTION(IOCTL_WD_IPC_SEND, h, pIpcSend, sizeof(WD_IPC_SEND), FALSE)
2339#define WD_SharedIntEnable(h, pIpcRegister) \
2340 WD_FUNCTION(IOCTL_WD_IPC_SHARED_INT_ENABLE, h, pIpcRegister, \
2341 sizeof(WD_IPC_REGISTER), FALSE)
2354#define WD_SharedIntDisable(h) \
2355 WD_FUNCTION(IOCTL_WD_IPC_SHARED_INT_DISABLE, h, 0, 0, FALSE)
2370#define WD_PciSriovEnable(h,pPciSRIOV) \
2371 WD_FUNCTION(IOCTL_WD_PCI_SRIOV_ENABLE, h, pPciSRIOV, \
2372 sizeof(WD_PCI_SRIOV), FALSE)
2387#define WD_PciSriovDisable(h,pPciSRIOV) \
2388 WD_FUNCTION(IOCTL_WD_PCI_SRIOV_DISABLE, h, pPciSRIOV, \
2389 sizeof(WD_PCI_SRIOV), FALSE)
2406#define WD_PciSriovGetNumVFs(h,pPciSRIOV) \
2407 WD_FUNCTION(IOCTL_WD_PCI_SRIOV_GET_NUMVFS, h, pPciSRIOV, \
2408 sizeof(WD_PCI_SRIOV), FALSE)
2432#define WD_CardCleanupSetup(h,pCardCleanup)\
2433 WD_FUNCTION(IOCTL_WD_CARD_CLEANUP_SETUP, h, pCardCleanup, \
2434 sizeof(WD_CARD_CLEANUP), FALSE)
2450#define WD_PciScanCards(h,pPciScan)\
2451 WD_FUNCTION(IOCTL_WD_PCI_SCAN_CARDS, h, pPciScan,\
2452 sizeof(WD_PCI_SCAN_CARDS), FALSE)
2467#define WD_PciScanCaps(h,pPciScanCaps) \
2468 WD_FUNCTION(IOCTL_WD_PCI_SCAN_CAPS, h, pPciScanCaps, \
2469 sizeof(WD_PCI_SCAN_CAPS), FALSE)
2484#define WD_PciGetCardInfo(h,pPciCard)\
2485 WD_FUNCTION(IOCTL_WD_PCI_GET_CARD_INFO, h, pPciCard, \
2486 sizeof(WD_PCI_CARD_INFO), FALSE)
2502#define WD_PciConfigDump(h,pPciConfigDump)\
2503 WD_FUNCTION(IOCTL_WD_PCI_CONFIG_DUMP, h, pPciConfigDump, \
2504 sizeof(WD_PCI_CONFIG_DUMP), FALSE)
2518#define WD_Version(h,pVerInfo)\
2519 WD_FUNCTION(IOCTL_WD_VERSION, h, pVerInfo, sizeof(WD_VERSION), FALSE)
2541#define WD_License(h,pLicense)\
2542 WD_FUNCTION(IOCTL_WD_LICENSE, h, pLicense, sizeof(WD_LICENSE), FALSE)
2557#define WD_KernelPlugInOpen(h,pKernelPlugIn)\
2558 WD_FUNCTION(IOCTL_WD_KERNEL_PLUGIN_OPEN, h, pKernelPlugIn, \
2559 sizeof(WD_KERNEL_PLUGIN), FALSE)
2573#define WD_KernelPlugInClose(h,pKernelPlugIn)\
2574 WD_FUNCTION(IOCTL_WD_KERNEL_PLUGIN_CLOSE, h, pKernelPlugIn, \
2575 sizeof(WD_KERNEL_PLUGIN), FALSE)
2596#define WD_KernelPlugInCall(h,pKernelPlugInCall)\
2597 WD_FUNCTION(IOCTL_WD_KERNEL_PLUGIN_CALL, h, pKernelPlugInCall, \
2598 sizeof(WD_KERNEL_PLUGIN_CALL), FALSE)
2623#define WD_IntEnable(h,pInterrupt)\
2624 WD_FUNCTION(IOCTL_WD_INT_ENABLE, h, pInterrupt, sizeof(WD_INTERRUPT), FALSE)
2637#define WD_IntDisable(h,pInterrupt)\
2638 WD_FUNCTION(IOCTL_WD_INT_DISABLE, h, pInterrupt, sizeof(WD_INTERRUPT), \
2652#define WD_IntCount(h,pInterrupt)\
2653 WD_FUNCTION(IOCTL_WD_INT_COUNT, h, pInterrupt, sizeof(WD_INTERRUPT), FALSE)
2671#define WD_IntWait(h,pInterrupt)\
2672 WD_FUNCTION(IOCTL_WD_INT_WAIT, h, pInterrupt, sizeof(WD_INTERRUPT), TRUE)
2688#define WD_Sleep(h,pSleep)\
2689 WD_FUNCTION(IOCTL_WD_SLEEP, h, pSleep, sizeof(WD_SLEEP), FALSE)
2692#define WD_EventRegister(h, pEvent) \
2693 WD_FUNCTION(IOCTL_WD_EVENT_REGISTER, h, pEvent, SIZE_OF_WD_EVENT(pEvent), \
2695#define WD_EventUnregister(h, pEvent) \
2696 WD_FUNCTION(IOCTL_WD_EVENT_UNREGISTER, h, pEvent, \
2697 SIZE_OF_WD_EVENT(pEvent), FALSE)
2698#define WD_EventPull(h,pEvent) \
2699 WD_FUNCTION(IOCTL_WD_EVENT_PULL, h, pEvent, SIZE_OF_WD_EVENT(pEvent), FALSE)
2700#define WD_EventSend(h,pEvent) \
2701 WD_FUNCTION(IOCTL_WD_EVENT_SEND, h, pEvent, SIZE_OF_WD_EVENT(pEvent), FALSE)
2702#define WD_Usage(h, pStop) \
2703 WD_FUNCTION(IOCTL_WD_USAGE, h, pStop, sizeof(WD_USAGE), FALSE)
2705#define WD_UGetDeviceData(h, pGetDevData) \
2706 WD_FUNCTION(IOCTL_WDU_GET_DEVICE_DATA, h, pGetDevData, \
2707 sizeof(WDU_GET_DEVICE_DATA), FALSE);
2708#define WD_GetDeviceProperty(h, pGetDevProperty) \
2709 WD_FUNCTION(IOCTL_WD_GET_DEVICE_PROPERTY, h, pGetDevProperty, \
2710 sizeof(WD_GET_DEVICE_PROPERTY), FALSE);
2711#define WD_USetInterface(h, pSetIfc) \
2712 WD_FUNCTION(IOCTL_WDU_SET_INTERFACE, h, pSetIfc, \
2713 sizeof(WDU_SET_INTERFACE), FALSE);
2714#define WD_UResetPipe(h, pResetPipe) \
2715 WD_FUNCTION(IOCTL_WDU_RESET_PIPE, h, pResetPipe, sizeof(WDU_RESET_PIPE), \
2717#define WD_UTransfer(h, pTrans) \
2718 WD_FUNCTION(IOCTL_WDU_TRANSFER, h, pTrans, sizeof(WDU_TRANSFER), TRUE);
2719#define WD_UHaltTransfer(h, pHaltTrans) \
2720 WD_FUNCTION(IOCTL_WDU_HALT_TRANSFER, h, pHaltTrans, \
2721 sizeof(WDU_HALT_TRANSFER), FALSE);
2722#define WD_UWakeup(h, pWakeup) \
2723 WD_FUNCTION(IOCTL_WDU_WAKEUP, h, pWakeup, sizeof(WDU_WAKEUP), FALSE);
2724#define WD_USelectiveSuspend(h, pSelectiveSuspend) \
2725 WD_FUNCTION(IOCTL_WDU_SELECTIVE_SUSPEND, h, pSelectiveSuspend, \
2726 sizeof(WDU_SELECTIVE_SUSPEND), FALSE);
2727#define WD_UResetDevice(h, pResetDevice) \
2728 WD_FUNCTION(IOCTL_WDU_RESET_DEVICE, h, pResetDevice, \
2729 sizeof(WDU_RESET_DEVICE), FALSE);
2730#define WD_UStreamOpen(h, pStream) \
2731 WD_FUNCTION(IOCTL_WDU_STREAM_OPEN, h, pStream, sizeof(WDU_STREAM), FALSE);
2732#define WD_UStreamClose(h, pStream) \
2733 WD_FUNCTION(IOCTL_WDU_STREAM_CLOSE, h, pStream, sizeof(WDU_STREAM), FALSE);
2734#define WD_UStreamStart(h, pStream) \
2735 WD_FUNCTION(IOCTL_WDU_STREAM_START, h, pStream, sizeof(WDU_STREAM), FALSE);
2736#define WD_UStreamStop(h, pStream) \
2737 WD_FUNCTION(IOCTL_WDU_STREAM_STOP, h, pStream, sizeof(WDU_STREAM), FALSE);
2738#define WD_UStreamFlush(h, pStream) \
2739 WD_FUNCTION(IOCTL_WDU_STREAM_FLUSH, h, pStream, sizeof(WDU_STREAM), FALSE);
2740#define WD_UStreamGetStatus(h, pStreamStatus) \
2741 WD_FUNCTION(IOCTL_WDU_STREAM_GET_STATUS, h, pStreamStatus, \
2742 sizeof(WDU_STREAM_STATUS), FALSE);
2744#define __ALIGN_DOWN(val,alignment) ( (val) & ~((alignment) - 1) )
2745#define __ALIGN_UP(val,alignment) \
2746 ( ((val) + (alignment) - 1) & ~((alignment) - 1) )
2753 #define MIN(a,b) ((a) > (b) ? (b) : (a))
2756 #define MAX(a,b) ((a) > (b) ? (a) : (b))
2758#define SAFE_STRING(s) ((s) ? (s) : "")
2760#define UNUSED_VAR(x) (void)x
@ ITEM_INTERRUPT
Interrupt.
struct WD_KERNEL_PLUGIN_CALL WD_KERNEL_PLUGIN_CALL_V40
struct WD_PCI_CARD_INFO WD_PCI_CARD_INFO_V118
@ WD_ITEM_MEM_DO_NOT_MAP_KERNEL
Skip the mapping of physical memory to the kernel address space.
@ WD_ITEM_MEM_ALLOW_CACHE
Map physical memory as cached; applicable only to host RAM, not to local memory on the card.
@ WD_ITEM_MEM_USER_MAP
Map physical memory from user mode, Linux only.
WD_GET_DEVICE_PROPERTY_OPTION
IOCTL Structures.
struct WD_ITEMS WD_ITEMS_V118
struct WD_DEBUG_ADD WD_DEBUG_ADD_V503
#define WD_VERSION_STR_LENGTH
struct WD_IPC_SCAN_PROCS WD_IPC_SCAN_PROCS_V121
struct WD_TRANSFER WD_TRANSFER_V61
struct WD_KERNEL_BUFFER WD_KERNEL_BUFFER_V121
@ KER_BUF_ALLOC_NON_CONTIG
@ KER_BUF_GET_EXISTING_BUF
struct WD_SLEEP WD_SLEEP_V40
#define WD_LICENSE_LENGTH
@ WD_INVALID_32BIT_APP
[0x20000021] Invalid 32 Bit User Application.
@ WD_TRY_AGAIN
[0x2000001d] Try Again.
@ WD_USBD_STATUS_DATA_TOGGLE_MISMATCH
[0xC0000003] HC status: Data toggle mismatch
@ WD_RESOURCE_OVERLAP
[0x2000000e] Resource Overlap.
@ WD_FAILED_KERNEL_MAPPING
[0x20000018] Failed to map memory to Kernel Space.
@ WD_WINDRIVER_STATUS_ERROR
[0x20000000]
@ WD_USBD_STATUS_UNEXPECTED_PID
[0xC0000007] HC status: Unexpected PID
@ WD_USBD_STATUS_REQUEST_FAILED
[0x80000500] Returned by USBD if it cannot complete a URB request.
@ WD_USBD_STATUS_INTERFACE_NOT_FOUND
[0xC0004000] USBD: Interface not found
@ WD_USBD_STATUS_INAVLID_CONFIGURATION_DESCRIPTOR
[0xC0000F00] USBD: Invalid configuration descriptor
@ WD_TOO_MANY_HANDLES
[0x20000022] Too Many Handles.
@ WD_USBD_STATUS_ISO_NOT_ACCESSED_LATE
[0xC0050000] The packet was not sent because the client submitted it too late to transmit:
@ WD_USBD_STATUS_INVALID_URB_FUNCTION
[0x80000200] USBD: Invalid URB function
@ WD_USBD_STATUS_NOT_ACCESSED
[0xC000000F] HC status: Not accessed
@ WD_INTERRUPT_NOT_ENABLED
[0x2000000d] Interrupt not enabled.
@ WD_USBD_STATUS_ERROR_BUSY
[0x80000400] Returned if client driver attempts to close an endpoint/interface or configuration with ...
@ WD_USBD_STATUS_XACT_ERROR
[0xC0000011] HC status: The host controller has set the Transaction Error (XactErr) bit in the transf...
@ WD_MORE_PROCESSING_REQUIRED
[0xC0000016] More Processing Required.
@ WD_UNKNOWN_PIPE_TYPE
[0x20000006] Obsolete.
@ WD_INVALID_HANDLE
[0x20000001] Invalid WinDriver handle.
@ WD_USBD_STATUS_DATA_UNDERRUN
[0xC0000009] HC status: Data underrrun
@ WD_OPERATION_FAILED
[0x20000020] Operation Failed.
@ WD_USB_DESCRIPTOR_ERROR
[0x20000012] USB Descriptor Error.
@ WD_USBD_STATUS_RESERVED1
[0xC000000A] HC status: Reserved1
@ WD_USBD_STATUS_RESERVED2
[0xC000000B] HC status: Reserved1
@ WD_USBD_STATUS_NOT_SUPPORTED
[0xC0000E00] Returned for APIS not supported/implemented
@ WD_USBD_STATUS_DEVICE_GONE
[0xC0007000] USBD: Device Gone
@ WD_USBD_STATUS_ISO_NOT_ACCESSED_BY_HW
Extended isochronous error codes returned by USBD.
@ WD_USBD_STATUS_DATA_BUFFER_ERROR
[0xC0000013] HC status: Data buffer error
@ WD_USBD_STATUS_ISO_TD_ERROR
[0xC0030000] Controller reported an error in the TD.
@ WD_USBD_STATUS_DEV_NOT_RESPONDING
[0xC0000005] HC status: Device not responding
@ WD_USBD_STATUS_FIFO
[0xC0000010] HC status: FIFO
@ WD_NO_LICENSE
0x[20000009] No License.
@ WD_INVALID_PARAMETER
[0x2000001b] Invalid Parameter.
@ WD_WRONG_UNIQUE_ID
[0x20000010] Wrong unique ID (USB).
@ WD_USBD_STATUS_INVALID_PARAMETER
[0x80000300] USBD: Invalid parameter
@ WD_USBD_STATUS_BAD_START_FRAME
[0x80000A00] Returned if the requested start frame is not within
@ WD_USBD_STATUS_SUCCESS
[0x00000000] Success
@ WD_USBD_STATUS_ERROR
[0x80000000] Error
@ WD_DATA_MISMATCH
[0x20000008] Data Mismatch.
@ WD_NO_RESOURCES_ON_DEVICE
[0x20000019] No Resources On Device.
@ WD_NO_EVENTS
[0x2000001a] No Events.
@ WD_USBD_STATUS_NO_BANDWIDTH
[0x80000700] Returned when there is not enough bandwidth available
@ WD_USBD_STATUS_BUFFER_UNDERRUN
[0xC000000D] HC status: Buffer underrun
@ WD_NOT_IMPLEMENTED
[0x2000000a] Function not implemented.
@ WD_READ_WRITE_CONFLICT
[0x20000003] Request to read from an OUT (write) pipe or request to write to an IN (read) pipe
@ WD_USBD_STATUS_FRAME_CONTROL_NOT_OWNED
[0xC0000D00] Returned by USBD if the caller does not own frame length control and attempts to release...
@ WD_DEVICE_NOT_FOUND
[0x2000000f] Device not found.
@ WD_NO_DEVICE_OBJECT
[0x20000023] No Device Object.
@ WD_USBD_STATUS_CANCELED
[0xC0010000] USBD: Transfer canceled
@ WD_INCORRECT_VERSION
[0x2000001c] Incorrect version.
@ WD_USBD_STATUS_PENDING
[0x40000000] Operation pending
@ WD_USBD_STATUS_TIMEOUT
[0xC0006000] USBD: Timeout
@ WD_USBD_STATUS_ISOCH_REQUEST_FAILED
[0xC0000B00] Returned by HCD (Host Controller Driver) if all packets in an isochronous transfer compl...
@ WD_FAILED_ENABLING_INTERRUPT
[0x2000000c] Failed Enabling Interrupts.
@ WD_KERPLUG_FAILURE
[0x2000000b] Kernel PlugIn failure.
@ WD_WINDRIVER_NOT_FOUND
[0x2000001e] Obsolete
@ WD_SET_CONFIGURATION_FAILED
[0x20000013] Set Configuration Failed (USB).
@ WD_USBD_STATUS_CRC
[0xC0000001] HC status: CRC
@ WD_USBD_STATUS_ENDPOINT_HALTED
Returned by HCD (Host Controller Driver) if a transfer is submitted to an endpoint that is stalled:
@ WD_USBD_STATUS_INTERNAL_HC_ERROR
[0x80000800] Generic HC (Host Controller) error:
@ WD_FAILED_USER_MAPPING
[0x20000017] Failed to map memory to User Space.
@ WD_USBD_STATUS_INVALID_PIPE_HANDLE
[80000600] USBD: Invalid pipe handle
@ WD_STATUS_SUCCESS
[0] Operation completed successfully
@ WD_USBD_STATUS_INAVLID_PIPE_FLAGS
[0xC0005000] USBD: Invalid pipe flags
@ WD_INVALID_IOCTL
[0x2000001f] Invalid IOCTL.
@ WD_TIME_OUT_EXPIRED
[0x20000015] Time Out Expired.
@ WD_SYSTEM_INTERNAL_ERROR
[0x20000007] Internal System Error
@ WD_USBD_STATUS_BUFFER_TOO_SMALL
[0xC0003000] USBD: Buffer too small
@ WD_USBD_STATUS_INSUFFICIENT_RESOURCES
[0xC0001000] USBD: Insufficient resources
@ WD_USBD_STATUS_DATA_OVERRUN
[0xC0000008] HC status: Data overrun
@ WD_ZERO_PACKET_SIZE
[0x20000004] Maximum packet size is zero
@ WD_USBD_STATUS_ERROR_SHORT_TRANSFER
[0x80000900] Returned when a short packet terminates the transfer
@ WD_USBD_STATUS_STALL_PID
[0xC0000004] HC status: PID stall
@ WD_USBD_STATUS_PID_CHECK_FAILURE
[0xC0000006] HC status: PID check failed
@ WD_USBD_STATUS_ISO_NA_LATE_USBPORT
[0xC0040000] The packet was submitted in time by the client but
@ WD_CANT_OBTAIN_PDO
[0x20000014] Obsolete
@ WD_USBD_STATUS_BABBLE_DETECTED
[0xC0000012] HC status: Babble detected
@ WD_USBD_STATUS_HALTED
[0xC0000000] Halted
@ WD_INSUFFICIENT_RESOURCES
[0x20000005] Insufficient resources.
@ WD_USBD_STATUS_FRAME_CONTROL_OWNED
[0xC0000C00] Returned by USBD if the frame length control for a given
@ WD_USBD_STATUS_BTSTUFF
[0xC0000002] HC status: Bit stuffing
@ WD_USBD_STATUS_BUFFER_OVERRUN
[0xC000000C] HC status: Buffer overrun
@ WD_USBD_STATUS_SET_CONFIG_FAILED
[0xC0002000] USBD: Set configuration failed
@ WD_IRP_CANCELED
[0x20000016] IRP Cancelled.
@ WD_INVALID_PIPE_NUMBER
[0x20000002] USB: Invalid Pipe Number.
@ WD_OPERATION_ALREADY_DONE
[0x20000011] Operation Already Done.
@ WD_USBD_STATUS_STATUS_NOT_MAPPED
[0xC0008000] USBD: Status not mapped
@ WD_STATUS_INVALID_WD_HANDLE
[0xffffffff]
@ WD_USBD_STATUS_NO_MEMORY
[0x80000100] USBD: Out of memory
struct WD_VERSION WD_VERSION_V30
struct WD_LICENSE WD_LICENSE_V122
@ WD_PCI_SCAN_BY_TOPOLOGY
@ WD_PCI_SCAN_INCLUDE_DOMAINS
WD_TRANSFER_CMD
IN WD_TRANSFER_CMD and WD_Transfer() DWORD stands for 32 bits and QWORD is 64 bit.
@ WM_SWORD
Write memory string word.
@ WM_SBYTE
Write memory string byte.
@ RP_SDWORD
Read port string dword.
@ WM_BYTE
Write memory byte.
@ WM_SQWORD
Write memory string quad word.
@ RM_DWORD
Read memory dword.
@ WP_DWORD
Write port dword.
@ WM_SDWORD
Write memory string dword.
@ RM_WORD
Read memory word.
@ RM_SBYTE
Read memory string byte.
@ WP_SQWORD
Write port string qword.
@ RM_BYTE
Read memory byte.
@ WP_SBYTE
Write port string byte.
@ WP_SWORD
Write port string word.
@ RM_SWORD
Read memory string word.
@ CMD_MASK
Interrupt Mask.
@ WM_DWORD
Write memory dword.
@ RP_DWORD
Read port dword.
@ WP_BYTE
Write port byte.
@ RP_QWORD
Read port qword.
@ WM_QWORD
Write memory qword.
@ RM_SDWORD
Read memory string dword.
@ RM_QWORD
Read memory qword.
@ WP_WORD
Write port word.
@ WP_SDWORD
Write port string dword.
@ RM_SQWORD
Read memory string quad word.
@ RP_SWORD
Read port string word.
@ WM_WORD
Write memory word.
@ RP_SBYTE
Read port string byte.
@ WP_QWORD
Write port qword.
@ RP_SQWORD
Read port string qword.
#define INVALID_HANDLE_VALUE
#define WD_MAX_KP_NAME_LENGTH
@ WD_IPC_SUBGROUP_MULTICAST
@ WD_ACCEPT_CONTROL
used in WD_EVENT_SEND (acknowledge)
@ WD_PCI_SCAN_CAPS_BASIC
Scan basic PCI capabilities.
@ WD_PCI_SCAN_CAPS_EXTENDED
Scan extended (PCIe) PCI capabilities.
struct WD_DEBUG WD_DEBUG_V40
struct WD_DEBUG_DUMP WD_DEBUG_DUMP_V40
@ INTERRUPT_MESSAGE
Message-Signaled Interrupts (MSI).
@ INTERRUPT_CMD_RETURN_VALUE
Obsolete.
@ INTERRUPT_LATCHED
Legacy Latched Interrupts .
@ INTERRUPT_MESSAGE_X
Extended Message-Signaled Interrupts (MSI-X).
@ INTERRUPT_CMD_COPY
Copy any data read in the kernel as a result of a read transfer command, and return it to the user wi...
@ INTERRUPT_LEVEL_SENSITIVE
Legacy Level Sensitive Interrupts.
@ INTERRUPT_CE_INT_ID
Obsolete.
@ INTERRUPT_DONT_GET_MSI_MESSAGE
Linux Only.
struct WD_PCI_SCAN_CAPS WD_PCI_SCAN_CAPS_V118
struct WD_DMA_PAGE WD_DMA_PAGE_V80
struct WD_EVENT WD_EVENT_V121
struct WD_IPC_REGISTER WD_IPC_REGISTER_V121
struct WD_KERNEL_PLUGIN WD_KERNEL_PLUGIN_V40
DWORD DLLCALLCONV check_secureBoot_enabled(void)
Checks whether the Secure Boot feature is enabled on the system.
void(DLLCALLCONV * DMA_TRANSACTION_CALLBACK)(PVOID pData)
struct WD_PCI_SRIOV WD_PCI_SRIOV_V122
const char *DLLCALLCONV WD_DriverName(const char *sName)
Sets the name of the WinDriver kernel module, which will be used by the calling application.
struct WD_IPC_SEND WD_IPC_SEND_V121
#define WD_PROCESS_NAME_LENGTH
@ WD_BUS_EISA
EISA, including ISA PnP.
@ WD_BUS_UNKNOWN
Unknown bus type.
@ WD_POWER_SYSTEM_WORKING
@ WD_POWER_SYSTEM_SLEEPING3
@ WD_POWER_SYSTEM_HIBERNATE
@ WD_POWER_CHANGED_D0
Power states for the power management.
@ WD_POWER_SYSTEM_SLEEPING2
@ WD_POWER_SYSTEM_SHUTDOWN
@ WD_POWER_SYSTEM_SLEEPING1
struct WD_PCI_SCAN_CARDS WD_PCI_SCAN_CARDS_V124
@ DMA_KERNEL_BUFFER_ALLOC
The system allocates a contiguous buffer.
@ DMA_DISABLE_MERGE_ADJACENT_PAGES
Disable merge adjacent pages.
@ DMA_TRANSACTION
Use this flag to use the DMA transaction mechanism.
@ DMA_TO_DEVICE
memory pages are locked to be read by device
@ DMA_KBUF_BELOW_16M
If DMA_KERNEL_BUFFER_ALLOC is used, this will make sure it is under 16M.
@ DMA_ALLOW_NO_HCARD
Allow memory lock without hCard.
@ DMA_FROM_DEVICE
memory pages are locked to be written by device
@ DMA_GET_PREALLOCATED_BUFFERS_ONLY
Windows: Try to allocate buffers from preallocated buffers pool ONLY (if none of them are available,...
@ DMA_GET_EXISTING_BUF
Get existing buffer by hDma handle.
@ DMA_ALLOW_64BIT_ADDRESS
Use this value for devices that support 64-bit DMA addressing.
@ DMA_TO_FROM_DEVICE
memory pages are locked for both read and write
@ DMA_LARGE_BUFFER
If DMA_LARGE_BUFFER is used, the maximum number of pages are dwPages, and not WD_DMA_PAGES.
@ DMA_GPUDIRECT
Linux only.
@ DMA_ALLOW_CACHE
Allow caching of contiguous memory.
@ DMA_KERNEL_ONLY_MAP
Only map to kernel, dont map to user-mode.
@ DMA_KBUF_ALLOC_SPECIFY_ADDRESS_WIDTH
When using this flag, the width of the address must be entered in the fourth byte of dwOptions and th...
@ WD_MATCH_EXCLUDE
Exclude if there is a match.
#define DEBUG_USER_BUF_LEN
struct WD_CARD_REGISTER WD_CARD_REGISTER_V118
@ INTERRUPT_INTERRUPTED
Wait was interrupted before an actual hardware interrupt was received.
@ INTERRUPT_RECEIVED
Interrupt was received.
@ INTERRUPT_STOPPED
Interrupt was disabled during wait.
struct WD_IPC_PROCESS WD_IPC_PROCESS_V121
WD_OS_INFO DLLCALLCONV get_os_type(void)
Retrieves the type of the operating system in section.