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

Fix IAT calculation #1316

Closed
wants to merge 1 commit into from
Closed

Fix IAT calculation #1316

wants to merge 1 commit into from

Conversation

IvanNardi
Copy link
Collaborator

We shoudn't reset reference timestamps every 10 packets, i.e IAT
algorithm should be independent from SPLT and BD ones.

We shoudn't reset reference timestamps every 10 packets, i.e IAT
algorithm should be independent from SPLT and BD ones.
@IvanNardi IvanNardi marked this pull request as draft September 27, 2021 18:09
@sonarcloud
Copy link

sonarcloud bot commented Sep 27, 2021

Kudos, SonarCloud Quality Gate passed!    Quality Gate passed

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities
Security Hotspot A 0 Security Hotspots
Code Smell A 0 Code Smells

No Coverage information No Coverage information
0.0% 0.0% Duplication

@IvanNardi
Copy link
Collaborator Author

This PR has been marked as Draft since it is only an incomplete POC: all the CI tests will fail.

I am not an expert of the algorithms implemented in nDPI, but I find strange that the packet timestamps used for IAT (Inter Arrival Time) stats are reset every 10 packets (via ndpi_clear_entropy_stats())

Is that correct?

Digging through the GIT history, I found that in the original implementation of the IAT algorithm (9a6f6d9) the timestamps were never reset.
Such a reset has been introduced in 4fd7e57 (see #769), triggering a massive update of all the IAT values in the unit test results.
However, the comment #769 (comment) seems to indicate that such change was unexpected.

@lucaderi: what do you think? That comment was made by you...

I can confirm that with this PR, the new IAT values are identical to the ones before 4fd7e57.

Bottom line: if I am correct I will push a new version updating all the tests; otherwise, sorry for the noise, guys.

@utoni
Copy link
Collaborator

utoni commented Sep 27, 2021

Not sure, but IAT seems to me like an extracted feature usable for machine learning.

@IvanNardi IvanNardi closed this Nov 15, 2021
@IvanNardi IvanNardi deleted the iat_reset branch February 15, 2024 19:17
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.

None yet

2 participants