ReactOS 0.4.16-dev-1946-g52006dd
ip.c File Reference
#include "precomp.h"
#include <guiddef.h>
#include <debug.h>
#include "guid.h"
#include "resource.h"
Include dependency graph for ip.c:

Go to the source code of this file.

Macros

#define NDEBUG
 
#define DISPLAY_ADRESSES   0x1
 
#define DISPLAY_DNS   0x2
 

Functions

static BOOL FormatIPv4Address (_Out_ PWCHAR pBuffer, _In_ PSOCKET_ADDRESS SocketAddress)
 
static BOOL FormatIPv4NetMask (_Out_ PWCHAR pBuffer, _In_ ULONG PrefixLength)
 
static DWORD IpShowAdapters (_In_ DWORD DisplayFlags, _In_ PWSTR InterfaceName)
 
static DWORD WINAPI IpShowAddresses (LPCWSTR pwszMachine, LPWSTR *argv, DWORD dwCurrentIndex, DWORD dwArgCount, DWORD dwFlags, LPCVOID pvData, BOOL *pbDone)
 
static DWORD WINAPI IpShowConfig (LPCWSTR pwszMachine, LPWSTR *argv, DWORD dwCurrentIndex, DWORD dwArgCount, DWORD dwFlags, LPCVOID pvData, BOOL *pbDone)
 
static DWORD WINAPI IpShowDns (LPCWSTR pwszMachine, LPWSTR *argv, DWORD dwCurrentIndex, DWORD dwArgCount, DWORD dwFlags, LPCVOID pvData, BOOL *pbDone)
 
static DWORD WINAPI IpDumpFn (_In_ LPCWSTR pwszRouter, _In_ LPWSTR *ppwcArguments, _In_ DWORD dwArgCount, _In_ LPCVOID pvData)
 
static DWORD WINAPI IpStart (_In_ const GUID *pguidParent, _In_ DWORD dwVersion)
 
DWORD WINAPI RegisterIpHelper (VOID)
 

Variables

static FN_HANDLE_CMD IpShowAddresses
 
static FN_HANDLE_CMD IpShowConfig
 
static FN_HANDLE_CMD IpShowDns
 
static CMD_ENTRY IpShowCommands []
 
static CMD_GROUP_ENTRY IpGroups []
 

Macro Definition Documentation

◆ DISPLAY_ADRESSES

#define DISPLAY_ADRESSES   0x1

Definition at line 18 of file ip.c.

◆ DISPLAY_DNS

#define DISPLAY_DNS   0x2

Definition at line 19 of file ip.c.

◆ NDEBUG

#define NDEBUG

Definition at line 12 of file ip.c.

Function Documentation

◆ FormatIPv4Address()

static BOOL FormatIPv4Address ( _Out_ PWCHAR  pBuffer,
_In_ PSOCKET_ADDRESS  SocketAddress 
)
static

Definition at line 47 of file ip.c.

50{
51 if (SocketAddress->lpSockaddr->sa_family == AF_INET)
52 {
53 struct sockaddr_in *si = (struct sockaddr_in *)(SocketAddress->lpSockaddr);
55 return TRUE;
56 }
57
58 return FALSE;
59}
#define TRUE
Definition: types.h:120
#define FALSE
Definition: types.h:117
#define AF_INET
Definition: tcpip.h:117
NTSYSAPI PWSTR NTAPI RtlIpv4AddressToStringW(_In_ const struct in_addr *Addr, _Out_writes_(16) PWCHAR S)
PVOID pBuffer
struct in_addr sin_addr
Definition: winsock.h:506

Referenced by IpDumpFn(), and IpShowAdapters().

◆ FormatIPv4NetMask()

static BOOL FormatIPv4NetMask ( _Out_ PWCHAR  pBuffer,
_In_ ULONG  PrefixLength 
)
static

Definition at line 64 of file ip.c.

67{
68 ULONG i;
69 IN_ADDR NetMask;
70
71 NetMask.S_un.S_addr = 0;
72 for (i = 0; i < PrefixLength; i++)
73 NetMask.S_un.S_addr = NetMask.S_un.S_addr | (1 << (31 - i));
74
76 return TRUE;
77}
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
Definition: tcpip.h:126
u_long S_addr
Definition: tcpip.h:131
union in_addr::@1141 S_un
uint32_t ULONG
Definition: typedefs.h:59

