diff options
Diffstat (limited to 'src/lib')
-rw-r--r-- | src/lib/ndpi_main.c | 42 | ||||
-rw-r--r-- | src/lib/protocols/afp.c | 2 | ||||
-rw-r--r-- | src/lib/protocols/armagetron.c | 3 | ||||
-rw-r--r-- | src/lib/third_party/src/ndpi_patricia.c | 41 |
4 files changed, 3 insertions, 85 deletions
diff --git a/src/lib/ndpi_main.c b/src/lib/ndpi_main.c index 51a2c66b0..dd5022b03 100644 --- a/src/lib/ndpi_main.c +++ b/src/lib/ndpi_main.c @@ -4484,45 +4484,3 @@ void NDPI_DUMP_BITMASK(NDPI_PROTOCOL_BITMASK a) { printf("\n"); } - -/* #ifdef WIN32 */ -/* /\* http://www.opensource.apple.com/source/xnu/xnu-1456.1.26/bsd/libkern/strsep.c *\/ */ - -/* /\* */ -/* * Get next token from string *stringp, where tokens are possibly-empty */ -/* * strings separated by characters from delim. */ -/* * */ -/* * Writes NULs into the string at *stringp to end tokens. */ -/* * delim need not remain constant from call to call. */ -/* * On return, *stringp points past the last NUL written (if there might */ -/* * be further tokens), or is NULL (if there are definitely no more tokens). */ -/* * */ -/* * If *stringp is NULL, strsep returns NULL. */ -/* *\/ */ -/* char* strsep(char **stringp, const char *delim) { */ -/* char *s; */ -/* const char *spanp; */ -/* int c, sc; */ -/* char *tok; */ - -/* if((s = *stringp) == NULL) */ -/* return (NULL); */ -/* for(tok = s;;) { */ -/* c = *s++; */ -/* spanp = delim; */ -/* do { */ -/* if((sc = *spanp++) == c) { */ -/* if(c == 0) */ -/* s = NULL; */ -/* else */ -/* s[-1] = 0; */ -/* *stringp = s; */ -/* return (tok); */ -/* } */ -/* } while (sc != 0); */ -/* } */ -/* /\* NOTREACHED *\/ */ -/* } */ -/* #endif */ - - diff --git a/src/lib/protocols/afp.c b/src/lib/protocols/afp.c index 1b5232494..0f61986bc 100644 --- a/src/lib/protocols/afp.c +++ b/src/lib/protocols/afp.c @@ -23,8 +23,8 @@ * */ - #include "ndpi_protocols.h" + #ifdef NDPI_PROTOCOL_AFP static void ndpi_int_afp_add_connection(struct ndpi_detection_module_struct *ndpi_struct, struct ndpi_flow_struct *flow) diff --git a/src/lib/protocols/armagetron.c b/src/lib/protocols/armagetron.c index c93c2a6df..61a32326e 100644 --- a/src/lib/protocols/armagetron.c +++ b/src/lib/protocols/armagetron.c @@ -22,8 +22,9 @@ * */ -/* include files */ + #include "ndpi_protocols.h" + #ifdef NDPI_PROTOCOL_ARMAGETRON diff --git a/src/lib/third_party/src/ndpi_patricia.c b/src/lib/third_party/src/ndpi_patricia.c index 0a8fa857d..aa750bebc 100644 --- a/src/lib/third_party/src/ndpi_patricia.c +++ b/src/lib/third_party/src/ndpi_patricia.c @@ -84,47 +84,6 @@ int ndpi_comp_with_mask (void *addr, void *dest, u_int mask) { return (0); } -#if 0 /* this implementation does not support IPv6, using system inet_pton */ -#ifndef WIN32 -/* inet_pton substitute implementation - * Uses inet_addr to convert an IP address in dotted decimal notation into - * unsigned long and copies the result to dst. - * Only supports AF_INET. Follows standard error return conventions of - * inet_pton. - */ -int -inet_pton (int af, const char *src, void *dst) -{ - u_long result; - - if(af == AF_INET) { - result = inet_addr(src); - if(result == -1) - return 0; - else { - memcpy (dst, &result, sizeof(struct in_addr)); - return 1; - } - } -#ifdef NT -#if defined(PATRICIA_IPV6) - else if(af == AF_INET6) { - struct in6_addr Address; - return (inet6_addr(src, &Address)); - } -#endif /* PATRICIA_IPV6 */ -#endif /* NT */ -#ifndef NT - else { - printf("NOT SUPP\n"); - errno = EAFNOSUPPORT; - return -1; - } -#endif /* NT */ -} -#endif -#endif - /* this allows imcomplete prefix */ int ndpi_my_inet_pton (int af, const char *src, void *dst) |