Skip to content

Commit 43f006a

Browse files
committed
adding cLSP class
1 parent fef6c11 commit 43f006a

File tree

12 files changed

+179
-2
lines changed

12 files changed

+179
-2
lines changed

Packetyzer.h

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -79,6 +79,7 @@ namespace Packetyzer
7979
{
8080
class cWinpcapCapture;
8181
class cLSPInstall;
82+
class cLSP;
8283
}
8384

8485
namespace Send
@@ -110,5 +111,6 @@ namespace Packetyzer
110111

111112
#include "cWinpcapCapture.h"
112113
#include "cLSPInstall.h"
114+
#include "cLSP.h"
113115

114116
#include "cWinpcapSend.h"

Packetyzer.sln

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,9 @@ Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "VirusTotal-Checker", "Virus
1414
EndProjectSection
1515
EndProject
1616
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "PacketyzerLSP", "PacketyzerLSP\PacketyzerLSP.vcxproj", "{CF41CA24-E07F-444B-B4C4-1ABEC258E9BD}"
17+
ProjectSection(ProjectDependencies) = postProject
18+
{68699F7C-9D1C-43C8-B680-F825115EB795} = {68699F7C-9D1C-43C8-B680-F825115EB795}
19+
EndProjectSection
1720
EndProject
1821
Global
1922
GlobalSection(SolutionConfigurationPlatforms) = preSolution

Packetyzer.v11.suo

3.5 KB
Binary file not shown.

Packetyzer.vcxproj

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -173,6 +173,7 @@
173173
<ClCompile Include="cHash.cpp" />
174174
<ClCompile Include="cHTTPStream.cpp" />
175175
<ClCompile Include="cICMPStream.cpp" />
176+
<ClCompile Include="cLSP.cpp" />
176177
<ClCompile Include="cLSPInstall.cpp" />
177178
<ClCompile Include="cPacket.cpp" />
178179
<ClCompile Include="cPacketGen.cpp" />
@@ -196,6 +197,7 @@
196197
<ClInclude Include="cHash.h" />
197198
<ClInclude Include="cHTTPStream.h" />
198199
<ClInclude Include="cICMPStream.h" />
200+
<ClInclude Include="cLSP.h" />
199201
<ClInclude Include="cLSPInstall.h" />
200202
<ClInclude Include="cPacket.h" />
201203
<ClInclude Include="cPacketGen.h" />

Packetyzer.vcxproj.filters

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -84,6 +84,9 @@
8484
<ClCompile Include="LSPCommon\provider.cpp">
8585
<Filter>Source Files\LSPCommon</Filter>
8686
</ClCompile>
87+
<ClCompile Include="cLSP.cpp">
88+
<Filter>Source Files</Filter>
89+
</ClCompile>
8790
</ItemGroup>
8891
<ItemGroup>
8992
<ClInclude Include="cFile.h">
@@ -155,5 +158,8 @@
155158
<ClInclude Include="LSPCommon\lspcommon.h">
156159
<Filter>Header Files\LSPCommon</Filter>
157160
</ClInclude>
161+
<ClInclude Include="cLSP.h">
162+
<Filter>Header Files</Filter>
163+
</ClInclude>
158164
</ItemGroup>
159165
</Project>

PacketyzerLSP/PacketyzerLSP.def

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
LIBRARY PacketyzerLSP
2+
EXPORTS
3+
WSPStartup
4+
GetLspGuid

PacketyzerLSP/PacketyzerLSP.vcxproj