Referenced by IpShowAdapters().

◆ IpDumpFn()

static DWORD WINAPI IpDumpFn ( _In_ LPCWSTR  pwszRouter,
_In_ LPWSTR ppwcArguments,
_In_ DWORD  dwArgCount,
_In_ LPCVOID  pvData 
)
static

Definition at line 329 of file ip.c.

334{
335 PIP_ADAPTER_ADDRESSES pAdapterAddresses = NULL, Ptr;
336 PIP_ADAPTER_UNICAST_ADDRESS pUnicastAddress;
337// PIP_ADAPTER_PREFIX pPrefix;
338 PIP_ADAPTER_DNS_SERVER_ADDRESS pDnsServer;
339 WCHAR AddressBuffer[17], MaskBuffer[17];
340 ULONG adaptOutBufLen = 15000;
341 ULONG Flags = GAA_FLAG_SKIP_ANYCAST | GAA_FLAG_SKIP_MULTICAST | GAA_FLAG_INCLUDE_PREFIX;
343
344 DPRINT("IpDumpFn(%S %p %lu %p)\n", pwszRouter, ppwcArguments, dwArgCount, pvData);
345
347 PrintMessage(L"# Interface IP Configuration\n");
349 PrintMessage(L"pushd interface ip\n");
351
352 /* set required buffer size */
353 pAdapterAddresses = (PIP_ADAPTER_ADDRESSES)malloc(adaptOutBufLen);
354 if (pAdapterAddresses == NULL)
355 {
357 goto done;
358 }
359
360 Error = GetAdaptersAddresses(AF_INET, Flags, NULL, pAdapterAddresses, &adaptOutBufLen);
362 {
363 free(pAdapterAddresses);
364 pAdapterAddresses = (PIP_ADAPTER_ADDRESSES)malloc(adaptOutBufLen);
365 if (pAdapterAddresses == NULL)
366 {
368 goto done;
369 }
370 }
371
372 Error = GetAdaptersAddresses(AF_INET, Flags, NULL, pAdapterAddresses, &adaptOutBufLen);
373 if (Error != ERROR_SUCCESS)
374 goto done;
375
376 Ptr = pAdapterAddresses;
377 while (Ptr)
378 {
379 if (Ptr->IfType != IF_TYPE_SOFTWARE_LOOPBACK)
380 {
384
385 if (Ptr->Flags & IP_ADAPTER_DHCP_ENABLED)
386 {
387 PrintMessage(L"set address name=\"%s\" source=dhcp\n",
388 Ptr->FriendlyName);
389 }
390 else
391 {
392 pUnicastAddress = Ptr->FirstUnicastAddress;
393 while (pUnicastAddress)
394 {
395 FormatIPv4Address(AddressBuffer, &pUnicastAddress->Address);
396 wcscpy(MaskBuffer, L"?");
397
398 PrintMessage(L"set address name=\"%s\" source=static address=%s mask=%s\n",
399 Ptr->FriendlyName, AddressBuffer, MaskBuffer);
400
401 pUnicastAddress = pUnicastAddress->Next;
402 }
403 }
404
405 if (Ptr->Flags & IP_ADAPTER_DHCP_ENABLED)
406 {
407 PrintMessage(L"set dns name=\"%s\" source=dhcp\n",
408 Ptr->FriendlyName);
409 }
410 else
411 {
412 pDnsServer = Ptr->FirstDnsServerAddress;
413 while (pDnsServer)
414 {
415 FormatIPv4Address(AddressBuffer, &pDnsServer->Address);
416
417 PrintMessage(L"set dns name=\"%s\" source=%s address=%s\n",
418 Ptr->FriendlyName);
419
420 pDnsServer = pDnsServer->Next;
421 }
422
423 }
424
426 }
427
428 Ptr = Ptr->Next;
429 }
430
431done:
432 if (pAdapterAddresses)
433 free(pAdapterAddresses);
434
436 PrintMessage(L"popd\n");
437 PrintMessage(L"# End of Interface IP Configuration\n");
439
440 return ERROR_SUCCESS;
441}
VOID PrintMessage(DWORD dwMessage)
Definition: arp.c:95
BOOL Error
Definition: chkdsk.c:66
static HINSTANCE hDllInstance
Definition: clb.c:9
wcscpy
#define ERROR_NOT_ENOUGH_MEMORY
Definition: dderror.h:7
#define free
Definition: debug_ros.c:5
#define malloc
Definition: debug_ros.c:4
#define ERROR_SUCCESS
Definition: deptool.c:10
#define NULL
Definition: types.h:112
static BOOL FormatIPv4Address(_Out_ PWCHAR pBuffer, _In_ PSOCKET_ADDRESS SocketAddress)
Definition: ip.c:47
#define IDS_DUMP_NEWLINE
Definition: resource.h:32
#define IDS_DUMP_IP_HEADER
Definition: resource.h:34
#define IDS_DUMP_HEADERLINE
Definition: resource.h:33
#define L(x)
Definition: resources.c:13
unsigned long DWORD
Definition: ntddk_ex.h:95
_Must_inspect_result_ _In_ PFSRTL_PER_STREAM_CONTEXT Ptr
Definition: fsrtlfuncs.h:898
#define IF_TYPE_SOFTWARE_LOOPBACK
Definition: ipifcons.h:44
DWORD CDECL PrintMessageFromModule(_In_ HANDLE hModule, _In_ DWORD dwMsgId,...)
Definition: netsh.c:523
_In_ LPWSTR _In_ DWORD _In_ LPCVOID pvData
Definition: netsh.h:116
_In_ LPWSTR * ppwcArguments
Definition: netsh.h:114
_In_ LPWSTR _In_ DWORD dwArgCount
Definition: netsh.h:115
#define DPRINT
Definition: sndvol32.h:73
#define ERROR_BUFFER_OVERFLOW
Definition: winerror.h:307
_Must_inspect_result_ _In_ ULONG Flags
Definition: wsk.h:170
__wchar_t WCHAR
Definition: xmlstorage.h:180

