aboutsummaryrefslogtreecommitdiff
path: root/example/ndpiReader.c
diff options
context:
space:
mode:
authorLuca Deri <deri@ntop.org>2020-05-15 22:49:55 +0200
committerLuca Deri <deri@ntop.org>2020-05-15 22:49:55 +0200
commitc375782b96faf30558b3f91a7fe05eae62fc79c2 (patch)
tree21e9a729a848140d42649cc79ecdc9fd13a0627a /example/ndpiReader.c
parent8e7b1ea7a136cc4e4aa9880072ec2d69900a825e (diff)
Added check for binary scripts
Added NDPI_HTTP_NUMERIC_IP_HOST risk ndpi_risk moved to 32 bit
Diffstat (limited to 'example/ndpiReader.c')
-rw-r--r--example/ndpiReader.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/example/ndpiReader.c b/example/ndpiReader.c
index 30a6f9589..83144b46e 100644
--- a/example/ndpiReader.c
+++ b/example/ndpiReader.c
@@ -1220,7 +1220,7 @@ static void printFlow(u_int16_t id, struct ndpi_flow_info *flow, u_int16_t threa
fprintf(out, "[Risk: ");
for(i=0; i<NDPI_MAX_RISK; i++)
- if(NDPI_ISSET_BIT_16(flow->risk, i))
+ if(NDPI_ISSET_BIT(flow->risk, i))
fprintf(out, "** %s **", ndpi_risk2str(i));
fprintf(out, "]");
@@ -3044,17 +3044,17 @@ void test_lib() {
/* *********************************************** */
static void bitmapUnitTest() {
- u_int16_t val, i, j;
+ u_int32_t val, i, j;
for(i=0; i<16; i++) {
- NDPI_ZERO_16(val);
- NDPI_SET_BIT_16(val, i);
+ val = 0;
+ NDPI_SET_BIT(val, i);
- assert(NDPI_ISSET_BIT_16(val, i));
+ assert(NDPI_ISSET_BIT(val, i));
for(j=0; j<16; j++) {
if(j != i) {
- assert(!NDPI_ISSET_BIT_16(val, j));
+ assert(!NDPI_ISSET_BIT(val, j));
}
}
}