Hi, these days I don't really remember how to use svn, but there is some significant changes in ndpi_main.h and linux_compat.h, probably from around end of Sept onwards, that dramatically change compilation on linux and in particular under netfilter?

I'm just working through the changes to make compilation work under linux, but I'm really unsure why many of the things were changed

For example I have changed:


--- src/include/ndpi_main.h     (revision 5748)
+++ src/include/ndpi_main.h     (working copy)
@@ -46,7 +46,8 @@

 /* default includes */

-#ifndef WIN32
+#if defined(__APPLE__) || defined(__FreeBSD__)
+/* Not WIN32 or Linux */
 #include <sys/param.h>
 #include <limits.h>
 #endif

Here the old code specifically only included these files on Apple/BSD, but the new code includes on linux also? Is this correct (it doesn't work under kernel compilation, but I'm unsure if it's ok under vanilla linux and if so why it was previously excluded from the linux path?)

Also I tentatively changed:

+#if defined(__APPLE__) || defined(WIN32) || defined(__FreeBSD__)
+/* Everything except linux */
 #include "linux_compat.h"
 #endif
+#endif

Current code includes linux_compat.h even on linux?  Is that correct?



There are a load of __BIG_ENDIAN__ / __LITTLE_ENDIAN__ changes which I concede not to understand (seems gcc specific?). The old code used BIG_ENDIAN and __BIG_ENDIAN macros?



Old code had a WIN32 only define around:

#if defined(HAVE_NTOP) && (defined(WIN32) /* || defined(__FreeBSD__) */)

typedef unsigned char  u_char;
typedef unsigned short u_short;
typedef unsigned int   uint;
typedef unsigned long  u_long;
typedef u_char  u_int8_t;
typedef u_short u_int16_t;
typedef uint   u_int32_t;

#define _WS2TCPIP_H_ /* Avoid compilation problems */
#define HAVE_SIN6_LEN

/* IPv6 address */
/* Already defined in WS2tcpip.h */
struct win_in6_addr
...
etc
...



However, the new code defines all this on linux/bsd also..? This seems unlikely to be correct?


Can I send patches for any of the above? Is there anyone who can check what I'm submitting since I concede I'm pretty green on this?

Thanks

Ed W
_______________________________________________
Ntop-dev mailing list
[email protected]
http://listgateway.unipi.it/mailman/listinfo/ntop-dev

Reply via email to