Line
Link Here
|
0 |
-- a/Makefile.am |
0 |
++ b/Makefile.am |
Lines 36-42
Link Here
|
36 |
|
36 |
|
37 |
#AM_CFLAGS = |
37 |
#AM_CFLAGS = |
38 |
#AM_LDFLAGS= |
38 |
#AM_LDFLAGS= |
39 |
ACLOCAL_AMFLAGS=-I m4 |
|
|
40 |
|
39 |
|
41 |
DISTCLEANFILES = trivialcompilemessage *.db #* *~ *.log |
40 |
DISTCLEANFILES = trivialcompilemessage *.db #* *~ *.log |
42 |
CLEANFILES = $(DISTCLEANFILES) stamp-h1 |
41 |
CLEANFILES = $(DISTCLEANFILES) stamp-h1 |
Lines 67-75
Link Here
|
67 |
NTOPDATA = ntop-cert.pem \ |
66 |
NTOPDATA = ntop-cert.pem \ |
68 |
$(ETTER_PASSIVE) \ |
67 |
$(ETTER_PASSIVE) \ |
69 |
oui.txt.gz \ |
68 |
oui.txt.gz \ |
70 |
specialMAC.txt.gz \ |
69 |
specialMAC.txt.gz |
71 |
GeoIPASNum.dat \ |
|
|
72 |
GeoLiteCity.dat |
73 |
|
70 |
|
74 |
NTOPHTML = html html/*.js html/*.html html/*.gif html/*.jpg html/*.ico html/*.png \ |
71 |
NTOPHTML = html html/*.js html/*.html html/*.gif html/*.jpg html/*.ico html/*.png \ |
75 |
html/*.css html/*.dtd \ |
72 |
html/*.css html/*.dtd \ |
Lines 133-139
Link Here
|
133 |
|
130 |
|
134 |
libntop_la_DEPENDENCIES = config.h |
131 |
libntop_la_DEPENDENCIES = config.h |
135 |
libntop_la_LIBADD = $(BASE_LIBS) |
132 |
libntop_la_LIBADD = $(BASE_LIBS) |
136 |
libntop_la_LDFLAGS = $(AM_LDFLAGS) -release $(VERSION) -export-dynamic @DYN_FLAGS@ |
133 |
libntop_la_LDFLAGS = $(AM_LDFLAGS) -release $(VERSION) -export-dynamic -shared @DYN_FLAGS@ |
137 |
|
134 |
|
138 |
# Archive for http representation, or the 'viewer' |
135 |
# Archive for http representation, or the 'viewer' |
139 |
libntopreport_la_SOURCES = emitter.c globals-report.c graph.c \ |
136 |
libntopreport_la_SOURCES = emitter.c globals-report.c graph.c \ |
Lines 145-151
Link Here
|
145 |
|
142 |
|
146 |
libntopreport_la_DEPENDENCIES = libntop.la |
143 |
libntopreport_la_DEPENDENCIES = libntop.la |
147 |
libntopreport_la_LIBADD = libntop.la $(BASE_LIBS) |
144 |
libntopreport_la_LIBADD = libntop.la $(BASE_LIBS) |
148 |
libntopreport_la_LDFLAGS = $(AM_LDFLAGS) -release $(VERSION) -export-dynamic @DYN_FLAGS@ |
145 |
libntopreport_la_LDFLAGS = $(AM_LDFLAGS) -release $(VERSION) -export-dynamic -shared @DYN_FLAGS@ |
149 |
|
146 |
|
150 |
man_MANS = ntop.8 |
147 |
man_MANS = ntop.8 |
151 |
|
148 |
|
Lines 367-396
Link Here
|
367 |
|
364 |
|
368 |
# download the vendor information table |
365 |
# download the vendor information table |
369 |
dnvt: |
366 |
dnvt: |
370 |
@echo "" |
367 |
@echo "Use included oui.txt.gz" |
371 |
@echo "" |
|
|
372 |
@echo -n "Preparing " |
373 |
@if test -f oui.txt; then \ |
374 |
rm -rf oui.txt; \ |
375 |
fi |
376 |
@if test -f oui.txt.gz.old; then \ |
377 |
rm -rf oui.txt.gz.old; \ |
378 |
fi; |
379 |
@mv oui.txt.gz oui.txt.gz.old |
380 |
@echo "(old oui.txt.gz file is now oui.txt.gz.old)" |
381 |
@echo "" |
382 |
@wget -c http://standards.ieee.org/regauth/oui/oui.txt |
383 |
@gzip oui.txt |
384 |
@echo "" |
385 |
@echo "" |
386 |
@echo -n "Old file lines were: " |
387 |
@gunzip -c oui.txt.gz.old | wc -l |
388 |
@echo -n "New file lines are: " |
389 |
@gunzip -c oui.txt.gz | wc -l |
390 |
@echo "" |
391 |
@echo "" |
392 |
@echo "New file is:" |
393 |
@ls -l oui.txt.gz |
394 |
|
368 |
|
395 |
# download the Novell SAP Protocol information table |
369 |
# download the Novell SAP Protocol information table |
396 |
#dnsapt: |
370 |
#dnsapt: |
Lines 398-442
Link Here
|
398 |
|
372 |
|
399 |
# download the passive ethernet fingerprint database |
373 |
# download the passive ethernet fingerprint database |
400 |
dnetter: |
374 |
dnetter: |
401 |
@echo "" |
375 |
@echo "Use included $(ETTER_PASSIVE)" |
402 |
@echo "" |
|
|
403 |
@echo "Preparing " |
404 |
@echo "" |
405 |
|
406 |
@if test -f $(ETTER_PASSIVE).old; then \ |
407 |
echo "...Deleting prior file, $(ETTER_PASSIVE).old..."; \ |
408 |
rm -rf $(ETTER_PASSIVE).old; \ |
409 |
fi; |
410 |
@if test -f $(ETTER_PASSIVE); then \ |
411 |
echo "...Moving current $(ETTER_PASSIVE) to $(ETTER_PASSIVE).old"; \ |
412 |
mv $(ETTER_PASSIVE) $(ETTER_PASSIVE).old; \ |
413 |
fi; |
414 |
@for file in $(ETTER_PASSIVE) $(ETTER_PASSIVE).gz \ |
415 |
$(ETTER_PASSIVE_FILE) $(ETTER_PASSIVE_FILE).gz; do \ |
416 |
if test -f $$file; then \ |
417 |
echo "...Deleting prior file, $$file..."; \ |
418 |
rm -rf $$file; \ |
419 |
fi; \ |
420 |
done |
421 |
@echo "" |
422 |
@echo "...Downloading new file..." |
423 |
@wget -O $(ETTER_PASSIVE_FILE) \ |
424 |
$(ETTER_PASSIVE_DOWNLOAD_FROM)/$(ETTER_PASSIVE_FILE)?$(ETTER_PASSIVE_DOWNLOAD_PARMS) |
425 |
@echo "" |
426 |
@echo "gziping downloaded file..." |
427 |
@gzip $(ETTER_PASSIVE_FILE) |
428 |
@echo "" |
429 |
@echo "" |
430 |
@if test -f $(ETTER_PASSIVE).old; then \ |
431 |
echo -n "Old file lines were: "; \ |
432 |
gunzip -c $(ETTER_PASSIVE).old | wc -l; \ |
433 |
fi; |
434 |
@echo -n "New file lines are: " |
435 |
@gunzip -c $(ETTER_PASSIVE) | wc -l |
436 |
@echo "" |
437 |
@echo "" |
438 |
@echo "New file is:" |
439 |
@ls -l $(ETTER_PASSIVE) |
440 |
|
376 |
|
441 |
# ntop census |
377 |
# ntop census |
442 |
census-fail: |
378 |
census-fail: |
443 |
-- a/globals-core.c |
379 |
++ b/globals-core.c |
Lines 369-375
Link Here
|
369 |
_mtuSize[DLT_ATM_RFC1483] = 9180 /* LLC/SNAP encapsulated atm */; |
369 |
_mtuSize[DLT_ATM_RFC1483] = 9180 /* LLC/SNAP encapsulated atm */; |
370 |
_headerSize[DLT_ATM_RFC1483] = 0; |
370 |
_headerSize[DLT_ATM_RFC1483] = 0; |
371 |
|
371 |
|
372 |
/* _mtuSize[DLT_RAW] = ? raw IP */ |
372 |
_mtuSize[DLT_RAW] = 1500; /* raw IP */ |
373 |
_headerSize[DLT_RAW] = 0; |
373 |
_headerSize[DLT_RAW] = 0; |
374 |
|
374 |
|
375 |
/* Others defined in bpf.h at tcpdump.org as of the resync - it would be NICE |
375 |
/* Others defined in bpf.h at tcpdump.org as of the resync - it would be NICE |
Lines 470-488
Link Here
|
470 |
struct stat statbuf; |
470 |
struct stat statbuf; |
471 |
|
471 |
|
472 |
/* Initialize GeoIP databases */ |
472 |
/* Initialize GeoIP databases */ |
473 |
for(i=0; myGlobals.configFileDirs[i] != NULL; i++) { |
473 |
{ |
474 |
char path[256]; |
474 |
char path[256]; |
475 |
|
475 |
|
476 |
safe_snprintf(__FILE__, __LINE__, path, sizeof(path), |
476 |
safe_snprintf(__FILE__, __LINE__, path, sizeof(path), |
477 |
"%s%c%s", |
477 |
"%s%c%s", |
478 |
myGlobals.configFileDirs[i], |
478 |
myGlobals.dbPath, |
479 |
CONST_PATH_SEP, GEO_IP_FILE); |
479 |
CONST_PATH_SEP, GEO_IP_FILE); |
480 |
revertSlashIfWIN32(path, 0); |
480 |
revertSlashIfWIN32(path, 0); |
481 |
|
481 |
|
482 |
if(stat(path, &statbuf) == 0) { |
482 |
if(stat(path, &statbuf) == 0) { |
483 |
if((myGlobals.geo_ip_db = GeoIP_open(path, GEOIP_CHECK_CACHE)) != NULL) { |
483 |
if((myGlobals.geo_ip_db = GeoIP_open(path, GEOIP_CHECK_CACHE)) != NULL) { |
484 |
traceEvent(CONST_TRACE_INFO, "GeoIP: loaded config file %s", path); |
484 |
traceEvent(CONST_TRACE_INFO, "GeoIP: loaded config file %s", path); |
485 |
break; |
|
|
486 |
} |
485 |
} |
487 |
} |
486 |
} |
488 |
} |
487 |
} |
Lines 491-510
Link Here
|
491 |
traceEvent(CONST_TRACE_ERROR, "GeoIP: unable to load file %s", GEO_IP_FILE); |
490 |
traceEvent(CONST_TRACE_ERROR, "GeoIP: unable to load file %s", GEO_IP_FILE); |
492 |
|
491 |
|
493 |
/* *************************** */ |
492 |
/* *************************** */ |
494 |
|
493 |
{ |
495 |
for(i=0; myGlobals.configFileDirs[i] != NULL; i++) { |
|
|
496 |
char path[256]; |
494 |
char path[256]; |
497 |
|
495 |
|
498 |
safe_snprintf(__FILE__, __LINE__, path, sizeof(path), |
496 |
safe_snprintf(__FILE__, __LINE__, path, sizeof(path), |
499 |
"%s%c%s", |
497 |
"%s%c%s", |
500 |
myGlobals.configFileDirs[i], |
498 |
myGlobals.dbPath, |
501 |
CONST_PATH_SEP, GEO_IP_ASN_FILE); |
499 |
CONST_PATH_SEP, GEO_IP_ASN_FILE); |
502 |
revertSlashIfWIN32(path, 0); |
500 |
revertSlashIfWIN32(path, 0); |
503 |
|
501 |
|
504 |
if(stat(path, &statbuf) == 0) { |
502 |
if(stat(path, &statbuf) == 0) { |
505 |
if((myGlobals.geo_ip_asn_db = GeoIP_open(path, GEOIP_CHECK_CACHE)) != NULL) { |
503 |
if((myGlobals.geo_ip_asn_db = GeoIP_open(path, GEOIP_CHECK_CACHE)) != NULL) { |
506 |
traceEvent(CONST_TRACE_INFO, "GeoIP: loaded ASN config file %s", path); |
504 |
traceEvent(CONST_TRACE_INFO, "GeoIP: loaded ASN config file %s", path); |
507 |
break; |
|
|
508 |
} |
505 |
} |
509 |
} |
506 |
} |
510 |
} |
507 |
} |
511 |
-- a/report.c |
508 |
++ b/report.c |
Lines 2299-2305
Link Here
|
2299 |
if(fetchPrefsValue("dot.path", buf, sizeof(buf)) != -1) { |
2299 |
if(fetchPrefsValue("dot.path", buf, sizeof(buf)) != -1) { |
2300 |
snprintf(dotPath, sizeof(dotPath), "%s", buf); |
2300 |
snprintf(dotPath, sizeof(dotPath), "%s", buf); |
2301 |
} else { |
2301 |
} else { |
2302 |
snprintf(dotPath, sizeof(dotPath), "/usr/local/bin/dot"); |
2302 |
snprintf(dotPath, sizeof(dotPath), "/usr/bin/dot"); |
2303 |
storePrefsValue("dot.path", dotPath); /* Set the default */ |
2303 |
storePrefsValue("dot.path", dotPath); /* Set the default */ |
2304 |
} |
2304 |
} |
2305 |
|
2305 |
|