-
Notifications
You must be signed in to change notification settings - Fork 722
Add support for WinDivert packet capture engine #2019
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
base: dev
Are you sure you want to change the base?
Changes from 12 commits
0ec61ac
90c3831
b0e1d2e
a76acc6
6bad9a7
2f1c3ee
2e1c7e1
eb647f1
1f7c0d0
67c4444
60575dd
1fb59c7
ba511c5
f42df08
7240387
b31b869
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -165,6 +165,7 @@ cmake_dependent_option( | |
| ) | ||
| option(PCAPPP_USE_PF_RING "Setup PcapPlusPlus with PF_RING. In this case you must also set PF_RING_ROOT") | ||
| option(PCAPPP_USE_XDP "Setup PcapPlusPlus with XDP") | ||
| option(PCAPPP_USE_WINDIVERT "Setup PcapPlusPlus with WinDivert") | ||
| option(PCAPPP_INSTALL "Install Pcap++" ${PCAPPP_MAIN_PROJECT}) | ||
| option(PCAPPP_PACKAGE "Package Pcap++ could require a recent version of CMake" OFF) | ||
|
|
||
|
|
@@ -284,6 +285,14 @@ if(PCAPPP_BUILD_PCAPPP) | |
| endif() | ||
| add_definitions(-DUSE_XDP) | ||
| endif() | ||
|
|
||
| if(PCAPPP_USE_WINDIVERT) | ||
| find_package(WinDivert REQUIRED) | ||
| if(NOT WinDivert_FOUND) | ||
| message(FATAL_ERROR "WinDivert not found!") | ||
| endif() | ||
|
Comment on lines
+290
to
+293
Collaborator
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. The required flag on find_package will make the process fail if WinDivert is missing. There is no need for the if not found branch.
Owner
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. If you look through the file, we always output a message if the package wasn't found. I don't know a lot about CMake. What is the default message if the package isn't found?
Collaborator
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This is the fail message that is generated from |
||
| add_definitions(-DUSE_WINDIVERT) | ||
| endif() | ||
| endif() | ||
|
|
||
| if(NOT CMAKE_BUILD_TYPE) | ||
|
|
||
Uh oh!
There was an error while loading. Please reload this page.