reorganized header files - added ndpi_includes.h
This commit is contained in:
@@ -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 */
|
||||
|
||||
|
||||
|
||||
@@ -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)
|
||||
|
||||
@@ -22,8 +22,9 @@
|
||||
*
|
||||
*/
|
||||
|
||||
/* include files */
|
||||
|
||||
#include "ndpi_protocols.h"
|
||||
|
||||
#ifdef NDPI_PROTOCOL_ARMAGETRON
|
||||
|
||||
|
||||
|
||||
-41
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user