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

Go to the source code of this file.

Macros

#define NDEBUG
 

Functions

static DWORD WINAPI ResetCommand (LPCWSTR pwszMachine, LPWSTR *argv, DWORD dwCurrentIndex, DWORD dwArgCount, DWORD dwFlags, LPCVOID pvData, BOOL *pbDone)
 
static DWORD WINAPI ShowCatalogCommand (LPCWSTR pwszMachine, LPWSTR *argv, DWORD dwCurrentIndex, DWORD dwArgCount, DWORD dwFlags, LPCVOID pvData, BOOL *pbDone)
 
static DWORD WINAPI WinsockStart (_In_ const GUID *pguidParent, _In_ DWORD dwVersion)
 
DWORD WINAPI RegisterWinsockHelper (VOID)
 

Variables

static FN_HANDLE_CMD ResetCommand
 
static FN_HANDLE_CMD ShowCatalogCommand
 
static CMD_ENTRY g_TestCmdTable []
 
static CMD_ENTRY g_WinsockShowCmdTable []
 
static CMD_GROUP_ENTRY g_WinsockGroupCmds []
 

Macro Definition Documentation

◆ NDEBUG

#define NDEBUG

Definition at line 12 of file winsock.c.

Function Documentation

◆ RegisterWinsockHelper()

DWORD WINAPI RegisterWinsockHelper ( VOID  )

Definition at line 104 of file winsock.c.

105{
106 NS_HELPER_ATTRIBUTES HelperAttributes;
107
108 ZeroMemory(&HelperAttributes, sizeof(HelperAttributes));
109 HelperAttributes.dwVersion = 1;
110 HelperAttributes.guidHelper = GUID_IFMON_WINSOCK;
111 HelperAttributes.pfnStart = WinsockStart;
112 HelperAttributes.pfnStop = NULL;
113 RegisterHelper(NULL, &HelperAttributes);
114
115 return ERROR_SUCCESS;
116}
#define ERROR_SUCCESS
Definition: deptool.c:10
#define NULL
Definition: types.h:112
DWORD WINAPI RegisterHelper(_In_ const GUID *pguidParentHelper, _In_ const NS_HELPER_ATTRIBUTES *pHelperAttributes)
Definition: helper.c:385
static DWORD WINAPI WinsockStart(_In_ const GUID *pguidParent, _In_ DWORD dwVersion)
Definition: winsock.c:77
#define ZeroMemory
Definition: minwinbase.h:31
PNS_HELPER_STOP_FN pfnStop
Definition: netsh.h:180
PNS_HELPER_START_FN pfnStart
Definition: netsh.h:179

Referenced by InitHelperDll().

◆ ResetCommand()

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

Definition at line 43 of file winsock.c.

51{
52 PrintMessage(L"ResetCommand(): Not implemented yet!\n");
53 return ERROR_SUCCESS;
54}
VOID PrintMessage(DWORD dwMessage)
Definition: arp.c:95
#define L(x)
Definition: resources.c:13

◆ ShowCatalogCommand()

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

Definition at line 60 of file winsock.c.

68{
69 PrintMessage(L"ShowCatalogCommand(): Not implemented yet!\n");
70 return ERROR_SUCCESS;
71}

◆ WinsockStart()

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

Definition at line 77 of file winsock.c.

80{
81 NS_CONTEXT_ATTRIBUTES ContextAttributes;
82
83 DPRINT1("WinsockStart()\n");
84
85 ZeroMemory(&ContextAttributes, sizeof(ContextAttributes));
86 ContextAttributes.dwVersion = 1;
87 ContextAttributes.pwszContext = L"winsock";
88 ContextAttributes.guidHelper = GUID_IFMON_WINSOCK;
89
90 ContextAttributes.ulNumTopCmds = 1;
91 ContextAttributes.pTopCmds = g_TestCmdTable;
92
93 ContextAttributes.ulNumGroups = 1;
94 ContextAttributes.pCmdGroups = g_WinsockGroupCmds;
95
96 RegisterContext(&ContextAttributes);
97
98 return ERROR_SUCCESS;
99}
DWORD WINAPI RegisterContext(_In_ const NS_CONTEXT_ATTRIBUTES *pChildContext)
Definition: context.c:909
#define DPRINT1
Definition: precomp.h:8
static CMD_GROUP_ENTRY g_WinsockGroupCmds[]
Definition: winsock.c:34
static CMD_ENTRY g_TestCmdTable[]
Definition: winsock.c:22
CMD_ENTRY * pTopCmds
Definition: netsh.h:199
CMD_GROUP_ENTRY * pCmdGroups
Definition: netsh.h:201

Referenced by RegisterWinsockHelper().

Variable Documentation

◆ g_TestCmdTable

CMD_ENTRY g_TestCmdTable[]
static
Initial value:
=
{
}
#define IDS_HLP_WINSOCK_RESET_EX
Definition: resource.h:15
#define IDS_HLP_WINSOCK_RESET
Definition: resource.h:14
static FN_HANDLE_CMD ResetCommand
Definition: winsock.c:18

Definition at line 22 of file winsock.c.

Referenced by WinsockStart().

◆ g_WinsockGroupCmds

CMD_GROUP_ENTRY g_WinsockGroupCmds[]
static
Initial value:
=
{
}
#define IDS_HLP_WINSOCK_SHOW
Definition: resource.h:16
static CMD_ENTRY g_WinsockShowCmdTable[]
Definition: winsock.c:28
Definition: netsh.h:148

Definition at line 34 of file winsock.c.

Referenced by WinsockStart().

◆ g_WinsockShowCmdTable

CMD_ENTRY g_WinsockShowCmdTable[]
static
Initial value:
=
{
}
#define IDS_HLP_WINSOCK_SHOW_CATALOG_EX
Definition: resource.h:18
#define IDS_HLP_WINSOCK_SHOW_CATALOG
Definition: resource.h:17
static FN_HANDLE_CMD ShowCatalogCommand
Definition: winsock.c:19

Definition at line 28 of file winsock.c.

◆ ResetCommand

FN_HANDLE_CMD ResetCommand
static

Definition at line 18 of file winsock.c.

◆ ShowCatalogCommand

FN_HANDLE_CMD ShowCatalogCommand
static

Definition at line 19 of file winsock.c.