Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add WireGuard protocol support #1557

Merged
merged 38 commits into from
Sep 28, 2024
Merged
Show file tree
Hide file tree
Changes from 35 commits
Commits
Show all changes
38 commits
Select commit Hold shift + click to select a range
de606ec
Add WireGuard protocol parsing support in UDP Packet
nadongjun Aug 31, 2024
e5c9d16
Updated CMakeLists.txt to include WireGuardLayer source and header files
nadongjun Aug 31, 2024
5e9410c
lint
nadongjun Aug 31, 2024
7e6c322
lint
nadongjun Aug 31, 2024
5725d78
Refactor data parameter const in isWireGuard and lint
nadongjun Aug 31, 2024
58c67d3
Add test pcap data for WireGuard tests
nadongjun Sep 1, 2024
e9caf50
Add WireGuard test cases for handshake initiation, response, and tran…
nadongjun Sep 1, 2024
34545c9
Update build configuration to include WireGuard tests
nadongjun Sep 1, 2024
d9055cc
lint
nadongjun Sep 1, 2024
f03e790
Add delete in WGTests
nadongjun Sep 1, 2024
fae0f87
Fix Packet check in WGTests
nadongjun Sep 1, 2024
222a321
Refactor WireGuard packet parsing tests
nadongjun Sep 1, 2024
0ebea57
Add pcap file with all sample packets and rename test file to WireGua…
nadongjun Sep 1, 2024
c8173bd
lint
nadongjun Sep 1, 2024
9fb269b
lint
nadongjun Sep 1, 2024
36eb0a1
Add override specifier in WireGuardLayer class and update constructor…
nadongjun Sep 1, 2024
c144b91
Refactor WireGuardLayer constructor to remove redundant
nadongjun Sep 1, 2024
a6b9856
Fix header inclusion for std::memcmp
nadongjun Sep 1, 2024
6fa65cd
Refactor stringstream usage and clean up unused includes in WireGuard…
nadongjun Sep 1, 2024
61d1aaa
Refactor WireGuardMessageType to enum class
nadongjun Sep 2, 2024
97e5f80
Refactor function and variable names for WireGuard
nadongjun Sep 3, 2024
e4b7c85
Add WireGuard to README.md
nadongjun Sep 21, 2024
e56ca94
Refactor inline comments above attributes
nadongjun Sep 21, 2024
f87cef6
Refactor Implement separate classes for creating and parsing WireGuar…
nadongjun Sep 22, 2024
dcd8677
Refactor Update test code and add creation tests for WireGuardMessage…
nadongjun Sep 22, 2024
8aac9fc
Refactor add documentation comments for WireGuard layer classes and s…
nadongjun Sep 22, 2024
baeb1c6
Add documentation comments for WireGuardTransportDataLayer
nadongjun Sep 22, 2024
a4b10e9
Refactor implementation of parseNextLayer for parsing WireGuard messa…
nadongjun Sep 23, 2024
ab508e8
Add WireGuardCreationTest to validate WireGuard MessageLayer construc…
nadongjun Sep 23, 2024
d66c277
Refactor WireGuard Layer, Tests for improved memory management and da…
nadongjun Sep 24, 2024
bf4fbbf
lint
nadongjun Sep 24, 2024
a37a169
Refactor WireGuardLayer code and improve documentation
nadongjun Sep 25, 2024
e27cb71
edit WireGuardTests
nadongjun Sep 25, 2024
c893496
Refactor WireGuardLayer code and comments, add pcap and test code for…
nadongjun Sep 26, 2024
1be20e1
lint
nadongjun Sep 26, 2024
3060354
Refactor WireGuardLayer and Tests
nadongjun Sep 27, 2024
5416764
Refactor Initialize reserved
nadongjun Sep 27, 2024
f8a36c7
Merge branch 'dev' into wg
nadongjun Sep 27, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions Common++/header/Logger.h
Original file line number Diff line number Diff line change
Expand Up @@ -103,6 +103,7 @@ namespace pcpp
PacketLogModuleSomeIpSdLayer, ///< SomeIpSdLayer module (Packet++)
PacketLogModuleWakeOnLanLayer, ///< WakeOnLanLayer module (Packet++)
PacketLogModuleSmtpLayer, ///< SmtpLayer module (Packet++)
PacketLogModuleWireGuardLayer, ///< WireGuardLayer module (Packet++)
PcapLogModuleWinPcapLiveDevice, ///< WinPcapLiveDevice module (Pcap++)
PcapLogModuleRemoteDevice, ///< WinPcapRemoteDevice module (Pcap++)
PcapLogModuleLiveDevice, ///< PcapLiveDevice module (Pcap++)
Expand Down
4 changes: 3 additions & 1 deletion Packet++/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,7 @@ add_library(
src/VrrpLayer.cpp
src/VxlanLayer.cpp
src/WakeOnLanLayer.cpp
src/WireGuardLayer.cpp
# Force hash-library pcapng to be link fully static
)

Expand Down Expand Up @@ -133,7 +134,8 @@ set(public_headers
header/VlanLayer.h
header/VrrpLayer.h
header/VxlanLayer.h
header/WakeOnLanLayer.h)
header/WakeOnLanLayer.h
header/WireGuardLayer.h)

# Don't use set_target_properties CMake limit to 50 elements
set_property(TARGET Packet++ PROPERTY PUBLIC_HEADER ${public_headers})
Expand Down
5 changes: 5 additions & 0 deletions Packet++/header/ProtocolType.h
Original file line number Diff line number Diff line change
Expand Up @@ -347,6 +347,11 @@ namespace pcpp
*/
const ProtocolType LDAP = 55;

/*
* WireGuard protocol
*/
const ProtocolType WireGuard = 56;

/**
* An enum representing OSI model layers
*/
Expand Down
Loading
Loading