aboutsummaryrefslogtreecommitdiff
path: root/example
diff options
context:
space:
mode:
authorIvan Nardi <12729895+IvanNardi@users.noreply.github.com>2021-11-11 12:36:55 +0100
committerGitHub <noreply@github.com>2021-11-11 12:36:55 +0100
commit3e5491fa109fccfb28cd170d7a1dc3e55e7531e8 (patch)
tree101c56f4be9e31d58e04c4af1c2030042b72fd0e /example
parent0f168d9150cfcc94464b84591605a2c5e17c728e (diff)
Add detection of OCSP (#1370)
This protocol is detected via HTTP Content-Type header. Until 89d548f9, nDPI had a dedicated automa (`content_automa`) to classify a HTTP flow according to this header. Since then, this automa has been useless because it is always empty. Re-enable it to match only a string seems overkilling. Remove all `content_automa` leftovers.
Diffstat (limited to 'example')
-rw-r--r--example/ndpiReader.c4
1 files changed, 1 insertions, 3 deletions
diff --git a/example/ndpiReader.c b/example/ndpiReader.c
index d421e45dd..446d51a90 100644
--- a/example/ndpiReader.c
+++ b/example/ndpiReader.c
@@ -285,7 +285,6 @@ void ndpiCheckHostStringMatch(char *testChar) {
ndpi_protocol_match_result match = { NDPI_PROTOCOL_UNKNOWN,
NDPI_PROTOCOL_CATEGORY_UNSPECIFIED, NDPI_PROTOCOL_UNRATED };
int testRes;
- u_int8_t is_host_match = 1;
char appBufStr[64];
ndpi_protocol detected_protocol;
struct ndpi_detection_module_struct *ndpi_str;
@@ -302,8 +301,7 @@ void ndpiCheckHostStringMatch(char *testChar) {
// ac_automata_display( module->host_automa.ac_automa, 'n');
testRes = ndpi_match_string_subprotocol(ndpi_str,
- testChar, strlen(testChar), &match,
- is_host_match);
+ testChar, strlen(testChar), &match);
if(testRes) {
memset( &detected_protocol, 0, sizeof(ndpi_protocol) );