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

PcapPlusPlus: enhance platform support and fix missing syslink on Windows #5419

Open
wants to merge 10 commits into
base: dev
Choose a base branch
from

Conversation

Doekin
Copy link
Contributor

@Doekin Doekin commented Oct 4, 2024

  1. Resolves the undefined reference to `GetNetworkParams" error by adding the missing iphlpapi syslink, which is required for Windows.
  2. Adds support for macOS, Android, and BSD platforms.

@@ -13,18 +13,18 @@ package("pcapplusplus")

add_links("Pcap++", "Packet++", "Common++")

if is_plat("windows") then
add_syslinks("ws2_32")
if is_plat("windows") or is_plat("mingw") then
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

if is_plat("windows", "mingw") then

end

add_deps("cmake")
if is_plat("windows") then
if is_plat("windows") or is_plat("mingw") then
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

same

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Got it.

@star-hengxing
Copy link
Contributor

Additionally, PcapPlusPlus provides extensive platform support with precompiled releases available at PcapPlusPlus Releases. It is worth considering their utilization.

It's not recommend to use precompiled binary, unless you have't skill for make package.

@Doekin
Copy link
Contributor Author

Doekin commented Oct 5, 2024

Understood. In that case, could we extend support to additional platforms like macOS, FreeBSD, and Android?

@star-hengxing
Copy link
Contributor

Understood. In that case, could we extend support to additional platforms like macOS, FreeBSD, and Android?

You can try, I will review.
If package deps(<= 1) is easy to deal with, You only need to patch some code, like #5420 #5421

@Doekin
Copy link
Contributor Author

Doekin commented Oct 5, 2024

Okay, PcapPlusPlus relies on libpcap for BSD and Android, and there have been some issues with building libpcap for these targets. I am currently working on resolving these issues.

@Doekin
Copy link
Contributor Author

Doekin commented Oct 5, 2024

Failed to build libpcap for the following targets, and I can not figure out why. Could it be an issue with the toolchain configuration?

@Doekin Doekin closed this Oct 6, 2024
@Doekin Doekin changed the title PcapPlusPlus: mingw support and fix missing iphlpapi linkage on Windows PcapPlusPlus: enhance platform support and fix missing syslink on Windows Oct 6, 2024
@Doekin Doekin reopened this Oct 6, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants