@@ -1640,7 +1640,6 @@ static void pcap_packet_callback(u_char *args,
|
|||||||
|
|
||||||
datalink_check:
|
datalink_check:
|
||||||
switch(datalink_type) {
|
switch(datalink_type) {
|
||||||
|
|
||||||
case DLT_NULL :
|
case DLT_NULL :
|
||||||
if(ntohl(*((u_int32_t*)&packet[eth_offset])) == 2)
|
if(ntohl(*((u_int32_t*)&packet[eth_offset])) == 2)
|
||||||
type = ETH_P_IP;
|
type = ETH_P_IP;
|
||||||
@@ -1725,7 +1724,12 @@ static void pcap_packet_callback(u_char *args,
|
|||||||
ip_offset = wifi_len + radio_len + sizeof(struct ndpi_llc_header) + eth_offset;
|
ip_offset = wifi_len + radio_len + sizeof(struct ndpi_llc_header) + eth_offset;
|
||||||
break;
|
break;
|
||||||
|
|
||||||
|
case DLT_RAW:
|
||||||
|
ip_offset = eth_offset = 0;
|
||||||
|
break;
|
||||||
|
|
||||||
default:
|
default:
|
||||||
|
printf("Unknown datalink %d\n", datalink_type);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -1735,9 +1739,7 @@ static void pcap_packet_callback(u_char *args,
|
|||||||
type = (packet[ip_offset+2] << 8) + packet[ip_offset+3];
|
type = (packet[ip_offset+2] << 8) + packet[ip_offset+3];
|
||||||
ip_offset += 4;
|
ip_offset += 4;
|
||||||
vlan_packet = 1;
|
vlan_packet = 1;
|
||||||
}
|
} else if(type == MPLS_UNI || type == MPLS_MULTI) {
|
||||||
else if(type == MPLS_UNI || type == MPLS_MULTI) {
|
|
||||||
|
|
||||||
mpls = (struct ndpi_mpls_header *) &packet[ip_offset];
|
mpls = (struct ndpi_mpls_header *) &packet[ip_offset];
|
||||||
label = ntohl(mpls->label);
|
label = ntohl(mpls->label);
|
||||||
/* label = ntohl(*((u_int32_t*)&packet[ip_offset])); */
|
/* label = ntohl(*((u_int32_t*)&packet[ip_offset])); */
|
||||||
|
|||||||
@@ -63,10 +63,11 @@ static ndpi_network host_protocol_list[] = {
|
|||||||
Dropbox
|
Dropbox
|
||||||
108.160.160.0/20
|
108.160.160.0/20
|
||||||
199.47.216.0/22
|
199.47.216.0/22
|
||||||
|
45.58.64.0/20
|
||||||
*/
|
*/
|
||||||
{ 0x6CA0A000 /* 108.160.160.0 */, 20, NDPI_PROTOCOL_DROPBOX },
|
{ 0x6CA0A000 /* 108.160.160.0 */, 20, NDPI_PROTOCOL_DROPBOX },
|
||||||
{ 0xC72FD800 /* 199.47.216.0 */, 22, NDPI_PROTOCOL_DROPBOX },
|
{ 0xC72FD800 /* 199.47.216.0 */, 22, NDPI_PROTOCOL_DROPBOX },
|
||||||
{ 0x6CA0A000 /* 108.160.160.0 */, 20, NDPI_PROTOCOL_DROPBOX },
|
{ 0x2D3A4000 /* 45.58.64.0 */, 20, NDPI_PROTOCOL_DROPBOX },
|
||||||
|
|
||||||
/*
|
/*
|
||||||
Skype (Microsoft CDN)
|
Skype (Microsoft CDN)
|
||||||
@@ -7320,7 +7321,7 @@ ndpi_protocol_match host_match[] = {
|
|||||||
{ ".cnn.c", "CNN", NDPI_SERVICE_CNN, NDPI_PROTOCOL_FUN },
|
{ ".cnn.c", "CNN", NDPI_SERVICE_CNN, NDPI_PROTOCOL_FUN },
|
||||||
{ ".cnn.net", "CNN", NDPI_SERVICE_CNN, NDPI_PROTOCOL_FUN },
|
{ ".cnn.net", "CNN", NDPI_SERVICE_CNN, NDPI_PROTOCOL_FUN },
|
||||||
{ ".dropbox.com", "DropBox", NDPI_SERVICE_DROPBOX, NDPI_PROTOCOL_SAFE },
|
{ ".dropbox.com", "DropBox", NDPI_SERVICE_DROPBOX, NDPI_PROTOCOL_SAFE },
|
||||||
{ ".ebay.", "eBay", NDPI_SERVICE_EBAY, NDPI_PROTOCOL_ACCEPTABLE },
|
{ ".ebay.", "eBay", NDPI_SERVICE_EBAY, NDPI_PROTOCOL_ACCEPTABLE },
|
||||||
{ ".ebay.com", "eBay", NDPI_SERVICE_EBAY, NDPI_PROTOCOL_ACCEPTABLE },
|
{ ".ebay.com", "eBay", NDPI_SERVICE_EBAY, NDPI_PROTOCOL_ACCEPTABLE },
|
||||||
{ ".ebaystatic.com", "eBay", NDPI_SERVICE_EBAY, NDPI_PROTOCOL_ACCEPTABLE },
|
{ ".ebaystatic.com", "eBay", NDPI_SERVICE_EBAY, NDPI_PROTOCOL_ACCEPTABLE },
|
||||||
{ ".ebaydesc.com", "eBay", NDPI_SERVICE_EBAY, NDPI_PROTOCOL_ACCEPTABLE },
|
{ ".ebaydesc.com", "eBay", NDPI_SERVICE_EBAY, NDPI_PROTOCOL_ACCEPTABLE },
|
||||||
|
|||||||
Reference in New Issue
Block a user