Hi Luca

Thanks for replying. Disregarding the compilation or not. Can you please comment on the big changes in logic I highlighted below? eg including linux_compat on linux and all the type redeclarations and packet declarations that were previously defined only for Win32? Especially the latter seems wrong since this is all defined in arpa/in.h on linux (no idea about bsd)

Thanks for your comments

Ed W



On 15/10/2012 11:10, Luca Deri wrote:
Ed
so many things changed as OpenDPI (the father of nDPI) was not reentrant and this is a serious limitation on 2012. More changes will follow.

The library compiles for me, so please tell me how to reproduce your problem.

Thanks Luca

On 10/15/2012 11:15 AM, Ed W wrote:
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

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

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

Reply via email to