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

Go to the source code of this file.

Macros

#define NDEBUG
 

Functions

static DWORD WINAPI InterfaceShowInterface (LPCWSTR pwszMachine, LPWSTR *argv, DWORD dwCurrentIndex, DWORD dwArgCount, DWORD dwFlags, LPCVOID pvData, BOOL *pbDone)
 
static DWORD WINAPI InterfaceDumpFn (_In_ LPCWSTR pwszRouter, _In_ LPWSTR *ppwcArguments, _In_ DWORD dwArgCount, _In_ LPCVOID pvData)
 
DWORD WINAPI InterfaceStart (_In_ const GUID *pguidParent, _In_ DWORD dwVersion)
 
DWORD WINAPI RegisterInterfaceHelper (VOID)
 

Variables

static FN_HANDLE_CMD InterfaceShowInterface
 
static CMD_ENTRY InterfaceShowCommands []
 
static CMD_GROUP_ENTRY InterfaceGroups []
 

Macro Definition Documentation

◆ NDEBUG

#define NDEBUG

Definition at line 12 of file interface.c.

Function Documentation

◆ InterfaceDumpFn()

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

Definition at line 56 of file interface.c.

61{
62 DPRINT("InterfaceDumpFn(%S %p %lu %p)\n", pwszRouter, ppwcArguments, dwArgCount, pvData);
63
65 PrintMessage(L"# Interface Configuration\n");
67 PrintMessage(L"pushd interface\n");
69
71 PrintMessage(L"popd\n");
72 PrintMessage(L"# End of Interface Configuration\n");
74
75 return ERROR_SUCCESS;
76}
VOID PrintMessage(DWORD dwMessage)
Definition: arp.c:95
static HINSTANCE hDllInstance
Definition: clb.c:9
#define ERROR_SUCCESS
Definition: deptool.c:10
#define IDS_DUMP_NEWLINE
Definition: resource.h:32
#define IDS_DUMP_HEADERLINE
Definition: resource.h:33
#define L(x)
Definition: resources.c:13
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

Referenced by InterfaceStart().

◆ InterfaceShowInterface()

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

Definition at line 38 of file interface.c.

46{
47 PrintMessage(L"InterfaceShowInterface(): Not implemented yet!\n");
48
49 return ERROR_SUCCESS;
50}

◆ InterfaceStart()

DWORD WINAPI InterfaceStart ( _In_ const GUID pguidParent,
_In_ DWORD  dwVersion 
)

Definition at line 81 of file interface.c.

84{
85 NS_CONTEXT_ATTRIBUTES ContextAttributes;
86
87 DPRINT("InterfaceStart()\n");
88
89 ZeroMemory(&ContextAttributes, sizeof(ContextAttributes));
90 ContextAttributes.dwVersion = 1;
91 ContextAttributes.pwszContext = L"interface";
92 ContextAttributes.guidHelper = GUID_IFMON_INTERFACE;
93
94 ContextAttributes.ulNumTopCmds = 0;
95 ContextAttributes.pTopCmds = NULL;
96
97 ContextAttributes.ulNumGroups = sizeof(InterfaceGroups) / sizeof(CMD_GROUP_ENTRY);
98 ContextAttributes.pCmdGroups = InterfaceGroups;
99
100 ContextAttributes.pfnDumpFn = InterfaceDumpFn;
101
102 RegisterContext(&ContextAttributes);
103
104 return ERROR_SUCCESS;
105}
DWORD WINAPI RegisterContext(_In_ const NS_CONTEXT_ATTRIBUTES *pChildContext)
Definition: context.c:909
#define NULL
Definition: types.h:112
static CMD_GROUP_ENTRY InterfaceGroups[]
Definition: interface.c:29
static DWORD WINAPI InterfaceDumpFn(_In_ LPCWSTR pwszRouter, _In_ LPWSTR *ppwcArguments, _In_ DWORD dwArgCount, _In_ LPCVOID pvData)
Definition: interface.c:56
#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 RegisterInterfaceHelper().

◆ RegisterInterfaceHelper()

DWORD WINAPI RegisterInterfaceHelper ( VOID  )

Definition at line 110 of file interface.c.

111{
112 NS_HELPER_ATTRIBUTES HelperAttributes;
113
114 DPRINT("RegisterInterfaceHelper()\n");
115
116 ZeroMemory(&HelperAttributes, sizeof(HelperAttributes));
117 HelperAttributes.dwVersion = 1;
118 HelperAttributes.guidHelper = GUID_IFMON_INTERFACE;
119 HelperAttributes.pfnStart = InterfaceStart;
120 HelperAttributes.pfnStop = NULL;
121 RegisterHelper(NULL, &HelperAttributes);
122
123 return ERROR_SUCCESS;
124}
DWORD WINAPI InterfaceStart(_In_ const GUID *pguidParent, _In_ DWORD dwVersion)
Definition: interface.c:81
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

◆ InterfaceGroups

CMD_GROUP_ENTRY InterfaceGroups[]
static
Initial value:
=
{
}
static CMD_ENTRY InterfaceShowCommands[]
Definition: interface.c:22
#define IDS_HLP_INTERFACE_SHOW
Definition: resource.h:2
Definition: netsh.h:148

Definition at line 29 of file interface.c.

Referenced by InterfaceStart().

◆ InterfaceShowCommands

CMD_ENTRY InterfaceShowCommands[]
static
Initial value:
=
{
}
static FN_HANDLE_CMD InterfaceShowInterface
Definition: interface.c:18
#define IDS_HLP_INTERFACE_SHOW_INTERFACE
Definition: resource.h:3
#define IDS_HLP_INTERFACE_SHOW_INTERFACE_EX
Definition: resource.h:4

Definition at line 22 of file interface.c.

◆ InterfaceShowInterface

FN_HANDLE_CMD InterfaceShowInterface
static

Definition at line 18 of file interface.c.