ReactOS 0.4.17-dev-116-ga4b6fe9
ip.c
Go to the documentation of this file.
1/*
2 * PROJECT: ReactOS IF Monitor DLL
3 * LICENSE: GPL-2.0-or-later (https://spdx.org/licenses/GPL-2.0-or-later)
4 * PURPOSE: IP context functions
5 * COPYRIGHT: Copyright 2025 Eric Kohl <eric.kohl@reactos.org>
6 */
7
8#include "precomp.h"
9
10#include <guiddef.h>
11#include <devguid.h>
12
13#define NDEBUG
14#include <debug.h>
15
16#include "guid.h"
17#include "resource.h"
18
19#define DISPLAY_ADRESSES 0x1
20#define DISPLAY_DNS 0x2
21
22
23static FN_HANDLE_CMD IpShowAddresses;
24static FN_HANDLE_CMD IpShowConfig;
25static FN_HANDLE_CMD IpShowDns;
26
27
28static
31{
35};
36
37
38static
41{
42 {L"show", IDS_HLP_IP_SHOW, sizeof(IpShowCommands) / sizeof(CMD_ENTRY), 0, IpShowCommands, NULL},
43};
44
45
46static
50 PTCPIP_PROPERTIES *ppProperties)
51{
52 INetCfg *pNetCfg = NULL;
53 INetCfgLock *pNetCfgLock = NULL;
54 INetCfgClass *pNetCfgClass = NULL;
55 INetCfgComponent *pTcpipComponent = NULL;
56 INetCfgComponentPrivate *pTcpipComponentPrivate = NULL;
57 ITcpipProperties *pTcpipProperties = NULL;
58
59 BOOL fWriteLocked = FALSE, fInitialized = FALSE;
60 HRESULT hr;
61
62 DPRINT("GetInterfaceProperties()\n");
63
65 if (hr != S_OK)
66 {
67 DPRINT1("CoInitialize failed\n");
68 goto exit;
69 }
70
72 NULL,
73 CLSCTX_INPROC_SERVER,
75 (PVOID*)&pNetCfg);
76 if (hr != S_OK)
77 {
78 DPRINT1("CoCreateInstance failed\n");
79 goto exit;
80 }
81
82 /* Acquire the write-lock */
83 hr = INetCfg_QueryInterface(pNetCfg,
85 (PVOID*)&pNetCfgLock);
86 if (hr != S_OK)
87 {
88 DPRINT1("QueryInterface failed\n");
89 goto exit;
90 }
91
92 hr = INetCfgLock_AcquireWriteLock(pNetCfgLock, 5000,
93 L"NetSh",
94 NULL);
95 if (hr != S_OK)
96 {
97 DPRINT1("AcquireWriteLock failed\n");
98 goto exit;
99 }
100
101 fWriteLocked = TRUE;
102
103 /* Initialize the network configuration */
104 hr = INetCfg_Initialize(pNetCfg, NULL);
105 if (hr != S_OK)
106 {
107 DPRINT1("Initialize failed\n");
108 goto exit;
109 }
110
111 fInitialized = TRUE;
112
113 GUID ClassGuid = GUID_DEVCLASS_NETTRANS;
114 hr = INetCfg_QueryNetCfgClass(pNetCfg, &ClassGuid, &IID_INetCfgClass, (PVOID*)&pNetCfgClass);
115 if (hr != S_OK)
116 {
117 DPRINT1("INetCfg_QueryNetCfgClass failed!\n");
118 goto exit;
119 }
120
121 hr = INetCfgClass_FindComponent(pNetCfgClass, L"MS_TCPIP", &pTcpipComponent);
122 if (hr != S_OK)
123 {
124 DPRINT1("INetCfgClass_FindComponent failed\n");
125 goto exit;
126 }
127
128 hr = INetCfgComponent_QueryInterface(pTcpipComponent, &IID_INetCfgComponentPrivate, (PVOID*)&pTcpipComponentPrivate);
129 if (hr != S_OK)
130 {
131 DPRINT1("INetCfgComponent_QueryInterface failed\n");
132 goto exit;
133 }
134
135 hr = INetCfgComponentPrivate_Unknown1(pTcpipComponentPrivate, &IID_ITcpipProperties, (PVOID*)&pTcpipProperties);
136 if (hr != S_OK)
137 {
138 DPRINT1("INetCfgComponentPrivate_Unknown1 failed\n");
139 goto exit;
140 }
141
142 PTCPIP_PROPERTIES pInfo = NULL;
143 hr = ITcpipProperties_Unknown1(pTcpipProperties, InterfaceGuid, &pInfo);
144 if (hr != S_OK)
145 {
146 DPRINT1("ITcpipProperties_Unknown1 failed\n");
147 }
148 else
149 {
150 DPRINT("pInfo: %p\n", pInfo);
151 DPRINT("dwDhcp: %lx\n", pInfo->dwDhcp);
152 DPRINT("IpAddress: %p\n", pInfo->pszIpAddress);
153 DPRINT("IpAddress: %S\n", pInfo->pszIpAddress);
154 DPRINT("SubnetMask: %p\n", pInfo->pszSubnetMask);
155 DPRINT("SubnetMask: %S\n", pInfo->pszSubnetMask);
156 DPRINT("Parameters: %p\n", pInfo->pszParameters);
157 DPRINT("Parameters: %S\n", pInfo->pszParameters);
158
159 *ppProperties = pInfo;
160 }
161
162 DPRINT("Done!\n");
163exit:
164 if (pTcpipProperties)
165 ITcpipProperties_Release(pTcpipProperties);
166
167 if (pTcpipComponentPrivate)
168 INetCfgComponentPrivate_Release(pTcpipComponentPrivate);
169
170 if (pTcpipComponent != NULL)
171 INetCfgComponent_Release(pTcpipComponent);
172
173 if (pNetCfgClass != NULL)
174 INetCfgClass_Release(pNetCfgClass);
175
176 if (fInitialized)
177 INetCfg_Uninitialize(pNetCfg);
178
179 if (fWriteLocked)
180 INetCfgLock_ReleaseWriteLock(pNetCfgLock);
181
182 if (pNetCfgLock != NULL)
183 INetCfgLock_Release(pNetCfgLock);
184
185 if (pNetCfg != NULL)
186 INetCfg_Release(pNetCfg);
187
189
190 DPRINT("GetInterfaceProperties() done!\n");
191
192 return hr;
193}
194
195
196static
197PWSTR
199 PWSTR pszParameters,
200 PWSTR pszParameter)
201{
202 PWSTR pToken, pStart, pEnd, pBuffer;
203 INT length;
204
205 pToken = wcsstr(pszParameters, pszParameter);
206 if (pToken == NULL)
207 return NULL;
208
209 pStart = wcschr(pToken, L'=');
210 if (pStart == NULL)
211 return NULL;
212
213 pStart++;
214 pEnd = wcschr(pStart, L';');
215 if (pEnd == NULL)
216 length = wcslen(pStart);
217 else
218 length = pEnd - pStart;
219
220 if (length == 0)
221 return NULL;
222
224 if (pBuffer)
225 {
226 CopyMemory(pBuffer, pStart, length * sizeof(WCHAR));
227 }
228
229 return pBuffer;
230}
231
232
233static
234DWORD
236 _In_ DWORD DisplayFlags,
237 _In_ PWSTR InterfaceName)
238{
240 DWORD dwCount = 0, i;
241 DWORD dwError;
242 WCHAR szFriendlyName[80];
243 DWORD dwFriendlyNameSize;
244 PTCPIP_PROPERTIES pProperties = NULL;
245 PWSTR pBuffer, pStart, pEnd;
246
248 &dwCount,
249 FALSE,
251 0);
252 if (dwError != ERROR_SUCCESS)
253 {
254 DPRINT1("NhpAllocateAndGetInterfaceInfoFromStack() failed (Error %lu)\n", dwError);
255 return dwError;
256 }
257
258 DPRINT("\nEntries: %lu\n", dwCount);
259
260 for (i = 0; i < dwCount; i++)
261 {
262 DPRINT("\nEntry %lu\n", i);
263 DPRINT("Index: %lu\n", pTable[i].Index);
264 DPRINT("MediaType: %lu\n", pTable[i].MediaType);
265 DPRINT("ConnectionType: %u\n", pTable[i].ConnectionType);
266 DPRINT("AccessType: %u\n", pTable[i].AccessType);
267 DPRINT("DeviceGuid: %08lx\n", pTable[i].DeviceGuid.Data1);
268 DPRINT("InterfaceGuid: %08lx\n", pTable[i].InterfaceGuid.Data1);
269
270 dwFriendlyNameSize = sizeof(szFriendlyName);
272 szFriendlyName,
273 &dwFriendlyNameSize,
274 0,
275 0);
276
277 if ((InterfaceName == NULL) || MatchToken(InterfaceName, szFriendlyName))
278 {
280
281 GetInterfaceProperties(&pTable[i].DeviceGuid, &pProperties);
282
283 if (pProperties)
284 {
285 DPRINT("Dhcp %lu\n", pProperties->dwDhcp);
286 DPRINT("IpAddress %S\n", pProperties->pszIpAddress);
287 DPRINT("SubnetMask %S\n", pProperties->pszSubnetMask);
288 DPRINT("Parameters %S\n", pProperties->pszParameters);
289
290 if (DisplayFlags & DISPLAY_ADRESSES)
291 {
293
294 if (pProperties->dwDhcp == 0)
295 {
296 if (*pProperties->pszIpAddress == UNICODE_NULL)
297 {
299 }
300 else
301 {
303 }
304
305 if (*pProperties->pszSubnetMask == UNICODE_NULL)
306 {
308 }
309 else
310 {
312 }
313
314 pBuffer = ExtractParameterValue(pProperties->pszParameters, L"DefGw");
315 if (pBuffer)
316 {
319 }
320
321 pBuffer = ExtractParameterValue(pProperties->pszParameters, L"GwMetric");
322 if (pBuffer)
323 {
326 }
327 }
328
329 pBuffer = ExtractParameterValue(pProperties->pszParameters, L"IfMetric");
330 if (pBuffer)
331 {
334 }
335 }
336
337 if (DisplayFlags & DISPLAY_DNS)
338 {
339 if (pProperties->dwDhcp == 0)
340 {
341 pBuffer = ExtractParameterValue(pProperties->pszParameters, L"DNS");
342 if (pBuffer)
343 {
344 pEnd = wcschr(pBuffer, L',');
345 if (pEnd == NULL)
346 {
348 }
349 else
350 {
351 pStart = pBuffer;
352 *pEnd = UNICODE_NULL;
354 for (;;)
355 {
356 pStart = pEnd + 1;
357 pEnd = wcschr(pStart, L',');
358 if (pEnd == NULL)
359 break;
360 *pEnd = UNICODE_NULL;
362 }
363 }
365 }
366 }
367 }
368
369 CoTaskMemFree(pProperties);
370 pProperties = NULL;
371 }
372 }
373 }
374
375 if (pTable)
377
378 return ERROR_SUCCESS;
379}
380
381
382static
383DWORD
384WINAPI
386 LPCWSTR pwszMachine,
387 LPWSTR *argv,
392 BOOL *pbDone)
393{
394 PWSTR pszInterfaceName = NULL;
395
396 if (dwArgCount - dwCurrentIndex > 1)
398
399 if (dwArgCount - dwCurrentIndex == 1)
400 pszInterfaceName = argv[dwCurrentIndex];
401
402 return IpShowAdapters(DISPLAY_ADRESSES, pszInterfaceName);
403}
404
405
406static
407DWORD
408WINAPI
410 LPCWSTR pwszMachine,
411 LPWSTR *argv,
416 BOOL *pbDone)
417{
418 PWSTR pszInterfaceName = NULL;
419
420 if (dwArgCount - dwCurrentIndex > 1)
422
423 if (dwArgCount - dwCurrentIndex == 1)
424 pszInterfaceName = argv[dwCurrentIndex];
425
426 return IpShowAdapters(DISPLAY_ADRESSES | DISPLAY_DNS, pszInterfaceName);
427}
428
429
430static
431DWORD
432WINAPI
434 LPCWSTR pwszMachine,
435 LPWSTR *argv,
440 BOOL *pbDone)
441{
442 PWSTR pszInterfaceName = NULL;
443
444 if (dwArgCount - dwCurrentIndex > 1)
446
447 if (dwArgCount - dwCurrentIndex == 1)
448 pszInterfaceName = argv[dwCurrentIndex];
449
450 return IpShowAdapters(DISPLAY_DNS, pszInterfaceName);
451}
452
453
454static
455DWORD
456WINAPI
458 _In_ LPCWSTR pwszRouter,
462{
464 DWORD dwCount = 0, i;
465 DWORD dwError;
466 WCHAR szFriendlyName[80];
467 DWORD dwFriendlyNameSize;
468 PTCPIP_PROPERTIES pProperties = NULL;
470
471 DPRINT("IpDumpFn(%S %p %lu %p)\n", pwszRouter, ppwcArguments, dwArgCount, pvData);
472
474 &dwCount,
475 FALSE,
477 0);
478 if (dwError != ERROR_SUCCESS)
479 {
480 DPRINT1("NhpAllocateAndGetInterfaceInfoFromStack() failed (Error %lu)\n", dwError);
481 return dwError;
482 }
483
487 PrintMessage(L"pushd interface ip\n");
489
490 DPRINT("\nEntries: %lu\n", dwCount);
491
492 for (i = 0; i < dwCount; i++)
493 {
494 DPRINT("\nEntry %lu\n", i);
495 DPRINT("Index: %lu\n", pTable[i].Index);
496 DPRINT("MediaType: %lu\n", pTable[i].MediaType);
497 DPRINT("ConnectionType: %u\n", pTable[i].ConnectionType);
498 DPRINT("AccessType: %u\n", pTable[i].AccessType);
499 DPRINT("DeviceGuid: %08lx\n", pTable[i].DeviceGuid.Data1);
500 DPRINT("InterfaceGuid: %08lx\n", pTable[i].InterfaceGuid.Data1);
501
502 dwFriendlyNameSize = sizeof(szFriendlyName);
504 szFriendlyName,
505 &dwFriendlyNameSize,
506 0,
507 0);
508
512
513 GetInterfaceProperties(&pTable[i].DeviceGuid, &pProperties);
514
515 if (pProperties)
516 {
517 DPRINT("Dhcp %lu\n", pProperties->dwDhcp);
518 DPRINT("IpAddress %S\n", pProperties->pszIpAddress);
519 DPRINT("SubnetMask %S\n", pProperties->pszSubnetMask);
520 DPRINT("Parameters %S\n", pProperties->pszParameters);
521
522 if (pProperties->dwDhcp)
523 {
524 PrintMessage(L"set address name=\"%s\" source=dhcp\n",
525 szFriendlyName);
526 }
527 else
528 {
529 PrintMessage(L"set address name=\"%s\" source=static address=%s mask=%s\n",
530 szFriendlyName, pProperties->pszIpAddress, pProperties->pszSubnetMask);
531 }
532
533 if (pProperties->dwDhcp)
534 {
535 PrintMessage(L"set dns name=\"%s\" source=dhcp\n",
536 szFriendlyName);
537 }
538 else
539 {
540 pBuffer = ExtractParameterValue(pProperties->pszParameters, L"DNS");
541 if (pBuffer)
542 {
543 PrintMessage(L"set dns name=\"%s\" source=static address=%s\n",
544 szFriendlyName, pBuffer);
546 }
547 }
548
549 CoTaskMemFree(pProperties);
550 pProperties = NULL;
551 }
552 }
553
555 PrintMessage(L"popd\n");
558
559 if (pTable)
561
562
563 return ERROR_SUCCESS;
564}
565
566
567static
568DWORD
569WINAPI
571 _In_ const GUID *pguidParent,
573{
574 NS_CONTEXT_ATTRIBUTES ContextAttributes;
575
576 DPRINT1("IpStart()\n");
577
578 ZeroMemory(&ContextAttributes, sizeof(ContextAttributes));
579 ContextAttributes.dwVersion = 1;
580 ContextAttributes.pwszContext = L"ip";
581 ContextAttributes.guidHelper = GUID_IFMON_IP;
582
583 ContextAttributes.ulNumTopCmds = 0;
584 ContextAttributes.pTopCmds = NULL;
585
586 ContextAttributes.ulNumGroups = sizeof(IpGroups) / sizeof(CMD_GROUP_ENTRY);
587 ContextAttributes.pCmdGroups = IpGroups;
588
589 ContextAttributes.pfnDumpFn = IpDumpFn;
590
591 RegisterContext(&ContextAttributes);
592
593 return ERROR_SUCCESS;
594}
595
596
597DWORD
598WINAPI
600{
601 NS_HELPER_ATTRIBUTES HelperAttributes;
602 GUID guidParent = GUID_IFMON_INTERFACE;
603
604 DPRINT1("RegisterIpHelper()\n");
605
606 ZeroMemory(&HelperAttributes, sizeof(HelperAttributes));
607 HelperAttributes.dwVersion = 1;
608 HelperAttributes.guidHelper = GUID_IFMON_IP;
609 HelperAttributes.pfnStart = IpStart;
610 HelperAttributes.pfnStop = NULL;
611 RegisterHelper(&guidParent, &HelperAttributes);
612
613 return ERROR_SUCCESS;
614}
VOID PrintMessage(DWORD dwMessage)
Definition: arp.c:95
#define IDS_DEFAULTGATEWAY
Definition: resource.h:28
#define IDS_IPADDRESS
Definition: resource.h:26
#define IDS_SUBNETMASK
Definition: resource.h:27
#define IDS_EMPTYLINE
Definition: resource.h:16
DWORD WINAPI RegisterContext(_In_ const NS_CONTEXT_ATTRIBUTES *pChildContext)
Definition: context.c:909
#define DPRINT1
Definition: precomp.h:8
static HINSTANCE hDllInstance
Definition: clb.c:9
HRESULT hr
Definition: delayimp.cpp:573
#define ERROR_SUCCESS
Definition: deptool.c:10
#define NULL
Definition: types.h:112
#define TRUE
Definition: types.h:120
#define FALSE
Definition: types.h:117
void WINAPI DECLSPEC_HOTPATCH CoUninitialize(void)
Definition: combase.c:2842
HRESULT WINAPI DECLSPEC_HOTPATCH CoCreateInstance(REFCLSID rclsid, IUnknown *outer, DWORD cls_context, REFIID riid, void **obj)
Definition: combase.c:1685
#define wcschr
Definition: compat.h:17
#define GetProcessHeap()
Definition: compat.h:736
#define ERROR_INVALID_PARAMETER
Definition: compat.h:101
#define HeapAlloc
Definition: compat.h:733
#define HeapFree(x, y, z)
Definition: compat.h:735
#define HEAP_ZERO_MEMORY
Definition: compat.h:134
static DWORD WINAPI IpStart(_In_ const GUID *pguidParent, _In_ DWORD dwVersion)
Definition: ip.c:570
static CMD_GROUP_ENTRY IpGroups[]
Definition: ip.c:40
static FN_HANDLE_CMD IpShowAddresses
Definition: ip.c:23
static HRESULT GetInterfaceProperties(GUID *InterfaceGuid, PTCPIP_PROPERTIES *ppProperties)
Definition: ip.c:48
DWORD WINAPI RegisterIpHelper(VOID)
Definition: ip.c:599
static DWORD IpShowAdapters(_In_ DWORD DisplayFlags, _In_ PWSTR InterfaceName)
Definition: ip.c:235
static CMD_ENTRY IpShowCommands[]
Definition: ip.c:30
static DWORD WINAPI IpDumpFn(_In_ LPCWSTR pwszRouter, _In_ LPWSTR *ppwcArguments, _In_ DWORD dwArgCount, _In_ LPCVOID pvData)
Definition: ip.c:457
static FN_HANDLE_CMD IpShowConfig
Definition: ip.c:24
static PWSTR ExtractParameterValue(PWSTR pszParameters, PWSTR pszParameter)
Definition: ip.c:198
#define DISPLAY_DNS
Definition: ip.c:20
#define DISPLAY_ADRESSES
Definition: ip.c:19
static FN_HANDLE_CMD IpShowDns
Definition: ip.c:25
#define IDS_GATEWAYMETRIC
Definition: resource.h:30
#define IDS_HLP_DNS
Definition: resource.h:11
#define IDS_NOIPADDRESS
Definition: resource.h:23
#define IDS_IP_HEADER
Definition: resource.h:20
#define IDS_NOSUBNETMASK
Definition: resource.h:26
#define IDS_HLP_ADDRESSES
Definition: resource.h:7
#define IDS_DUMP_NEWLINE
Definition: resource.h:37
#define IDS_DHCP_ON
Definition: resource.h:21
#define IDS_DUMP_IP_HEADER
Definition: resource.h:39
#define IDS_HLP_DNS_EX
Definition: resource.h:12
#define IDS_HLP_ADDRESSES_EX
Definition: resource.h:8
#define IDS_DUMP_HEADERLINE
Definition: resource.h:38
#define IDS_HLP_IP_SHOW
Definition: resource.h:6
#define IDS_HLP_CONFIG_EX
Definition: resource.h:10
#define IDS_HLP_CONFIG
Definition: resource.h:9
#define IDS_STATICNAMESERVER
Definition: resource.h:32
#define IDS_DUMP_IP_INTERFACE
Definition: resource.h:40
#define IDS_DUMP_IP_FOOTER
Definition: resource.h:41
#define IDS_INTERFACEMETRIC
Definition: resource.h:31
#define IDS_DHCP_OFF
Definition: resource.h:22
_ACRTIMP size_t __cdecl wcslen(const wchar_t *)
Definition: wcs.c:2983
_ACRTIMP wchar_t *__cdecl wcsstr(const wchar_t *, const wchar_t *)
Definition: wcs.c:2993
HRESULT WINAPI CoInitialize(LPVOID lpReserved)
Definition: compobj.c:531
#define L(x)
Definition: resources.c:13
unsigned int BOOL
Definition: ntddk_ex.h:94
unsigned long DWORD
Definition: ntddk_ex.h:95
GLuint GLsizei GLsizei * length
Definition: glext.h:6040
GLsizei GLenum const GLvoid GLsizei GLenum GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLint GLint GLint GLshort GLshort GLshort GLubyte GLubyte GLubyte GLuint GLuint GLuint GLushort GLushort GLushort GLbyte GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLfloat GLint GLint GLint GLint GLshort GLshort GLshort GLshort GLubyte GLubyte GLubyte GLubyte GLuint GLuint GLuint GLuint GLushort GLushort GLushort GLushort GLboolean const GLdouble const GLfloat const GLint const GLshort const GLbyte const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLdouble const GLfloat const GLfloat const GLint const GLint const GLshort const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort GLenum GLenum GLenum GLfloat GLenum GLint GLenum GLenum GLenum GLfloat GLenum GLenum GLint GLenum GLfloat GLenum GLint GLint GLushort GLenum GLenum GLfloat GLenum GLenum GLint GLfloat const GLubyte GLenum GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLint GLint GLsizei GLsizei GLint GLenum GLenum const GLvoid GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLenum const GLdouble GLenum GLenum const GLfloat GLenum GLenum const GLint GLsizei GLuint GLfloat GLuint GLbitfield GLfloat GLint GLuint GLboolean GLenum GLfloat GLenum GLbitfield GLenum GLfloat GLfloat GLint GLint const GLfloat GLenum GLfloat GLfloat GLint GLint GLfloat GLfloat GLint GLint const GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat const GLdouble const GLfloat const GLdouble const GLfloat GLint i
Definition: glfuncs.h:248
DWORD WINAPI RegisterHelper(_In_ const GUID *pguidParentHelper, _In_ const NS_HELPER_ATTRIBUTES *pHelperAttributes)
Definition: helper.c:385
#define S_OK
Definition: intsafe.h:52
DWORD WINAPI NhGetInterfaceNameFromGuid(_In_ const GUID *pInterfaceGUID, _Out_writes_bytes_to_(*pOutBufLen, *pOutBufLen) PWCHAR pInterfaceName, _Inout_ PULONG pOutBufLen, DWORD dwUnknown4, DWORD dwUnknown5)
DWORD WINAPI NhpAllocateAndGetInterfaceInfoFromStack(_Inout_ IP_INTERFACE_NAME_INFO **ppTable, _Inout_ PDWORD pdwCount, _In_ BOOL bOrder, _In_ HANDLE hHeap, _In_ DWORD dwFlags)
void WINAPI CoTaskMemFree(void *ptr)
Definition: malloc.c:389
#define ZeroMemory
Definition: minwinbase.h:31
#define CopyMemory
Definition: minwinbase.h:29
CONST void * LPCVOID
Definition: minwindef.h:164
#define argv
Definition: mplay32.c:18
#define ITcpipProperties_Unknown1(p, a, b)
Definition: netcfgn_undoc.h:31
EXTERN_C const IID IID_ITcpipProperties
Definition: netcfgn_undoc.h:24
#define ITcpipProperties_Release(p)
Definition: netcfgn_undoc.h:30
#define INetCfgComponent_QueryInterface(p, a, b)
Definition: netcfgx.h:60
#define INetCfg_Release(p)
Definition: netcfgx.h:289
#define INetCfgComponent_Release(p)
Definition: netcfgx.h:62
#define INetCfg_QueryInterface(p, a, b)
Definition: netcfgx.h:287
#define INetCfg_QueryNetCfgClass(p, a, b, c)
Definition: netcfgx.h:296
EXTERN_C const IID IID_INetCfgLock
Definition: netcfgx.h:17
EXTERN_C const IID IID_INetCfgClass
Definition: netcfgx.h:317
EXTERN_C const GUID CLSID_CNetCfg
Definition: netcfgx.h:299
#define INetCfgLock_AcquireWriteLock(p, a, b, c)
Definition: netcfgx.h:24
#define INetCfgLock_ReleaseWriteLock(p)
Definition: netcfgx.h:25
#define INetCfgClass_Release(p)
Definition: netcfgx.h:335
#define INetCfg_Uninitialize(p)
Definition: netcfgx.h:291
#define INetCfgLock_Release(p)
Definition: netcfgx.h:23
EXTERN_C const IID IID_INetCfg
Definition: netcfgx.h:300
#define INetCfgClass_FindComponent(p, a, b)
Definition: netcfgx.h:336
#define INetCfg_Initialize(p, a)
Definition: netcfgx.h:290
#define INetCfgComponentPrivate_Unknown1(p, a, b)
Definition: netcfgx_undoc.h:23
#define INetCfgComponentPrivate_Release(p)
Definition: netcfgx_undoc.h:22
EXTERN_C const IID IID_INetCfgComponentPrivate
Definition: netcfgx_undoc.h:16
BOOL WINAPI MatchToken(_In_ LPCWSTR pwszUserToken, _In_ LPCWSTR pwszCmdToken)
Definition: netsh.c:404
DWORD CDECL PrintMessageFromModule(_In_ HANDLE hModule, _In_ DWORD dwMsgId,...)
Definition: netsh.c:509
_In_ LPWSTR _In_ DWORD _In_ DWORD _In_ DWORD dwFlags
Definition: netsh.h:141
_In_ LPWSTR _In_ DWORD _In_ LPCVOID pvData
Definition: netsh.h:116
_In_ LPWSTR * ppwcArguments
Definition: netsh.h:114
_In_ DWORD dwVersion
Definition: netsh.h:85
_In_ LPWSTR _In_ DWORD dwArgCount
Definition: netsh.h:115
_In_ LPWSTR _In_ DWORD _In_ DWORD _In_ DWORD _In_ LPCVOID _Out_ BOOL * pbDone
Definition: netsh.h:143
_In_ LPWSTR _In_ DWORD dwCurrentIndex
Definition: netsh.h:139
#define _In_
Definition: no_sal2.h:158
#define UNICODE_NULL
short WCHAR
Definition: pedump.c:58
PVOID pBuffer
#define exit(n)
Definition: config.h:202
#define DPRINT
Definition: sndvol32.h:73
Definition: netsh.h:148
Definition: netsh.h:158
CMD_ENTRY * pTopCmds
Definition: netsh.h:199
CMD_GROUP_ENTRY * pCmdGroups
Definition: netsh.h:201
PNS_CONTEXT_DUMP_FN pfnDumpFn
Definition: netsh.h:203
PNS_HELPER_STOP_FN pfnStop
Definition: netsh.h:180
PNS_HELPER_START_FN pfnStart
Definition: netsh.h:179
uint16_t * PWSTR
Definition: typedefs.h:56
const uint16_t * LPCWSTR
Definition: typedefs.h:57
uint16_t * LPWSTR
Definition: typedefs.h:56
int32_t INT
Definition: typedefs.h:58
static const EHCI_PERIOD pTable[]
Definition: usbehci.c:29
_In_ WDFCOLLECTION _In_ ULONG Index
#define WINAPI
Definition: msvc.h:6
static const GUID InterfaceGuid
Definition: wlanapi.c:25