26 ULONG outBufLen, outBufLenNeeded;
39 DPRINT(
"inBufLen %ux\n",
sizeof(inTcpReq));
47 for (callsLeft = 4; callsLeft > 0; callsLeft++)
56 outBufLen = outBufLenNeeded;
57 DPRINT(
"outBufLen %lx\n", outBufLen);
84 if (outBufLenNeeded <= outBufLen)
97 DPRINT(
"TcpFile %p\n", TcpFile);
99 DPRINT(
"idCount %lx\n", *idCount);
101 pEntities = *ppEntities;
102 for (i1 = 0; i1 < *idCount; i1++)
132 sizeof(*outIPSNMPInfo),
229 DWORD outIDCount, i1, iAddr;
230 DWORD bCastAddr, outNumberOfBytes;
238 IntfIDList =
HeapAlloc(hHeap, 0,
sizeof(*IntfIDList));
249 DPRINT(
"TcpFile %p\n", TcpFile);
253 DPRINT(
"ERROR in AllocAndGetEntityArray: out of memory!\n");
259 pIFEntry =
HeapAlloc(hHeap, 0, IFEntryLen);
268 pEntityID = outEntityID;
269 for (i1 = 0; i1 < outIDCount; i1++)
286 pIntfIDItem->
id = *pEntityID;
295 outNumberOfBytes = 0;
300 DPRINT(
"Buffer size needed: %lu\n", outNumberOfBytes);
304 if (NumberOfBytesReturned)
305 *NumberOfBytesReturned = 0;
345 for (iAddr = 0; iAddr < pIntfIDItem->
numaddr; iAddr++)
347 DPRINT(
"BufLen %lu\n",BufLenNeeded);
359 bCastAddr = (pIPAddrEntry->
iae_bcastaddr == 0) ? 0 : 0xffffffff;
377 pEntityID = outEntityID;
378 for (i1 = 0; i1 < outIDCount; i1++)
406 for (iAddr = 0; iAddr < pIntfIDItem->
numaddr; iAddr++)
419 if (NumberOfBytesReturned)
420 *NumberOfBytesReturned = outNumberOfBytes;
421 if (NeedsCompletion !=
NULL)
422 *NeedsCompletion =
FALSE;
426 DPRINT(
"WSHIoctl_GetInterfaceList - CLEANUP\n");
429 if (pIFEntry !=
NULL)
#define IP_MIB_ADDRTABLE_ENTRY_ID
static void list_remove(struct list_entry *entry)
static void list_add_head(struct list_entry *head, struct list_entry *entry)
static void list_init(struct list_entry *head)
BOOL WINAPI DeviceIoControl(IN HANDLE hDevice, IN DWORD dwIoControlCode, IN LPVOID lpInBuffer OPTIONAL, IN DWORD nInBufferSize OPTIONAL, OUT LPVOID lpOutBuffer OPTIONAL, IN DWORD nOutBufferSize OPTIONAL, OUT LPDWORD lpBytesReturned OPTIONAL, IN LPOVERLAPPED lpOverlapped OPTIONAL)
#define NT_SUCCESS(StatCode)
#define HeapFree(x, y, z)
static void cleanup(void)
INT WSHIoctl_GetInterfaceList(IN LPVOID OutputBuffer, IN DWORD OutputBufferLength, OUT LPDWORD NumberOfBytesReturned, OUT LPBOOL NeedsCompletion)
INT GetIPSNMPInfo(IN HANDLE TcpFile, IN TDIEntityID *pEntityID, OUT IPSNMPInfo *outIPSNMPInfo)
INT GetIFEntry(IN HANDLE TcpFile, IN TDIEntityID *pEntityID, OUT IFEntry *pIFEntry, IN ULONG IFEntryLen)
struct _IntfIDItem IntfIDItem
BOOL AllocAndGetEntityArray(IN HANDLE TcpFile, IN HANDLE hHeap, OUT TDIEntityID **ppEntities, OUT PDWORD idCount)
INT GetTdiEntityType(IN HANDLE TcpFile, IN TDIEntityID *pEntityID, OUT PULONG pType)
#define MAX_ADAPTER_DESCRIPTION_LENGTH
NTSYSAPI ULONG WINAPI RtlNtStatusToDosError(NTSTATUS)
@ IF_OPER_STATUS_CONNECTING
#define LIST_FOR_EACH_ENTRY(elem, list, type, field)
#define LIST_FOR_EACH_ENTRY_SAFE_REV(cursor, cursor2, list, type, field)
NTSTATUS openTcpFile(PHANDLE tcpFile, ACCESS_MASK DesiredAccess)
VOID closeTcpFile(HANDLE h)
sockaddr_gen iiBroadcastAddress
IPAddrEntry * pIPAddrEntry0
struct _TDIEntityID TDIEntityID
#define INFO_CLASS_PROTOCOL
#define INFO_CLASS_GENERIC
#define INFO_TYPE_PROVIDER
#define IOCTL_TCP_QUERY_INFORMATION_EX
#define RtlZeroMemory(Destination, Length)
struct sockaddr_in AddressIn
_In_ WDFREQUEST _In_ size_t OutputBufferLength
_Must_inspect_result_ _In_ WDFIOTARGET _In_opt_ WDFREQUEST _In_opt_ PWDF_MEMORY_DESCRIPTOR OutputBuffer
DWORD WINAPI GetLastError(void)
struct _INTERFACE_INFO INTERFACE_INFO
struct _INTERFACE_INFO * LPINTERFACE_INFO