Referenced by IpStart().

◆ IpShowAdapters()

static DWORD IpShowAdapters ( _In_ DWORD  DisplayFlags,
_In_ PWSTR  InterfaceName 
)
static

Definition at line 82 of file ip.c.

85{
86 PIP_ADAPTER_ADDRESSES pAdapterAddresses = NULL, Ptr;
87 PIP_ADAPTER_UNICAST_ADDRESS pUnicastAddress;
88 PIP_ADAPTER_PREFIX pPrefix;
89 PIP_ADAPTER_DNS_SERVER_ADDRESS pDnsServer;
90 WCHAR IpBuffer[17], MaskBuffer[17];
91 BOOL First;
92 ULONG adaptOutBufLen = 15000;
94 ULONG Flags = GAA_FLAG_SKIP_ANYCAST | GAA_FLAG_SKIP_MULTICAST | GAA_FLAG_INCLUDE_PREFIX;
95
96 /* set required buffer size */
97 pAdapterAddresses = (PIP_ADAPTER_ADDRESSES)malloc(adaptOutBufLen);
98 if (pAdapterAddresses == NULL)
99 {
101 goto done;
102 }
103
104 Error = GetAdaptersAddresses(AF_INET, Flags, NULL, pAdapterAddresses, &adaptOutBufLen);
106 {
107 free(pAdapterAddresses);
108 pAdapterAddresses = (PIP_ADAPTER_ADDRESSES)malloc(adaptOutBufLen);
109 if (pAdapterAddresses == NULL)
110 {
112 goto done;
113 }
114 }
115
116 Error = GetAdaptersAddresses(AF_INET, Flags, NULL, pAdapterAddresses, &adaptOutBufLen);
117 if (Error != ERROR_SUCCESS)
118 goto done;
119
120 Ptr = pAdapterAddresses;
121 while (Ptr)
122 {
123 if (InterfaceName == NULL || MatchToken(InterfaceName, Ptr->FriendlyName))
124 {
126
127 if (DisplayFlags & DISPLAY_ADRESSES)
128 {
129 PrintMessageFromModule(hDllInstance, (Ptr->Flags & IP_ADAPTER_DHCP_ENABLED) ? IDS_DHCP_ON : IDS_DHCP_OFF);
130
131 if (Ptr->FirstUnicastAddress == NULL)
132 {
134 }
135 else
136 {
137 First = TRUE;
138 pUnicastAddress = Ptr->FirstUnicastAddress;
139 while (pUnicastAddress)
140 {
141 if (FormatIPv4Address(IpBuffer, &pUnicastAddress->Address))
142 {
144#if 0
145 if (First)
146 {
147 PrintMessageFromModule(hDllInstance, (pUnicastAddress->Next)? IDS_IPADDRESSES : IDS_IPADDRESS, IpBuffer);
148 }
149 else
150 {
152 }
153 First = FALSE;
154#endif
155 }
156
157 pUnicastAddress = pUnicastAddress->Next;
158 }
159 }
160
161 if (Ptr->FirstPrefix == NULL)
162 {
163 PrintMessage(L" SubnetMask: %s\n", L"None");
164 }
165 else
166 {
167 First = TRUE;
168 pPrefix = Ptr->FirstPrefix;
169 while (pPrefix)
170 {
171 FormatIPv4NetMask(MaskBuffer, pPrefix->PrefixLength);
172 PrintMessage(L" SubnetMask: %s\n", MaskBuffer);
173#if 0
174 if (FormatIPv4Address(IpBuffer, &pPrefix->Address))
175 {
176 FormatIPv4NetMask(MaskBuffer, pPrefix->PrefixLength);
177
178 if (First)
179 {
180 if (pPrefix->Next)
181 PrintMessage(L" SubnetMasks: %s/%lu (Mask: %s)\n", IpBuffer, pPrefix->PrefixLength, MaskBuffer);
182 else
183 PrintMessage(L" SubnetMask: %s/%lu (Mask: %s)\n", IpBuffer, pPrefix->PrefixLength, MaskBuffer);
184 }
185 else
186 {
187 PrintMessage(L" %s/%lu (Mask: %s)\n", IpBuffer, pPrefix->PrefixLength, MaskBuffer);
188 }
189 First = FALSE;
190 }
191#endif
192 pPrefix = pPrefix->Next;
193 }
194 }
195
196// PrintMessage(L" Default Gateway: %s\n", L"---");
197// PrintMessage(L" Gateway Metric: %s\n", L"---");
198// PrintMessage(L" Interface Metric: %s\n", L"---");
199 }
200
201 if (DisplayFlags & DISPLAY_DNS)
202 {
203 if (Ptr->FirstDnsServerAddress == NULL)
204 {
205 if (Ptr->Flags & IP_ADAPTER_DHCP_ENABLED)
206 PrintMessage(L" DNS servers configured through DHCP: %s\n", L"None");
207 else
208 PrintMessage(L" Statically configured DNS Servers: %s\n", L"None");
209 }
210 else
211 {
212 First = TRUE;
213 pDnsServer = Ptr->FirstDnsServerAddress;
214 while (pDnsServer)
215 {
216 if (FormatIPv4Address(IpBuffer, &pDnsServer->Address))
217 {
218 if (First == TRUE)
219 {
220 if (Ptr->Flags & IP_ADAPTER_DHCP_ENABLED)
221 PrintMessage(L" DNS servers configured through DHCP: %s\n", IpBuffer);
222 else
223 PrintMessage(L" Statically configured DNS Servers: %s\n", IpBuffer);
224 }
225 else
226 {
227 PrintMessage(L" %s\n", IpBuffer);
228 }
229
230 First = FALSE;
231 }
232
233 pDnsServer = pDnsServer->Next;
234 }
235 }
236
237// PrintMessage(L" Register with which suffix:\n");
238 }
239 }
240
241 Ptr = Ptr->Next;
242 }
243
244 PrintMessage(L"\n");
245
246done:
247 if (pAdapterAddresses)
248 free(pAdapterAddresses);
249
250 return Error;
251}
WCHAR First[]
Definition: FormatMessage.c:11
#define IDS_IPADDRESS
Definition: resource.h:26
#define IDS_EMPTYLINE
Definition: resource.h:16
static BOOL FormatIPv4NetMask(_Out_ PWCHAR pBuffer, _In_ ULONG PrefixLength)
Definition: ip.c:64
#define DISPLAY_DNS
Definition: ip.c:19
#define DISPLAY_ADRESSES
Definition: ip.c:18
#define IDS_IPADDRESSES
Definition: resource.h:25
#define IDS_NOIPADDRESS
Definition: resource.h:23
#define IDS_IP_HEADER
Definition: resource.h:20
#define IDS_DHCP_ON
Definition: resource.h:21
#define IDS_DHCP_OFF
Definition: resource.h:22
unsigned int BOOL
Definition: ntddk_ex.h:94
BOOL WINAPI MatchToken(_In_ LPCWSTR pwszUserToken, _In_ LPCWSTR pwszCmdToken)
Definition: netsh.c:371