Lines changed: 21 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@
2828
<ConfigurationType>DynamicLibrary</ConfigurationType>
2929
<UseDebugLibraries>true</UseDebugLibraries>
3030
<PlatformToolset>v110</PlatformToolset>
31-
<CharacterSet>Unicode</CharacterSet>
31+
<CharacterSet>MultiByte</CharacterSet>
3232
</PropertyGroup>
3333
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
3434
<ConfigurationType>DynamicLibrary</ConfigurationType>
@@ -55,6 +55,7 @@
5555
<PropertyGroup Label="UserMacros" />
5656
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
5757
<LinkIncremental>true</LinkIncremental>
58+
<TargetName>$(ProjectName)</TargetName>
5859
</PropertyGroup>
5960
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
6061
<LinkIncremental>false</LinkIncremental>
@@ -66,10 +67,14 @@
6667
<WarningLevel>Level3</WarningLevel>
6768
<Optimization>Disabled</Optimization>
6869
<PreprocessorDefinitions>WIN32;_DEBUG;_WINDOWS;_USRDLL;PACKETYZERLSP_EXPORTS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
70+
<AdditionalIncludeDirectories>C:\WpdPack\Include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
6971
</ClCompile>
7072
<Link>
7173
<SubSystem>Windows</SubSystem>
7274
<GenerateDebugInformation>true</GenerateDebugInformation>
75+
<ModuleDefinitionFile>PacketyzerLSP.def</ModuleDefinitionFile>
76+
<AdditionalLibraryDirectories>H:\Github\Packetyzer\Debug;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
77+
<AdditionalDependencies>ws2_32.lib;rpcrt4.lib;mswsock.lib;ole32.lib;Packetyzer.lib;%(AdditionalDependencies)</AdditionalDependencies>
7378
</Link>
7479
</ItemDefinitionGroup>
7580
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
@@ -87,9 +92,24 @@
8792
<GenerateDebugInformation>true</GenerateDebugInformation>
8893
<EnableCOMDATFolding>true</EnableCOMDATFolding>
8994
<OptimizeReferences>true</OptimizeReferences>
95+
<ModuleDefinitionFile>PacketyzerLSP.def</ModuleDefinitionFile>
9096
</Link>
9197
</ItemDefinitionGroup>
98+
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
99+
<Link>
100+
<ModuleDefinitionFile>PacketyzerLSP.def</ModuleDefinitionFile>
101+
</Link>
102+
</ItemDefinitionGroup>
103+
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
104+
<Link>
105+
<ModuleDefinitionFile>PacketyzerLSP.def</ModuleDefinitionFile>
106+
</Link>
107+
</ItemDefinitionGroup>
108+
<ItemGroup>
109+
<None Include="PacketyzerLSP.def" />
110+
</ItemGroup>
92111
<ItemGroup>
112+
<ClCompile Include="..\PacketyzerTest\dllmain.cpp" />
93113
</ItemGroup>
94114
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
95115
<ImportGroup Label="ExtensionTargets">

PacketyzerLSP/PacketyzerLSP.vcxproj.filters

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,4 +14,14 @@
1414
<Extensions>rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav;mfcribbon-ms</Extensions>
1515
</Filter>
1616
</ItemGroup>
17+
<ItemGroup>
18+
<None Include="PacketyzerLSP.def">
19+
<Filter>Source Files</Filter>
20+
</None>
21+
</ItemGroup>
22+
<ItemGroup>
23+
<ClCompile Include="..\PacketyzerTest\dllmain.cpp">
24+
<Filter>Source Files</Filter>
25+
</ClCompile>
26+
</ItemGroup>
1727
</Project>

PacketyzerTest/PacketyzerTest.cpp

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,11 +32,12 @@ INT main(INT argc, CHAR* argv[])
3232

3333
cLSPInstall* lspinstall = new cLSPInstall("PacketyzerLSP.dll");
3434

35-
UINT Catalogs[] = {1001, 1002};
35+
UINT Catalogs[] = {1008};
3636

3737
lspinstall->Install(Catalogs, "Packetyzer LSP",FALSE, FALSE, LspCatalog32Only);
3838

3939
//cout << lspinstall->LSPGuid << endl;
40+
system("PAUSE");
4041
lspinstall->UninstallAll();
4142

4243
if (lspinstall->ReadyInstall)

PacketyzerTest/dllmain.cpp

Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
#include "..\Packetyzer.h"
2+
3+
using namespace Packetyzer::Capture;
4+
5+
// {AE8DA32A-2737-48E5-980A-882CA068279E}
6+
static GUID Guid =
7+
{ 0xae8da32a, 0x2737, 0x48e5, { 0x98, 0xa, 0x88, 0x2c, 0xa0, 0x68, 0x27, 0x9e } };
8+
9+
cLSP LSPObject(&Guid, LSP_NONIFS);
10+
11+
BOOL WINAPI DllMain()
12+
{
13+
return LSPObject.DLLMain();
14+
};
15+
16+
INT WSPAPI WSPStartup(
17+
_In_ WORD wVersionRequested,
18+
_Out_ LPWSPDATA lpWSPData,
19+
_In_ LPWSAPROTOCOL_INFO lpProtocolInfo,
20+
_In_ WSPUPCALLTABLE UpcallTable,
21+
_Out_ LPWSPPROC_TABLE lpProcTable
22+
)
23+
{
24+
return LSPObject.Startup(wVersionRequested,lpWSPData,lpProtocolInfo,
25+
UpcallTable,lpProcTable);
26+
};
27+
28+
VOID WSPAPI GetLspGuid(LPGUID Guid)
29+
{
30+
LSPObject.GetGuid(Guid);
31+
};

0 commit comments

Comments
 (0)