-
Notifications
You must be signed in to change notification settings - Fork 676
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
Conversation
... 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
Examples/TcpReassembly/main.cpp
Outdated
@@ -329,7 +328,7 @@ void listInterfaces() | |||
|
|||
std::cout << std::endl << "Network interfaces:" << std::endl; | |||
|
|||
for (const auto& interface : devList) | |||
for (auto& interface : devList) |
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
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
There was a problem hiding this comment.
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...
Codecov Report
@@ 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
Flags with carried forward coverage won't be shown. Click here to find out more. |
Examples/TcpReassembly/main.cpp
Outdated
@@ -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); |
There was a problem hiding this comment.
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
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Fixed in 48be196
No description provided.