Referenced by IpShowAddresses(), IpShowConfig(), and IpShowDns().

◆ IpShowAddresses()

static DWORD WINAPI IpShowAddresses ( LPCWSTR  pwszMachine,
LPWSTR argv,
DWORD  dwCurrentIndex,
DWORD  dwArgCount,
DWORD  dwFlags,
LPCVOID  pvData,
BOOL pbDone 
)
static

Definition at line 257 of file ip.c.

265{
266 PWSTR pszInterfaceName = NULL;
267
268 if (dwArgCount - dwCurrentIndex > 1)
270
271 if (dwArgCount - dwCurrentIndex == 1)
272 pszInterfaceName = argv[dwCurrentIndex];
273
274 return IpShowAdapters(DISPLAY_ADRESSES, pszInterfaceName);
275}
#define ERROR_INVALID_PARAMETER
Definition: compat.h:101
static DWORD IpShowAdapters(_In_ DWORD DisplayFlags, _In_ PWSTR InterfaceName)
Definition: ip.c:82
#define argv
Definition: mplay32.c:18
_In_ LPWSTR _In_ DWORD dwCurrentIndex
Definition: netsh.h:139
uint16_t * PWSTR
Definition: typedefs.h:56

◆ IpShowConfig()

static DWORD WINAPI IpShowConfig ( LPCWSTR  pwszMachine,
LPWSTR argv,
DWORD  dwCurrentIndex,
DWORD  dwArgCount,
DWORD  dwFlags,
LPCVOID  pvData,
BOOL pbDone 
)
static

