aboutsummaryrefslogtreecommitdiff
path: root/src/lib/protocols
diff options
context:
space:
mode:
Diffstat (limited to 'src/lib/protocols')
-rw-r--r--src/lib/protocols/btlib.c49
-rw-r--r--src/lib/protocols/http.c4
-rw-r--r--src/lib/protocols/ookla.c1
3 files changed, 0 insertions, 54 deletions
diff --git a/src/lib/protocols/btlib.c b/src/lib/protocols/btlib.c
index 71b4dff9a..c85acd54c 100644
--- a/src/lib/protocols/btlib.c
+++ b/src/lib/protocols/btlib.c
@@ -46,55 +46,6 @@ typedef unsigned long long int u_int64_t;
int bt_parse_debug = 0;
-static char *printXb(char *s,const u_int8_t *b,int l) {
- int i;
- for(i=0; i < l; i++)
- snprintf(&s[i*2],41,"%02x",b[i]);
- return s;
-}
-
-static char *print20b(char *s,const u_int8_t *b) {
- snprintf(s,41,"%08x%08x%08x%08x%08x",
- htonl(*(u_int32_t*)b),
- htonl(*(u_int32_t*)(b+4)),
- htonl(*(u_int32_t*)(b+8)),
- htonl(*(u_int32_t*)(b+12)),
- htonl(*(u_int32_t*)(b+16)));
- return s;
-}
-
-static char *print_id_ip_p(char *s, const struct bt_nodes_data *b) {
- u_int8_t *p = (u_int8_t*)b;
-
- print20b(s,b->id);
- snprintf(s+40,39," %d.%d.%d.%d:%u",
- p[20], p[21], p[22], p[23], htons(b->port));
- return s;
-}
-
-static char *print_ip_p(char *s, const struct bt_ipv4p *b,int np) {
- const u_int8_t *p = (const u_int8_t*)b;
-
- snprintf(s,39,!np ? "%d.%d.%d.%d:%u":"%d.%d.%d.%d",
- p[0], p[1], p[2], p[3], htons(b->port));
- return s;
-}
-
-static char *print_ip6_p(char *s, const struct bt_ipv6p *b,int np) {
- u_int16_t *p = (u_int16_t*)b;
-
- snprintf(s,79,!np ? "%x:%x:%x:%x:%x:%x:%x:%x.%u":"%x:%x:%x:%x:%x:%x:%x:%x",
- htons(p[0]), htons(p[1]), htons(p[2]), htons(p[3]),
- htons(p[4]), htons(p[5]), htons(p[6]), htons(p[7]),
- htons(b->port));
- return s;
-}
-
-static char *print_id_ip6_p(char *s,const struct bt_nodes6_data *b) {
- return print_ip6_p(s,(struct bt_ipv6p *)&b->ip,0);
-}
-
-
#if 0
void dump_bt_proto_struct(struct bt_parse_protocol *p) {
char b20h[128];
diff --git a/src/lib/protocols/http.c b/src/lib/protocols/http.c
index de2bb032e..1f5b88c7a 100644
--- a/src/lib/protocols/http.c
+++ b/src/lib/protocols/http.c
@@ -425,10 +425,6 @@ static struct l_string {
STATIC_STRING_L("REPORT ") };
static const char *http_fs = "CDGHOPR";
-static uint8_t non_ctrl(uint8_t c) {
- return c < 32 ? '.':c;
-}
-
static u_int16_t http_request_url_offset(struct ndpi_detection_module_struct *ndpi_struct, struct ndpi_flow_struct *flow)
{
struct ndpi_packet_struct *packet = &flow->packet;
diff --git a/src/lib/protocols/ookla.c b/src/lib/protocols/ookla.c
index 06d97e216..44746fbd3 100644
--- a/src/lib/protocols/ookla.c
+++ b/src/lib/protocols/ookla.c
@@ -27,7 +27,6 @@
void ndpi_search_ookla(struct ndpi_detection_module_struct* ndpi_struct, struct ndpi_flow_struct* flow) {
struct ndpi_packet_struct* packet = &flow->packet;
u_int32_t addr = 0;
- void *value;
NDPI_LOG_DBG(ndpi_struct, "Ookla detection\n");