Removed linux kernel support
This commit is contained in:
@@ -219,10 +219,8 @@ struct ndpi_ip6_ext
|
||||
#define s6_addr32 u6_addr.u6_addr32
|
||||
*/
|
||||
#else
|
||||
#ifndef __KERNEL__
|
||||
#include <arpa/inet.h>
|
||||
#endif
|
||||
#endif
|
||||
|
||||
struct ndpi_in6_addr {
|
||||
union {
|
||||
|
||||
@@ -218,12 +218,7 @@
|
||||
#define NDPI_COMPARE_IPV6_ADDRESS_STRUCTS(x,y) \
|
||||
((((u_int64_t *)(x))[0]) < (((u_int64_t *)(y))[0]) || ( (((u_int64_t *)(x))[0]) == (((u_int64_t *)(y))[0]) && (((u_int64_t *)(x))[1]) < (((u_int64_t *)(y))[1])) )
|
||||
|
||||
#if !defined(__KERNEL__) && !defined(NDPI_IPTABLES_EXT)
|
||||
#define NDPI_NUM_BITS 256
|
||||
#else
|
||||
/* custom protocols not supported */
|
||||
#define NDPI_NUM_BITS 192
|
||||
#endif
|
||||
|
||||
#define NDPI_BITS /* 32 */ (sizeof(ndpi_ndpi_mask) * 8 /* number of bits in a byte */) /* bits per mask */
|
||||
#define howmanybits(x, y) (((x)+((y)-1))/(y))
|
||||
@@ -289,18 +284,10 @@
|
||||
#define get_l32(X,O) get_u_int32_t(X,O)
|
||||
#elif defined(__BIG_ENDIAN__) || defined(__BIG_ENDIAN)
|
||||
/* convert the bytes from big to little endian */
|
||||
#ifndef __KERNEL__
|
||||
# define get_l16(X,O) bswap_16(get_u_int16_t(X,O))
|
||||
# define get_l32(X,O) bswap_32(get_u_int32_t(X,O))
|
||||
#else
|
||||
# define get_l16(X,O) __cpu_to_le16(get_u_int16_t(X,O))
|
||||
# define get_l32(X,O) __cpu_to_le32(get_u_int32_t(X,O))
|
||||
#endif
|
||||
|
||||
#else
|
||||
|
||||
#error "__BYTE_ORDER MUST BE DEFINED !"
|
||||
|
||||
#endif /* __BYTE_ORDER */
|
||||
|
||||
/* define memory callback function */
|
||||
|
||||
@@ -25,7 +25,6 @@
|
||||
#ifndef __NDPI_MAIN_INCLUDE_FILE__
|
||||
#define __NDPI_MAIN_INCLUDE_FILE__
|
||||
|
||||
#ifndef __KERNEL__
|
||||
#include <stdint.h>
|
||||
#include <stdio.h>
|
||||
#include <stdarg.h>
|
||||
@@ -35,33 +34,21 @@
|
||||
#endif
|
||||
#include <ctype.h>
|
||||
#include <time.h>
|
||||
#endif
|
||||
|
||||
|
||||
#ifndef WIN32
|
||||
#ifndef __KERNEL__
|
||||
#include <sys/time.h>
|
||||
#endif
|
||||
|
||||
#if !defined __APPLE__ && !defined __FreeBSD__ && !defined __NetBSD__ && !defined __OpenBSD__
|
||||
|
||||
#ifndef __KERNEL__
|
||||
#include <endian.h>
|
||||
#include <byteswap.h>
|
||||
#else
|
||||
#include <asm/byteorder.h>
|
||||
#include <linux/ctype.h>
|
||||
#endif
|
||||
|
||||
#endif
|
||||
|
||||
/* default includes */
|
||||
|
||||
#ifndef __KERNEL__
|
||||
#include <sys/param.h>
|
||||
#include <limits.h>
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#include "ndpi_win32.h"
|
||||
#include "ndpi_unix.h"
|
||||
|
||||
@@ -100,7 +100,6 @@ typedef union {
|
||||
|
||||
|
||||
#ifdef NDPI_PROTOCOL_BITTORRENT
|
||||
#ifndef __KERNEL__
|
||||
typedef struct spinlock {
|
||||
volatile int val;
|
||||
} spinlock_t;
|
||||
@@ -108,8 +107,6 @@ typedef struct atomic {
|
||||
volatile int counter;
|
||||
} atomic_t;
|
||||
|
||||
#endif
|
||||
|
||||
struct hash_ip4p_node {
|
||||
struct hash_ip4p_node *next,*prev;
|
||||
time_t lchg;
|
||||
@@ -692,11 +689,7 @@ typedef struct ndpi_flow_struct {
|
||||
that identifies the
|
||||
server of this connection
|
||||
*/
|
||||
#ifndef __KERNEL__
|
||||
u_char host_server_name[256]; /* HTTP host or DNS query */
|
||||
#else
|
||||
u_char host_server_name[160];
|
||||
#endif
|
||||
u_char detected_os[32]; /* Via HTTP User-Agent */
|
||||
u_char nat_ip[24]; /* Via HTTP X-Forwarded-For */
|
||||
|
||||
|
||||
@@ -38,16 +38,9 @@
|
||||
#endif
|
||||
|
||||
#ifndef WIN32
|
||||
#ifndef __KERNEL__
|
||||
|
||||
#include <netinet/ip.h>
|
||||
#include <netinet/tcp.h>
|
||||
#include <netinet/udp.h>
|
||||
#else
|
||||
#include <linux/ip.h>
|
||||
#include <linux/tcp.h>
|
||||
#include <linux/udp.h>
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#endif /* __NDPI_UNIX_INCLUDE_FILE__ */
|
||||
|
||||
Reference in New Issue
Block a user