Definition at line 281 of file ip.c.

289{
290 PWSTR pszInterfaceName = NULL;
291
292 if (dwArgCount - dwCurrentIndex > 1)
294
295 if (dwArgCount - dwCurrentIndex == 1)
296 pszInterfaceName = argv[dwCurrentIndex];
297
298 return IpShowAdapters(DISPLAY_ADRESSES | DISPLAY_DNS, pszInterfaceName);
299}

◆ IpShowDns()

static DWORD WINAPI IpShowDns ( LPCWSTR  pwszMachine,
LPWSTR argv,
DWORD  dwCurrentIndex,
DWORD  dwArgCount,
DWORD  dwFlags,
LPCVOID  pvData,
BOOL pbDone 
)
static

Definition at line 305 of file ip.c.

313{
314 PWSTR pszInterfaceName = NULL;
315
316 if (dwArgCount - dwCurrentIndex > 1)
318
319 if (dwArgCount - dwCurrentIndex == 1)
320 pszInterfaceName = argv[dwCurrentIndex];
321
322 return IpShowAdapters(DISPLAY_DNS, pszInterfaceName);
323}

◆ IpStart()

static DWORD WINAPI IpStart ( _In_ const GUID pguidParent,
_In_ DWORD  dwVersion 
)
static

Definition at line 447 of file ip.c.

