aboutsummaryrefslogtreecommitdiff
path: root/src/lib/protocols
diff options
context:
space:
mode:
Diffstat (limited to 'src/lib/protocols')
-rw-r--r--src/lib/protocols/bgp.c6
-rw-r--r--src/lib/protocols/bittorrent.c6
-rw-r--r--src/lib/protocols/git.c2
-rw-r--r--src/lib/protocols/quic.c1
-rw-r--r--src/lib/protocols/rx.c2
5 files changed, 3 insertions, 14 deletions
diff --git a/src/lib/protocols/bgp.c b/src/lib/protocols/bgp.c
index 0ec6fa59c..a45514b7d 100644
--- a/src/lib/protocols/bgp.c
+++ b/src/lib/protocols/bgp.c
@@ -24,12 +24,6 @@
#ifdef NDPI_PROTOCOL_BGP
-
-static void ndpi_int_bgp_add_connection(struct ndpi_detection_module_struct *ndpi_struct, struct ndpi_flow_struct *flow)
-{
- ndpi_set_detected_protocol(ndpi_struct, flow, NDPI_PROTOCOL_BGP, NDPI_PROTOCOL_UNKNOWN);
-}
-
/* this detection also works asymmetrically */
void ndpi_search_bgp(struct ndpi_detection_module_struct *ndpi_struct, struct ndpi_flow_struct *flow)
{
diff --git a/src/lib/protocols/bittorrent.c b/src/lib/protocols/bittorrent.c
index 0eebe07ee..a88b1cce5 100644
--- a/src/lib/protocols/bittorrent.c
+++ b/src/lib/protocols/bittorrent.c
@@ -57,16 +57,15 @@ static void ndpi_add_connection_as_bittorrent(struct ndpi_detection_module_struc
{
if(check_hash) {
const char *bt_hash = NULL; /* 20 bytes long */
- const char *peer_id = NULL; /* 20 bytes long */
if(bt_offset == -1) {
const char *bt_magic = ndpi_strnstr((const char *)flow->packet.payload,
"BitTorrent protocol", flow->packet.payload_packet_len);
if(bt_magic)
- bt_hash = &bt_magic[19], peer_id = &bt_magic[39];
+ bt_hash = &bt_magic[19];
} else
- bt_hash = (const char*)&flow->packet.payload[28], peer_id = (const char*)&flow->packet.payload[48];
+ bt_hash = (const char*)&flow->packet.payload[28];
if(bt_hash) memcpy(flow->bittorent_hash, bt_hash, 20);
}
@@ -385,7 +384,6 @@ static void ndpi_int_search_bittorrent_tcp(struct ndpi_detection_module_struct *
void ndpi_search_bittorrent(struct ndpi_detection_module_struct *ndpi_struct, struct ndpi_flow_struct *flow)
{
struct ndpi_packet_struct *packet = &flow->packet;
- int no_bittorrent = 0;
char *bt_proto = NULL;
/* This is broadcast */
diff --git a/src/lib/protocols/git.c b/src/lib/protocols/git.c
index e156b7913..a60a94fe1 100644
--- a/src/lib/protocols/git.c
+++ b/src/lib/protocols/git.c
@@ -35,7 +35,7 @@ void ndpi_search_git(struct ndpi_detection_module_struct *ndpi_struct,
const u_int8_t * pp = packet->payload;
u_int16_t payload_len = packet->payload_packet_len;
u_int8_t found_git = 1;
- u_int16_t git_len = 0, offset = 0;
+ u_int16_t offset = 0;
while((offset+4) < payload_len) {
char len[5];
diff --git a/src/lib/protocols/quic.c b/src/lib/protocols/quic.c
index 8050a9b61..35b8d0911 100644
--- a/src/lib/protocols/quic.c
+++ b/src/lib/protocols/quic.c
@@ -73,7 +73,6 @@ void ndpi_search_quic(struct ndpi_detection_module_struct *ndpi_struct,
&& ((packet->payload[0] & 0xC2) == 0x00)
&& (quic_ports(ntohs(packet->udp->source), ntohs(packet->udp->dest)))
) {
- char *begin;
int i;
if((version_len > 0) && (packet->payload[1+cid_len] != 'Q'))
diff --git a/src/lib/protocols/rx.c b/src/lib/protocols/rx.c
index 9d27d5e18..e5ae25476 100644
--- a/src/lib/protocols/rx.c
+++ b/src/lib/protocols/rx.c
@@ -78,8 +78,6 @@ void ndpi_check_rx(struct ndpi_detection_module_struct *ndpi_struct,
{
struct ndpi_packet_struct *packet = &flow->packet;
u_int32_t payload_len = packet->payload_packet_len;
- int found = 0;
-
NDPI_LOG(NDPI_PROTOCOL_RX, ndpi_struct, NDPI_LOG_DEBUG, "RX: pck: %d, dir[0]: %d, dir[1]: %d\n",
flow->packet_counter, flow->packet_direction_counter[0], flow->packet_direction_counter[1]);