diff options
Diffstat (limited to 'examples/c-simple/c-simple.c')
-rw-r--r-- | examples/c-simple/c-simple.c | 18 |
1 files changed, 9 insertions, 9 deletions
diff --git a/examples/c-simple/c-simple.c b/examples/c-simple/c-simple.c index abf2e3feb..a923d1424 100644 --- a/examples/c-simple/c-simple.c +++ b/examples/c-simple/c-simple.c @@ -150,13 +150,13 @@ static enum nDPIsrvd_callback_return simple_json_callback(struct nDPIsrvd_socket } struct nDPIsrvd_json_token const * const flow_event_name = TOKEN_GET_SZ(sock, "flow_event_name"); - if (TOKEN_VALUE_EQUALS_SZ(flow_event_name, "new") != 0) + if (TOKEN_VALUE_EQUALS_SZ(sock, flow_event_name, "new") != 0) { printf("Instance %.*s/%.*s (HT-Key: 0x%x), Thread %d, Flow %llu new\n", - alias->value_length, - alias->value, - source->value_length, - source->value, + nDPIsrvd_get_token_size(sock, alias), + nDPIsrvd_get_token_value(sock, alias), + nDPIsrvd_get_token_size(sock, source), + nDPIsrvd_get_token_value(sock, source), instance->alias_source_key, flow->thread_id, flow->id_as_ull); @@ -185,10 +185,10 @@ static void simple_flow_cleanup_callback(struct nDPIsrvd_socket * const sock, char const * const reason_str = nDPIsrvd_enum_to_string(reason); printf("Instance %.*s/%.*s (HT-Key: 0x%x), Thread %d, Flow %llu cleanup, reason: %s\n", - alias->value_length, - alias->value, - source->value_length, - source->value, + nDPIsrvd_get_token_size(sock, alias), + nDPIsrvd_get_token_value(sock, alias), + nDPIsrvd_get_token_size(sock, source), + nDPIsrvd_get_token_value(sock, source), instance->alias_source_key, flow->thread_id, flow->id_as_ull, |