450{
451 NS_CONTEXT_ATTRIBUTES ContextAttributes;
452
453 DPRINT1("IpStart()\n");
454
455 ZeroMemory(&ContextAttributes, sizeof(ContextAttributes));
456 ContextAttributes.dwVersion = 1;
457 ContextAttributes.pwszContext = L"ip";
458 ContextAttributes.guidHelper = GUID_IFMON_IP;
459
460 ContextAttributes.ulNumTopCmds = 0;
461 ContextAttributes.pTopCmds = NULL;
462
463 ContextAttributes.ulNumGroups = sizeof(IpGroups) / sizeof(CMD_GROUP_ENTRY);
464 ContextAttributes.pCmdGroups = IpGroups;
465
466 ContextAttributes.pfnDumpFn = IpDumpFn;
467
468 RegisterContext(&ContextAttributes);
469
470 return ERROR_SUCCESS;
471}
DWORD WINAPI RegisterContext(_In_ const NS_CONTEXT_ATTRIBUTES *pChildContext)
Definition: context.c:909
#define DPRINT1
Definition: precomp.h:8
static CMD_GROUP_ENTRY IpGroups[]
Definition: ip.c:39
static DWORD WINAPI IpDumpFn(_In_ LPCWSTR pwszRouter, _In_ LPWSTR *ppwcArguments, _In_ DWORD dwArgCount, _In_ LPCVOID pvData)
Definition: ip.c:329
#define ZeroMemory
Definition: minwinbase.h:31
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

Referenced by RegisterIpHelper().

◆ RegisterIpHelper()

DWORD WINAPI RegisterIpHelper ( VOID  )

Definition at line 476 of file ip.c.

477{
478 NS_HELPER_ATTRIBUTES HelperAttributes;
479 GUID guidParent = GUID_IFMON_INTERFACE;
480
481 DPRINT1("RegisterIpHelper()\n");
482
483 ZeroMemory(&HelperAttributes, sizeof(HelperAttributes));
484 HelperAttributes.dwVersion = 1;
485 HelperAttributes.guidHelper = GUID_IFMON_IP;
486 HelperAttributes.pfnStart = IpStart;
487 HelperAttributes.pfnStop = NULL;
488 RegisterHelper(&guidParent, &HelperAttributes);
489
490 return ERROR_SUCCESS;
491}
static DWORD WINAPI IpStart(_In_ const GUID *pguidParent, _In_ DWORD dwVersion)
Definition: ip.c:447
DWORD WINAPI RegisterHelper(_In_ const GUID *pguidParentHelper, _In_ const NS_HELPER_ATTRIBUTES *pHelperAttributes)
Definition: helper.c:385
PNS_HELPER_STOP_FN pfnStop
Definition: netsh.h:180
PNS_HELPER_START_FN pfnStart
Definition: netsh.h:179

Referenced by InitHelperDll().

Variable Documentation

◆ IpGroups

CMD_GROUP_ENTRY IpGroups[]
static
Initial value:
=
{
{L"show", IDS_HLP_IP_SHOW, sizeof(IpShowCommands) / sizeof(CMD_ENTRY), 0, IpShowCommands, NULL},
}
static CMD_ENTRY IpShowCommands[]
Definition: ip.c:29
#define IDS_HLP_IP_SHOW
Definition: resource.h:6
Definition: netsh.h:148

Definition at line 39 of file ip.c.

Referenced by IpStart().

◆ IpShowAddresses

FN_HANDLE_CMD IpShowAddresses
static

Definition at line 22 of file ip.c.

◆ IpShowCommands

CMD_ENTRY IpShowCommands[]
static
Initial value:
=
{
}
static FN_HANDLE_CMD IpShowAddresses
Definition: ip.c:22
static FN_HANDLE_CMD IpShowConfig
Definition: ip.c:23
static FN_HANDLE_CMD IpShowDns
Definition: ip.c:24
#define IDS_HLP_DNS
Definition: resource.h:11
#define IDS_HLP_ADDRESSES
Definition: resource.h:7
#define IDS_HLP_DNS_EX
Definition: resource.h:12
#define IDS_HLP_ADDRESSES_EX
Definition: resource.h:8
#define IDS_HLP_CONFIG_EX
Definition: resource.h:10
#define IDS_HLP_CONFIG
Definition: resource.h:9

Definition at line 29 of file ip.c.

◆ IpShowConfig

FN_HANDLE_CMD IpShowConfig
static

Definition at line 23 of file ip.c.

◆ IpShowDns

FN_HANDLE_CMD IpShowDns
static

Definition at line 24 of file ip.c.