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

Simplify ndpi_internal_guess_undetected_protocol() #1941

Merged
merged 1 commit into from
Apr 12, 2023

Conversation

IvanNardi
Copy link
Collaborator

ndpi_guess_undetected_protocol()/ndpi_internal_guess_undetected_protocol() is a strange function:

  • it is exported by the library and it is actively used by ntopng
  • it is intrinsecally ipv4-only
  • it returns basically something like "classification_by_ip"/"classification_by_port" (these information have already been calculated in ndpi_do_guess()...)
  • it access the bittorrent LRU caches (similarly to ndpi_detection_giveup() but without all the other caches...)

So:

  • make the interface IPv4/6 agnostic
  • use the classifications already available

This work will allow to make the Bittorrent caches IPV6-aware (see 81e1ea5).

Handle Dropbox classification "by-port" in the "standard" way.

`ndpi_guess_undetected_protocol()/ndpi_internal_guess_undetected_protocol()`
is a strange function:
* it is exported by the library and it is actively used by `ntopng`
* it is intrinsecally ipv4-only
* it returns basically something like "classification_by_ip"/"classification_by_port"
(these information have already been calculated in `ndpi_do_guess()`...)
* it access the bittorrent LRU caches (similarly to
`ndpi_detection_giveup()` but without all the other caches...)

So:
* make the interface IPv4/6 agnostic
* use the classifications already available

This work will allow to make the Bittorrent caches IPV6-aware (see
81e1ea5).

Handle Dropbox classification "by-port" in the "standard" way.
@sonarcloud
Copy link

sonarcloud bot commented Apr 11, 2023

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 IvanNardi merged commit 032e778 into ntop:dev Apr 12, 2023
@IvanNardi IvanNardi deleted the dropbox-port branch April 12, 2023 12:39
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