diff options
author | Toni <matzeton@googlemail.com> | 2022-09-21 18:24:04 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-09-21 18:24:04 +0200 |
commit | 644ad34962365fa794b8f58e01a7290496f3d6ef (patch) | |
tree | 6585447ab509e90ce4733066c8182f8e930ebc36 /example/reader_util.c | |
parent | d6701e8979292834cd50abc78e8beafea7c7be8c (diff) |
Improved NATPMP dissection. (#1745)
Signed-off-by: Toni Uhlig <matzeton@googlemail.com>
Signed-off-by: Toni Uhlig <matzeton@googlemail.com>
Diffstat (limited to 'example/reader_util.c')
-rw-r--r-- | example/reader_util.c | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/example/reader_util.c b/example/reader_util.c index 37e5bf4b4..927d22ab2 100644 --- a/example/reader_util.c +++ b/example/reader_util.c @@ -1107,6 +1107,14 @@ void process_ndpi_collected_info(struct ndpi_workflow * workflow, struct ndpi_fl ndpi_snprintf(flow->softether.fqdn, sizeof(flow->softether.fqdn), "%s", flow->ndpi_flow->protos.softether.fqdn); } + /* NATPMP */ + else if(is_ndpi_proto(flow, NDPI_PROTOCOL_NATPMP)) { + flow->info_type = INFO_NATPMP; + flow->natpmp.result_code = flow->ndpi_flow->protos.natpmp.result_code; + flow->natpmp.internal_port = flow->ndpi_flow->protos.natpmp.internal_port; + flow->natpmp.external_port = flow->ndpi_flow->protos.natpmp.external_port; + inet_ntop(AF_INET, &flow->ndpi_flow->protos.natpmp.external_address.ipv4, &flow->natpmp.ip[0], sizeof(flow->natpmp.ip)); + } /* DISCORD */ else if(is_ndpi_proto(flow, NDPI_PROTOCOL_DISCORD) && !is_ndpi_proto(flow, NDPI_PROTOCOL_TLS) && flow->ndpi_flow->protos.discord.client_ip[0] != '\0') { |