Skip to content

Commit

Permalink
Test npcap
Browse files Browse the repository at this point in the history
  • Loading branch information
adfoster-r7 committed Jul 10, 2024
1 parent 4de5fde commit 4b7d6ca
Show file tree
Hide file tree
Showing 172 changed files with 24,680 additions and 11 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -14,19 +14,17 @@
# limitations under the License.
#

name "winpcap-devpack"
default_version "4.1.2"
name "npcap-sdk"
default_version "1.13"

version "4.1.2" do
source md5: "bae2236af062b0900ad1416b2c4878b9"
version "1.13" do
source md5: "2067b3975763ddf61d4114d28d9d6c9b"
end

dependency "ruby-windows"
dependency "ruby-windows-devkit"

relative_path "WpdPack"

source url: "https://www.winpcap.org/install/bin/WpdPack_4_1_2.zip"
source url: "https://npcap.com/dist/npcap-sdk-#{version}.zip"

build do
ruby_api_version = "3.1.0"
Expand Down
5 changes: 2 additions & 3 deletions config/software/pcaprub.rb
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
if windows?
dependency "ruby-windows"
dependency "ruby-windows-devkit"
dependency "winpcap-devpack"
dependency "npcap-sdk"
else
dependency "ruby"
dependency "libpcap"
Expand All @@ -33,8 +33,7 @@
env = with_standard_compiler_flags(with_embedded_path)
env['SSL_CERT_FILE'] = "#{install_dir}/embedded/ssl/cert.pem"

# We need to create the pcaprub gem ourselves until 0.13.2 is released (https://github.com/pcaprub/pcaprub/issues/67)
# Use version of pcaprub relative to the current directory
# Support a custom build of pcaprub relative to the current directory
local_pcaprub_checkout = File.expand_path(File.join(Dir.pwd, "..", "pcaprub"))
command "echo checking for path: #{local_pcaprub_checkout}", env: env
if File.exist?(local_pcaprub_checkout)
Expand Down
10 changes: 10 additions & 0 deletions foo/Examples-pcap/GNUmakefile
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
# Makefile for cygwin gcc
# Nate Lawson <[email protected]>

SUBDIRS = basic_dump basic_dump_ex iflist pcap_filter pktdump_ex readfile readfile_ex savedump sendpack UDPdump

all clean install uninstall: ${SUBDIRS}
for subdir in ${SUBDIRS}; do \
echo "Entering $$subdir"; \
(cd $$subdir && ${MAKE} $@) \
done;
163 changes: 163 additions & 0 deletions foo/Examples-pcap/MakeAll.sln
Original file line number Diff line number Diff line change
@@ -0,0 +1,163 @@

