Here's the summary of the work I've done to get NTOP running on Solaris:

This fixes a declaration ocurring after code in a block. This moves the
code after the decls.
Index: ntop/http.c
===================================================================
RCS file: /export/home/ntop/ntop/http.c,v
retrieving revision 2.145
diff -r2.145 http.c
2499,2500d2498
<     traceEvent(CONST_TRACE_ERROR, "URL security: '%s' rejected (code=%d)(client=%s)",
<              requestedURL, rc, _intoa(from, tmpStr, sizeof(tmpStr)));
2532a2531,2532
>     traceEvent(CONST_TRACE_ERROR, "URL security: '%s' rejected (code=%d)(client=%s)",
>              requestedURL, rc, _intoa(from, tmpStr, sizeof(tmpStr)));

This is the standard sparc alignment fix.
Index: ntop/pbuf.c
===================================================================
RCS file: /export/home/ntop/ntop/pbuf.c,v
retrieving revision 2.135
diff -r2.135 pbuf.c
963c963
<       u_char *tcp_data = (u_char *)((int)tcp + tcp->th_off * 4);
---
>       u_char *tcp_data = (u_char *)((int)tcp + tp.th_off * 4);

Again a fix from the list to protect from a NULL rrdPath also a ** being
checked for NULL but not its *.
Index: ntop/report.c
===================================================================
RCS file: /export/home/ntop/ntop/report.c,v
retrieving revision 2.161
diff -r2.161 report.c
609c609,610
<   snprintf(buf, sizeof(buf), "%s/interfaces/%s", myGlobals.rrdPath,
---
>   snprintf(buf, sizeof(buf), "%s/interfaces/%s",
>          myGlobals.rrdPath != NULL ? myGlobals.rrdPath : "",
2630a2632,2633
>     if((a == NULL) || (b == NULL))
>        return(0);

Another ** being checked but not the *.
Index: ntop/reportUtils.c
===================================================================
RCS file: /export/home/ntop/ntop/reportUtils.c,v
retrieving revision 2.160
diff -r2.160 reportUtils.c
1108a1109,1119
>   if((*a == NULL) && (*b != NULL)) {
>     traceEvent(CONST_TRACE_WARNING, "cmpFctn() error (4)");
>     return(1);
>   } else if((*a != NULL) && (*b == NULL)) {
>     traceEvent(CONST_TRACE_WARNING, "cmpFctn() error (5)");
>     return(-1);
>   } else if((*a == NULL) && (*b == NULL)) {
>     traceEvent(CONST_TRACE_WARNING, "cmpFctn() error (6)");
>     return(0);
>   }
> 
3693c3704,3705
<     snprintf(buf, sizeof(buf), "%s/interfaces/%s/hosts/%s", myGlobals.rrdPath,
---
>     snprintf(buf, sizeof(buf), "%s/interfaces/%s/hosts/%s",
>            myGlobals.rrdPath != NULL ? myGlobals.rrdPath : "",

This is a fix for myrrd to fine /usr/local/include the news CVS may
obviate this.
Index: ntop/configureextra/SOLARIS9
===================================================================
RCS file: /export/home/ntop/ntop/configureextra/SOLARIS9,v
retrieving revision 1.1
diff -r1.1 SOLARIS9
6a7
> INCS="${INCS} -I/usr/local/include -I/opt/sfw/include"

This is a fix from newer rrds for a missing function in solaris
Index: ntop/myrrd/rrd_tool.h
===================================================================
RCS file: /export/home/ntop/ntop/myrrd/rrd_tool.h,v
retrieving revision 1.2
diff -r1.2 rrd_tool.h
86a87,90
> #ifndef isinf
> #include <ieeefp.h>
> # define isinf(a) (fpclass(a) == FP_NINF || fpclass(a) == FP_PINF)
> #endif

Another NULL check
Index: ntop/plugins/rrdPlugin.c
===================================================================
RCS file: /export/home/ntop/ntop/plugins/rrdPlugin.c,v
retrieving revision 2.90
diff -r2.90 rrdPlugin.c
1690a1691,1692
>             if(myGlobals.device[k].ipTrafficMatrix == NULL)
>               continue;


-- 
[EMAIL PROTECTED]           Chris Turbeville                       NTT/VERIO
       Send mail with subject "send PGP Key" for PGP 6.5.2 Public key
_______________________________________________
Ntop-dev mailing list
[EMAIL PROTECTED]
http://listgateway.unipi.it/mailman/listinfo/ntop-dev

Reply via email to