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

Ported TcpReassembly example to C++11 #1229

Merged
merged 12 commits into from
Nov 9, 2023

Conversation

jpcofr
Copy link
Contributor

@jpcofr jpcofr commented Nov 4, 2023

No description provided.

... so that Windows compilation works.
as visual-studio (windows-2019, Visual Studio 16 2019, Win32, winpcap) target fails while other targets finish successfully.
Refactor TcpReassemblyData class to struct and fix
loop variable type in listInterfaces() function
@@ -329,7 +328,7 @@ void listInterfaces()

std::cout << std::endl << "Network interfaces:" << std::endl;

for (const auto& interface : devList)
for (auto& interface : devList)
Copy link
Contributor Author

Choose a reason for hiding this comment

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

@seladb The problem is still there. How do you check if the code compiles for different systems? Using Docker or directly on GitHub with its fast CI? I need a faster way to test changes; right now, I can test only 2 or 3 times in an hour.

Copy link
Owner

Choose a reason for hiding this comment

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

I usually use VMs to test on different platforms. For unix/linux-based platforms you can also use docker.

For Windows you can use these free VMs offered by Microsoft:
https://developer.microsoft.com/en-us/windows/downloads/virtual-machines/

You can install VS 2019 / 2022 and test whatever you need

Copy link
Owner

Choose a reason for hiding this comment

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

@jpcofr I think the issue is with the variable name... interface is probably a reserved word in Visual Studio 🤦‍♂️

I changed interface to dev and it seems to work now...

Copy link

codecov bot commented Nov 7, 2023

Codecov Report

Merging #1229 (a140bcf) into dev (3227ad1) will decrease coverage by 0.01%.
The diff coverage is n/a.

@@            Coverage Diff             @@
##              dev    #1229      +/-   ##
==========================================
- Coverage   82.74%   82.73%   -0.01%     
==========================================
  Files         159      159              
  Lines       20294    20294              
  Branches     7668     7668              
==========================================
- Hits        16793    16791       -2     
+ Misses       2890     2885       -5     
- Partials      611      618       +7     
Flag Coverage Δ
alpine317 72.44% <ø> (ø)
centos7 74.61% <ø> (ø)
fedora37 72.44% <ø> (ø)
macos-11 61.40% <ø> (ø)
macos-12 61.45% <ø> (ø)
macos-ventura 61.43% <ø> (ø)
mingw32 70.32% <ø> (-0.02%) ⬇️
mingw64 70.32% <ø> (-0.04%) ⬇️
npcap 83.27% <ø> (-0.05%) ⬇️
ubuntu1804 75.05% <ø> (ø)
ubuntu2004 73.22% <ø> (ø)
ubuntu2204 72.29% <ø> (ø)
ubuntu2204-icpx 59.34% <ø> (ø)
unittest 82.73% <ø> (-0.01%) ⬇️
windows-2019 83.31% <ø> (-0.02%) ⬇️
windows-2022 83.32% <ø> (-0.02%) ⬇️
winpcap 83.30% <ø> (+0.01%) ⬆️
zstd 73.84% <ø> (ø)

Flags with carried forward coverage won't be shown. Click here to find out more.

see 6 files with indirect coverage changes

@jpcofr jpcofr marked this pull request as ready for review November 7, 2023 19:01
@@ -374,7 +373,7 @@ static void tcpReassemblyMsgReadyCallback(int8_t sideIndex, const pcpp::TcpStrea
if (result == 1)
{
// find the connection from the flow key
TcpReassemblyConnMgrIter iter2 = connMgr->find(flowKeyToCloseFiles);
auto iter2 = connMgr->find(flowKeyToCloseFiles);
Copy link
Owner

Choose a reason for hiding this comment

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

should we rename the variable to flow2, the same way we renamed iter to flow?

Copy link
Owner

Choose a reason for hiding this comment

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

Fixed in 48be196

@seladb seladb merged commit 813f15b into seladb:dev Nov 9, 2023
34 checks passed
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.

2 participants