Microsoft Visual Studio Solution File, Format Version 12.00
# Visual Studio Version 16
VisualStudioVersion = 16.0.31229.75
MinimumVisualStudioVersion = 10.0.40219.1
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "basic_dump", "basic_dump\basic_dump.vcxproj", "{66297062-96A0-4F0E-B147-3C8384031232}"
EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "basic_dump_ex", "basic_dump_ex\basic_dump_ex.vcxproj", "{92849630-6B09-409C-A7AD-E91E682558B1}"
EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "iflist", "iflist\iflist.vcxproj", "{0B27B213-4BF3-4611-B412-A2D09CDE8632}"
EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "pcap_filter", "pcap_filter\pcap_filter.vcxproj", "{B9F68F6F-22AE-47A2-A3A3-1212831AF9FF}"
EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "pktdump_ex", "pktdump_ex\pktdump_ex.vcxproj", "{3D62DEB4-3536-44AE-8E4B-AD6DFF1B795E}"
EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "readfile", "readfile\readfile.vcxproj", "{161E7606-F4CD-4A04-AB6B-5837F7818EE1}"
EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "readfile_ex", "readfile_ex\readfile_ex.vcxproj", "{3071DFB6-68F8-41EF-A56C-0C7A71B6967C}"
EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "savedump", "savedump\savedump.vcxproj", "{1B8791CB-DD15-46BF-B0A2-879892085538}"
EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "sendpack", "sendpack\sendpack.vcxproj", "{1C376689-5F61-48E7-AE83-0DED9EE9E458}"
EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "UDPdump", "UDPdump\UDPdump.vcxproj", "{42E5F1D6-6E83-4C13-83CC-C6CD83478C58}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|ARM64 = Debug|ARM64
Debug|x64 = Debug|x64
Debug|x86 = Debug|x86
Release|ARM64 = Release|ARM64
Release|x64 = Release|x64
Release|x86 = Release|x86
EndGlobalSection
GlobalSection(ProjectConfigurationPlatforms) = postSolution
{66297062-96A0-4F0E-B147-3C8384031232}.Debug|ARM64.ActiveCfg = Debug|ARM64
{66297062-96A0-4F0E-B147-3C8384031232}.Debug|ARM64.Build.0 = Debug|ARM64
{66297062-96A0-4F0E-B147-3C8384031232}.Debug|x64.ActiveCfg = Debug|x64
{66297062-96A0-4F0E-B147-3C8384031232}.Debug|x64.Build.0 = Debug|x64
{66297062-96A0-4F0E-B147-3C8384031232}.Debug|x86.ActiveCfg = Debug|Win32
{66297062-96A0-4F0E-B147-3C8384031232}.Debug|x86.Build.0 = Debug|Win32
{66297062-96A0-4F0E-B147-3C8384031232}.Release|ARM64.ActiveCfg = Release|ARM64
{66297062-96A0-4F0E-B147-3C8384031232}.Release|ARM64.Build.0 = Release|ARM64
{66297062-96A0-4F0E-B147-3C8384031232}.Release|x64.ActiveCfg = Release|x64
{66297062-96A0-4F0E-B147-3C8384031232}.Release|x64.Build.0 = Release|x64
{66297062-96A0-4F0E-B147-3C8384031232}.Release|x86.ActiveCfg = Release|Win32
{66297062-96A0-4F0E-B147-3C8384031232}.Release|x86.Build.0 = Release|Win32
{92849630-6B09-409C-A7AD-E91E682558B1}.Debug|ARM64.ActiveCfg = Debug|ARM64
{92849630-6B09-409C-A7AD-E91E682558B1}.Debug|ARM64.Build.0 = Debug|ARM64
{92849630-6B09-409C-A7AD-E91E682558B1}.Debug|x64.ActiveCfg = Debug|x64
{92849630-6B09-409C-A7AD-E91E682558B1}.Debug|x64.Build.0 = Debug|x64
{92849630-6B09-409C-A7AD-E91E682558B1}.Debug|x86.ActiveCfg = Debug|Win32
{92849630-6B09-409C-A7AD-E91E682558B1}.Debug|x86.Build.0 = Debug|Win32
{92849630-6B09-409C-A7AD-E91E682558B1}.Release|ARM64.ActiveCfg = Release|ARM64
{92849630-6B09-409C-A7AD-E91E682558B1}.Release|ARM64.Build.0 = Release|ARM64
{92849630-6B09-409C-A7AD-E91E682558B1}.Release|x64.ActiveCfg = Release|x64
{92849630-6B09-409C-A7AD-E91E682558B1}.Release|x64.Build.0 = Release|x64
{92849630-6B09-409C-A7AD-E91E682558B1}.Release|x86.ActiveCfg = Release|Win32
{92849630-6B09-409C-A7AD-E91E682558B1}.Release|x86.Build.0 = Release|Win32
{0B27B213-4BF3-4611-B412-A2D09CDE8632}.Debug|ARM64.ActiveCfg = Debug|ARM64
{0B27B213-4BF3-4611-B412-A2D09CDE8632}.Debug|ARM64.Build.0 = Debug|ARM64
{0B27B213-4BF3-4611-B412-A2D09CDE8632}.Debug|x64.ActiveCfg = Debug|x64
{0B27B213-4BF3-4611-B412-A2D09CDE8632}.Debug|x64.Build.0 = Debug|x64
{0B27B213-4BF3-4611-B412-A2D09CDE8632}.Debug|x86.ActiveCfg = Debug|Win32
{0B27B213-4BF3-4611-B412-A2D09CDE8632}.Debug|x86.Build.0 = Debug|Win32
{0B27B213-4BF3-4611-B412-A2D09CDE8632}.Release|ARM64.ActiveCfg = Release|ARM64
{0B27B213-4BF3-4611-B412-A2D09CDE8632}.Release|ARM64.Build.0 = Release|ARM64
{0B27B213-4BF3-4611-B412-A2D09CDE8632}.Release|x64.ActiveCfg = Release|x64
{0B27B213-4BF3-4611-B412-A2D09CDE8632}.Release|x64.Build.0 = Release|x64
{0B27B213-4BF3-4611-B412-A2D09CDE8632}.Release|x86.ActiveCfg = Release|Win32
{0B27B213-4BF3-4611-B412-A2D09CDE8632}.Release|x86.Build.0 = Release|Win32
{B9F68F6F-22AE-47A2-A3A3-1212831AF9FF}.Debug|ARM64.ActiveCfg = Debug|ARM64
{B9F68F6F-22AE-47A2-A3A3-1212831AF9FF}.Debug|ARM64.Build.0 = Debug|ARM64
{B9F68F6F-22AE-47A2-A3A3-1212831AF9FF}.Debug|x64.ActiveCfg = Debug|x64
{B9F68F6F-22AE-47A2-A3A3-1212831AF9FF}.Debug|x64.Build.0 = Debug|x64
{B9F68F6F-22AE-47A2-A3A3-1212831AF9FF}.Debug|x86.ActiveCfg = Debug|Win32
{B9F68F6F-22AE-47A2-A3A3-1212831AF9FF}.Debug|x86.Build.0 = Debug|Win32
{B9F68F6F-22AE-47A2-A3A3-1212831AF9FF}.Release|ARM64.ActiveCfg = Release|ARM64
{B9F68F6F-22AE-47A2-A3A3-1212831AF9FF}.Release|ARM64.Build.0 = Release|ARM64
{B9F68F6F-22AE-47A2-A3A3-1212831AF9FF}.Release|x64.ActiveCfg = Release|x64
{B9F68F6F-22AE-47A2-A3A3-1212831AF9FF}.Release|x64.Build.0 = Release|x64
{B9F68F6F-22AE-47A2-A3A3-1212831AF9FF}.Release|x86.ActiveCfg = Release|Win32
{B9F68F6F-22AE-47A2-A3A3-1212831AF9FF}.Release|x86.Build.0 = Release|Win32
{3D62DEB4-3536-44AE-8E4B-AD6DFF1B795E}.Debug|ARM64.ActiveCfg = Debug|ARM64
{3D62DEB4-3536-44AE-8E4B-AD6DFF1B795E}.Debug|ARM64.Build.0 = Debug|ARM64
{3D62DEB4-3536-44AE-8E4B-AD6DFF1B795E}.Debug|x64.ActiveCfg = Debug|x64
{3D62DEB4-3536-44AE-8E4B-AD6DFF1B795E}.Debug|x64.Build.0 = Debug|x64
{3D62DEB4-3536-44AE-8E4B-AD6DFF1B795E}.Debug|x86.ActiveCfg = Debug|Win32
{3D62DEB4-3536-44AE-8E4B-AD6DFF1B795E}.Debug|x86.Build.0 = Debug|Win32
{3D62DEB4-3536-44AE-8E4B-AD6DFF1B795E}.Release|ARM64.ActiveCfg = Release|ARM64
{3D62DEB4-3536-44AE-8E4B-AD6DFF1B795E}.Release|ARM64.Build.0 = Release|ARM64
{3D62DEB4-3536-44AE-8E4B-AD6DFF1B795E}.Release|x64.ActiveCfg = Release|x64
{3D62DEB4-3536-44AE-8E4B-AD6DFF1B795E}.Release|x64.Build.0 = Release|x64
{3D62DEB4-3536-44AE-8E4B-AD6DFF1B795E}.Release|x86.ActiveCfg = Release|Win32
{3D62DEB4-3536-44AE-8E4B-AD6DFF1B795E}.Release|x86.Build.0 = Release|Win32
{161E7606-F4CD-4A04-AB6B-5837F7818EE1}.Debug|ARM64.ActiveCfg = Debug|ARM64
{161E7606-F4CD-4A04-AB6B-5837F7818EE1}.Debug|ARM64.Build.0 = Debug|ARM64
{161E7606-F4CD-4A04-AB6B-5837F7818EE1}.Debug|x64.ActiveCfg = Debug|x64
{161E7606-F4CD-4A04-AB6B-5837F7818EE1}.Debug|x64.Build.0 = Debug|x64
{161E7606-F4CD-4A04-AB6B-5837F7818EE1}.Debug|x86.ActiveCfg = Debug|Win32
{161E7606-F4CD-4A04-AB6B-5837F7818EE1}.Debug|x86.Build.0 = Debug|Win32
{161E7606-F4CD-4A04-AB6B-5837F7818EE1}.Release|ARM64.ActiveCfg = Release|ARM64
{161E7606-F4CD-4A04-AB6B-5837F7818EE1}.Release|ARM64.Build.0 = Release|ARM64
{161E7606-F4CD-4A04-AB6B-5837F7818EE1}.Release|x64.ActiveCfg = Release|x64
{161E7606-F4CD-4A04-AB6B-5837F7818EE1}.Release|x64.Build.0 = Release|x64
{161E7606-F4CD-4A04-AB6B-5837F7818EE1}.Release|x86.ActiveCfg = Release|Win32
{161E7606-F4CD-4A04-AB6B-5837F7818EE1}.Release|x86.Build.0 = Release|Win32
{3071DFB6-68F8-41EF-A56C-0C7A71B6967C}.Debug|ARM64.ActiveCfg = Debug|ARM64
{3071DFB6-68F8-41EF-A56C-0C7A71B6967C}.Debug|ARM64.Build.0 = Debug|ARM64
{3071DFB6-68F8-41EF-A56C-0C7A71B6967C}.Debug|x64.ActiveCfg = Debug|x64
{3071DFB6-68F8-41EF-A56C-0C7A71B6967C}.Debug|x64.Build.0 = Debug|x64
{3071DFB6-68F8-41EF-A56C-0C7A71B6967C}.Debug|x86.ActiveCfg = Debug|Win32
{3071DFB6-68F8-41EF-A56C-0C7A71B6967C}.Debug|x86.Build.0 = Debug|Win32
{3071DFB6-68F8-41EF-A56C-0C7A71B6967C}.Release|ARM64.ActiveCfg = Release|ARM64
{3071DFB6-68F8-41EF-A56C-0C7A71B6967C}.Release|ARM64.Build.0 = Release|ARM64
{3071DFB6-68F8-41EF-A56C-0C7A71B6967C}.Release|x64.ActiveCfg = Release|x64
{3071DFB6-68F8-41EF-A56C-0C7A71B6967C}.Release|x64.Build.0 = Release|x64
{3071DFB6-68F8-41EF-A56C-0C7A71B6967C}.Release|x86.ActiveCfg = Release|Win32
{3071DFB6-68F8-41EF-A56C-0C7A71B6967C}.Release|x86.Build.0 = Release|Win32
{1B8791CB-DD15-46BF-B0A2-879892085538}.Debug|ARM64.ActiveCfg = Debug|ARM64
{1B8791CB-DD15-46BF-B0A2-879892085538}.Debug|ARM64.Build.0 = Debug|ARM64
{1B8791CB-DD15-46BF-B0A2-879892085538}.Debug|x64.ActiveCfg = Debug|x64
{1B8791CB-DD15-46BF-B0A2-879892085538}.Debug|x64.Build.0 = Debug|x64
{1B8791CB-DD15-46BF-B0A2-879892085538}.Debug|x86.ActiveCfg = Debug|Win32
{1B8791CB-DD15-46BF-B0A2-879892085538}.Debug|x86.Build.0 = Debug|Win32
{1B8791CB-DD15-46BF-B0A2-879892085538}.Release|ARM64.ActiveCfg = Release|ARM64
{1B8791CB-DD15-46BF-B0A2-879892085538}.Release|ARM64.Build.0 = Release|ARM64
{1B8791CB-DD15-46BF-B0A2-879892085538}.Release|x64.ActiveCfg = Release|x64
{1B8791CB-DD15-46BF-B0A2-879892085538}.Release|x64.Build.0 = Release|x64
{1B8791CB-DD15-46BF-B0A2-879892085538}.Release|x86.ActiveCfg = Release|Win32
{1B8791CB-DD15-46BF-B0A2-879892085538}.Release|x86.Build.0 = Release|Win32
{1C376689-5F61-48E7-AE83-0DED9EE9E458}.Debug|ARM64.ActiveCfg = Debug|ARM64
{1C376689-5F61-48E7-AE83-0DED9EE9E458}.Debug|ARM64.Build.0 = Debug|ARM64
{1C376689-5F61-48E7-AE83-0DED9EE9E458}.Debug|x64.ActiveCfg = Debug|x64
{1C376689-5F61-48E7-AE83-0DED9EE9E458}.Debug|x64.Build.0 = Debug|x64
{1C376689-5F61-48E7-AE83-0DED9EE9E458}.Debug|x86.ActiveCfg = Debug|Win32
{1C376689-5F61-48E7-AE83-0DED9EE9E458}.Debug|x86.Build.0 = Debug|Win32
{1C376689-5F61-48E7-AE83-0DED9EE9E458}.Release|ARM64.ActiveCfg = Release|ARM64
{1C376689-5F61-48E7-AE83-0DED9EE9E458}.Release|ARM64.Build.0 = Release|ARM64
{1C376689-5F61-48E7-AE83-0DED9EE9E458}.Release|x64.ActiveCfg = Release|x64
{1C376689-5F61-48E7-AE83-0DED9EE9E458}.Release|x64.Build.0 = Release|x64
{1C376689-5F61-48E7-AE83-0DED9EE9E458}.Release|x86.ActiveCfg = Release|Win32
{1C376689-5F61-48E7-AE83-0DED9EE9E458}.Release|x86.Build.0 = Release|Win32
{42E5F1D6-6E83-4C13-83CC-C6CD83478C58}.Debug|ARM64.ActiveCfg = Debug|ARM64
{42E5F1D6-6E83-4C13-83CC-C6CD83478C58}.Debug|ARM64.Build.0 = Debug|ARM64
{42E5F1D6-6E83-4C13-83CC-C6CD83478C58}.Debug|x64.ActiveCfg = Debug|x64
{42E5F1D6-6E83-4C13-83CC-C6CD83478C58}.Debug|x64.Build.0 = Debug|x64
{42E5F1D6-6E83-4C13-83CC-C6CD83478C58}.Debug|x86.ActiveCfg = Debug|Win32
{42E5F1D6-6E83-4C13-83CC-C6CD83478C58}.Debug|x86.Build.0 = Debug|Win32
{42E5F1D6-6E83-4C13-83CC-C6CD83478C58}.Release|ARM64.ActiveCfg = Release|ARM64
{42E5F1D6-6E83-4C13-83CC-C6CD83478C58}.Release|ARM64.Build.0 = Release|ARM64
{42E5F1D6-6E83-4C13-83CC-C6CD83478C58}.Release|x64.ActiveCfg = Release|x64
{42E5F1D6-6E83-4C13-83CC-C6CD83478C58}.Release|x64.Build.0 = Release|x64
{42E5F1D6-6E83-4C13-83CC-C6CD83478C58}.Release|x86.ActiveCfg = Release|Win32
{42E5F1D6-6E83-4C13-83CC-C6CD83478C58}.Release|x86.Build.0 = Release|Win32
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
EndGlobalSection
GlobalSection(ExtensibilityGlobals) = postSolution
SolutionGuid = {879C566D-AB09-4E94-923D-9FDE09257A52}
EndGlobalSection
EndGlobal
17 changes: 17 additions & 0 deletions foo/Examples-pcap/UDPdump/GNUmakefile
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
# Makefile for cygwin gcc
# Loris Degioanni

PCAP_PATH = ../../lib
CFLAGS = -g -O -mno-cygwin -I ../../include

OBJS = udpdump.o
LIBS = -L ${PCAP_PATH} -lwpcap -lwsock32

all: ${OBJS}
${CC} ${CFLAGS} -o udpdump.exe ${OBJS} ${LIBS}

clean:
rm -f ${OBJS} udpdump.exe

.c.o:
${CC} ${CFLAGS} -c -o $*.o $<
Loading

0 comments on commit 4b7d6ca

Please sign in to comment.