Which is exactly what I said... ntop looks in the directories in order...
Here is the code from webInterface.c, around 612:
char* getCountryIconURL(char* domainName) {
if((domainName == NULL) || (domainName[0] == '\0')) {
/* Courtesy of Roberto De Luca <[EMAIL PROTECTED]> */
return(" ");
} else {
static char flagBuf[384];
char path[256];
struct stat buf;
if(snprintf(path, sizeof(path), "./html/statsicons/flags/%s.gif",
domainName) < 0)
BufferTooShort();
if(stat(path, &buf) != 0) {
if(snprintf(path, sizeof(path), "%s/html/statsicons/flags/%s.gif",
DATAFILE_DIR, domainName) < 0)
BufferTooShort();
if(stat(path, &buf) != 0)
return(" ");
}
if(snprintf(flagBuf, sizeof(flagBuf),
"<IMG ALT=\"Flag for domain %s\" ALIGN=MIDDLE
SRC=\"/statsicons/flags/%s.gif\" BORDER=0>",
domainName, domainName) < 0) BufferTooShort();
return(flagBuf);
}
}
So first it checks "." - which differs between the two types of runs
Then it checks "DATAFILE_DIR" which is #defined:
ntop_win32.h: 44 #define DATAFILE_DIR "."
If you want ntop to look somewhere other than %SystemRoot%\system32\html you
have to change the constant... or create a .bat file so that the current
directory is what you want it to be when ntop starts up.
I'll write it up & post it to snapshot.
-----Burton
-----Original Message-----
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]On Behalf
Of Jac Engel
Sent: Thursday, July 11, 2002 11:07 AM
To: [EMAIL PROTECTED]
Subject: RE: [Ntop-dev] undefined reference to rrdPluginEntryFctn
<snip />
Burton,
Think I found the problem.
1) Starting ntop as console
cd \NTOPNEW
ntop /c
the DB files are created in the directory NTOPNEW
2) Starting ntop as service ( the props of this service item
"PAth to executable" = C:\NTOPNEW\ntop.exe)
cd \NTOPNEW
ntop /i
the DB files are created in \WINNT\SYSTEM32
if I copy the HTML dir to \WINNT\SYSTEM32 then the
domainflags are shown !!
Even if I start ntop as service :
ntop /i -PC:\NTOPNEW
Then the DB files are in \NTOPNEW
But the domainflags are only shown if \WINNT\SYSTEM32\HTML dir is
available
3)
HTML dir NOT available in \WINNT\SYSTEM32 part of source view of host
213.51.184.1 :
<TR ><TH ALIGN=LEFT NOWRAP><A
HREF="/213.51.184.1.html">r1-fe1-0-sec.venra1.lb.home.nl</A></TH><TD
ALIGN=CENTER> </TD><TD ALIGN=RIGHT>213.51.184.1</TD><TD
ALIGN=RIGHT> </TD><TD ALIGN=RIGHT NOWRAP> </TD><TD
ALIGN=LEFT><IMG ALIGN=ABSMIDDLE SRC=/gauge.jpg ALT="55%" WIDTH=165
HEIGHT=12> </TD>
<TD ALIGN=RIGHT> </TD><TD ALIGN=RIGHT> </TD></TR>
HTML dir available in \WINNT\SYSTEM32 part of source view of host
213.51.184.1:
<TR ><TH ALIGN=LEFT NOWRAP><A
HREF="/213.51.184.1.html">r1-fe1-0-sec.venra1.lb.home.nl</A></TH><TD
ALIGN=CENTER><IMG ALT="Flag for domain nl" ALIGN=MIDDLE
SRC="/statsicons/flags/nl.gif" BORDER=0></TD><TD
ALIGN=RIGHT>213.51.184.1</TD><TD ALIGN=RIGHT> </TD><TD ALIGN=RIGHT
NOWRAP> </TD><TD ALIGN=LEFT><IMG ALIGN=ABSMIDDLE SRC=/gauge.jpg
ALT="86%" WIDTH=258 HEIGHT=12> </TD>
<TD ALIGN=RIGHT> </TD><TD ALIGN=RIGHT> </TD></TR>
rgds
Jac
-----Original Message-----
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]On Behalf
Of Burton M. Strauss III
Sent: Thursday, July 11, 2002 5:15 PM
To: [EMAIL PROTECTED]
Cc: [EMAIL PROTECTED]
Subject: RE: [Ntop-dev] undefined reference to rrdPluginEntryFctn
Are you sure they are in the directory? Just have to check...
Are you getting blank or the little Xs that mean unable to retrieve?
Which domain flags, exactly?
Post the html source (mouse in the correct frame, right click, view source)
What browser?
-----Burton
-----Original Message-----
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]On Behalf
Of Jac Engel
Sent: Thursday, July 11, 2002 9:56 AM
To: [EMAIL PROTECTED]
Subject: RE: [Ntop-dev] undefined reference to rrdPluginEntryFctn
Burton,
The hosts pictures like DNS etc are shown so it finds the html dir,
only the domain flags are not shown.
Jac
-----Original Message-----
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]On Behalf
Of Burton Strauss
Sent: Wednesday, July 10, 2002 11:45 PM
To: [EMAIL PROTECTED]
Subject: RE: [Ntop-dev] undefined reference to rrdPluginEntryFctn
Under *nix, ntop looks for stuff in ./html and then whatever directory(ies)
are in the list.
Could it be that when you run with -c, you are in the ntop directory, so
./html has the gifs? And when it runs as -i it's running probably at c:\ so
c:\html doesn't??
Try doing:
>cd c:\
>c:\whatever\ntop -c ....
Bet it doesn't have domain flags either...
-----Burton
<snip />
_______________________________________________
Ntop-dev mailing list
[EMAIL PROTECTED]
http://lists.ntop.org/mailman/listinfo/ntop-dev