diff options
author | Luca <deri@ntop.org> | 2023-09-27 17:05:12 +0200 |
---|---|---|
committer | Luca <deri@ntop.org> | 2023-09-27 17:05:12 +0200 |
commit | 77e5daf03e1ee7a8377a5a8906fe2c089c94ecf0 (patch) | |
tree | 4a53b889791a634d8572702ce4e78ec0f9286dce /src/lib/protocols/mining.c | |
parent | ef3adb98308f14628e64b918f739e472de00cfcf (diff) |
Cleaned up mining datastructure
Diffstat (limited to 'src/lib/protocols/mining.c')
-rw-r--r-- | src/lib/protocols/mining.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/lib/protocols/mining.c b/src/lib/protocols/mining.c index ba1da1454..02c765216 100644 --- a/src/lib/protocols/mining.c +++ b/src/lib/protocols/mining.c @@ -72,7 +72,7 @@ static void ndpi_search_mining_udp(struct ndpi_detection_module_struct *ndpi_str else if(packet->iphv6 && ntohl(packet->iphv6->ip6_dst.u6_addr.u6_addr32[0]) == 0xFF020000) ; else { - ndpi_snprintf(flow->flow_extra_info, sizeof(flow->flow_extra_info), "%s", "ETH"); + ndpi_snprintf(flow->protos.mining.currency, sizeof(flow->protos.mining.currency), "%s", "ETH"); ndpi_set_detected_protocol(ndpi_struct, flow, NDPI_PROTOCOL_MINING, NDPI_PROTOCOL_UNKNOWN, NDPI_CONFIDENCE_DPI); cacheMiningHostTwins(ndpi_struct, flow); return; @@ -102,7 +102,7 @@ static void ndpi_search_mining_tcp(struct ndpi_detection_module_struct *ndpi_str && (packet->payload_packet_len < 600) && (packet->payload[2] == 0x04)) { if(isEthPort(ntohs(packet->tcp->dest)) /* Ethereum port */) { - ndpi_snprintf(flow->flow_extra_info, sizeof(flow->flow_extra_info), "%s", "ETH"); + ndpi_snprintf(flow->protos.mining.currency, sizeof(flow->protos.mining.currency), "%s", "ETH"); ndpi_set_detected_protocol(ndpi_struct, flow, NDPI_PROTOCOL_MINING, NDPI_PROTOCOL_UNKNOWN, NDPI_CONFIDENCE_DPI); cacheMiningHostTwins(ndpi_struct, flow); return; @@ -120,7 +120,7 @@ static void ndpi_search_mining_tcp(struct ndpi_detection_module_struct *ndpi_str { "id": 2, "jsonrpc":"2.0","result":true} {"worker": "", "jsonrpc": "2.0", "params": [], "id": 3, "method": "eth_getWork"} */ - ndpi_snprintf(flow->flow_extra_info, sizeof(flow->flow_extra_info), "%s", "ETH"); + ndpi_snprintf(flow->protos.mining.currency, sizeof(flow->protos.mining.currency), "%s", "ETH"); ndpi_set_detected_protocol(ndpi_struct, flow, NDPI_PROTOCOL_MINING, NDPI_PROTOCOL_UNKNOWN, NDPI_CONFIDENCE_DPI); cacheMiningHostTwins(ndpi_struct, flow); return; @@ -143,7 +143,7 @@ static void ndpi_search_mining_tcp(struct ndpi_detection_module_struct *ndpi_str {"id":1,"jsonrpc":"2.0","error":null,"result":{"id":"479059546883218","job":{"blob":"0606e89883d205a65d8ee78991838a1cf3ec2ebbc5fb1fa43dec5fa1cd2bee4069212a549cd731000000005a88235653097aa3e97ef2ceef4aee610751a828f9be1a0758a78365fb0a4c8c05","job_id":"722134174127131","target":"dc460300"},"status":"OK"}} {"method":"submit","params":{"id":"479059546883218","job_id":"722134174127131","nonce":"98024001","result":"c9be9381a68d533c059d614d961e0534d7d8785dd5c339c2f9596eb95f320100"},"id":1} */ - ndpi_snprintf(flow->flow_extra_info, sizeof(flow->flow_extra_info), "%s", "ZCash/Monero"); + ndpi_snprintf(flow->protos.mining.currency, sizeof(flow->protos.mining.currency), "%s", "ZCash/Monero"); ndpi_set_detected_protocol(ndpi_struct, flow, NDPI_PROTOCOL_MINING, NDPI_PROTOCOL_UNKNOWN, NDPI_CONFIDENCE_DPI); cacheMiningHostTwins(ndpi_struct, flow); return; |