~ubuntu-branches/ubuntu/trusty/ntop/trusty

« back to all changes in this revision

Viewing changes to globals-defines.h

  • Committer: Bazaar Package Importer
  • Author(s): Ola Lundqvist
  • Date: 2008-06-15 14:38:28 UTC
  • mfrom: (2.1.11 intrepid)
  • Revision ID: james.westby@ubuntu.com-20080615143828-oalh84nda2hje4do
Tags: 3:3.3-11
Correction of Polish translation encoding, closes: #479490. Thanks
to Christian Perrier <bubulle@debian.org> for the help.

Show diffs side-by-side

added added

removed removed

Lines of Context:
2
2
 * -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
3
3
 *                          http://www.ntop.org
4
4
 *
5
 
 * Copyright (C) 1998-2005 Luca Deri <deri@ntop.org>
 
5
 * Copyright (C) 1998-2007 Luca Deri <deri@ntop.org>
6
6
 *
7
7
 * -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
8
8
 *
171
171
#define PARM_PASSIVE_SESSION_MINIMUM_IDLE   60
172
172
 
173
173
/*
 
174
 *  How long an idle AS entry can last (sec)
 
175
 *  NOTE: it should be longer than the default RRD time
 
176
 */
 
177
#define PARM_AS_MAXIMUM_IDLE   360
 
178
 
 
179
/*
174
180
 *  How long to leave somebody in myGlobals.weDontWantToTalkWithYou[]
175
181
 */
176
182
#define PARM_WEDONTWANTTOTALKWITHYOU_INTERVAL 5*60     /* 5 minutes */
263
269
#endif
264
270
 
265
271
/*
266
 
 * MAKE_WITH_MALLINFO is shorthand
267
 
 */
268
 
#if defined(HAVE_MALLINFO_MALLOC_H) && defined(HAVE_MALLOC_H) && defined(__GNUC__)
269
 
 #define MAKE_WITH_MALLINFO
270
 
#endif
271
 
 
272
 
/*
273
272
 * This flag indicates that fork() is implemented with copy-on-write.
274
273
 * This means that the set of tables reported on in fork()ed processes
275
274
 * will be complete and unchanged as of the instant of the fork.
400
399
 */
401
400
/* #define I18N_DEBUG */
402
401
 
 
402
/* LATENCY_DEBUG logs the acquisition of latency figures.
 
403
 */
 
404
/* #define LATENCY_DEBUG */
 
405
 
403
406
/* MEMORY_DEBUG selects among various options for debugging ntop's memory allocations
404
407
 * (look in leaks.c for most of this).
405
408
 *
607
610
 
608
611
 
609
612
/* Maximum number of queued addresses waiting to be resolved */
610
 
#define MAX_NUM_QUEUED_ADDRESSES          4096
 
613
#define MAX_NUM_QUEUED_ADDRESSES          16384
611
614
 
612
615
/*
613
616
 * Number of (optional) "AR - Address Resolution" threads,
616
619
 *  You might increase this if you have really slow dns resolution and are running
617
620
 *  asyncronously.
618
621
 */
619
 
#define MAX_NUM_DEQUEUE_THREADS             1
 
622
#define MAX_NUM_DEQUEUE_ADDRESS_THREADS             3
620
623
 
621
624
/* Hash size */
622
625
#define CONST_HASH_INITIAL_SIZE             32*1024
680
683
 */
681
684
#define CONST_LEGEND_BOX_SIZE               7
682
685
 
 
686
#define CONST_VLAN_COLUMN_SORT             20
 
687
 
683
688
/*
684
689
 * Max number of OS entries in the report
685
690
 */
931
936
#define CONST_DNSCACHE_PERMITTED_AGE        15*60
932
937
 
933
938
/*
934
 
 * Defines how long to sleep if there's no packet available and we are in
935
 
 * --set-pcap-nonblocking mode.
936
 
 *
937
 
 * If you are running in this mode and consistently losing packets, this
938
 
 * value needs tweaking.
939
 
 *
940
 
 * There's no good data to understand the 'best' value.  The value is a
941
 
 * tradeoff - the lower the number the more frequently we wake up and thus
942
 
 * the more cpu used. (Zero would turn this into a continuous poll and peg
943
 
 * the cpu usage at 100%).
944
 
 *
945
 
 * Higher values mean that more packets could come in during the sleep interval.
946
 
 *
947
 
 * The 'default' value of 0.03s (30,000,000 ns) means that - worst case
948
 
 * (the packets begin to arrive just as ntop goes to sleep) -there could
949
 
 * be around 50 packets for 10BaseT, 500 for 100BaseT at wakeup.
950
 
 * ntop SHOULD be able to handle this.
951
 
 *
952
 
 * Value is in nanoseconds (10^-9) so 1,000,000,000 = 1s
953
 
 */
954
 
#define CONST_PCAPNONBLOCKING_SLEEP_TIME    30000000
955
 
 
956
 
/*
957
939
 * Interval to run the (background) fingerprint lookup scan
958
940
 */
959
941
#define CONST_FINGERPRINT_LOOP_INTERVAL     150 /* 2.5m */
1134
1116
#define CONST_ADD_URLS_HTML                 "addURLs.html"
1135
1117
#define CONST_ADD_USERS_HTML                "addUsers.html"
1136
1118
#define CONST_BAR_ALLPROTO_DIST             "allProtoDistribution"
1137
 
#define CONST_AS_LIST_HTML                  "asList.html"
1138
1119
#define CONST_CHANGE_FILTER_HTML            "changeFilter.html"
1139
1120
#define CONST_CREDITS_HTML                  "Credits.html"
1140
1121
#define CONST_SORT_DATA_HOST_TRAFFIC_HTML   "dataHostTraffic.html"
1164
1145
#define CONST_FC_THPT_HTML                  "fcThpt.html"
1165
1146
#define CONST_FC_SESSIONS_HTML              "FcSessions.html"
1166
1147
#define CONST_FILTER_INFO_HTML              "filterInfo.html"
 
1148
#define CONST_IF_STATS_HTML                 "ifStats.html"
1167
1149
#define CONST_NTOP_HELP_HTML                "help.html"
1168
1150
#define CONST_HOME_HTML                     "home.html"
1169
1151
#define CONST_HOME_UNDERSCORE_HTML          "home_.html"
1202
1184
#define CONST_MAN_NTOP_HTML                 "ntop.html"
1203
1185
#define CONST_NTOP_P3P                      "ntop.p3p"
1204
1186
#define CONST_PROBLEMRPT_HTML               "ntopProblemReport.html"
 
1187
#define CONST_EDIT_IMG                      "edit.gif"
1205
1188
#define CONST_NETWORK_MAP_HTML              "networkMap.html"
1206
1189
#define CONST_NETWORK_IMAGE_MAP             "network_map.png"
1207
1190
#define CONST_PIE_PKT_CAST_DIST             "pktCastDistribPie"
1230
1213
#define CONST_SORT_DATA_THPT_HTML           "sortDataThpt.html"
1231
1214
#define CONST_SWITCH_NIC_HTML               "switch.html"
1232
1215
#define CONST_TEXT_INFO_NTOP_HTML           "textinfo.html"
1233
 
#define CONST_THROUGHPUT_GRAPH              "thptGraph"
1234
1216
#define CONST_SORT_DATA_THPT_STATS_HTML     "thptStats.html"
1235
1217
#define CONST_THPT_STATS_MATRIX_HTML        "thptStatsMatrix.html"
1236
1218
#define CONST_TRAFFIC_STATS_HTML            "trafficStats.html"
1243
1225
#define CONST_BAR_VSAN_TRAF_DIST_SENT       "vsanDomainTrafficDistribSent"
1244
1226
#define CONST_BAR_VSAN_TRAF_DIST_RCVD       "vsanDomainTrafficDistribRcvd"
1245
1227
#define CONST_VSAN_LIST_HTML                "vsanList.html"
 
1228
#define CONST_FIND_HOST_JSON                "findHost.json"
1246
1229
#define CONST_W3C_P3P_XML                   "w3c/p3p.xml"
1247
1230
#define CONST_XMLDUMP_PLUGIN_NAME           "xmldump"
1248
1231
 
1257
1240
/*
1258
1241
 * Prevent harvesting...
1259
1242
 */
1260
 
#define CONST_MAILTO_LIST                   "<a href=\"mailto:&#110;&#116;&#111;&#112;&#064;&#110;&#116;&#111;&#112;&#046;&#111;&#114;&#103;\" title=\"Send email to ntop mailing list\">mailing list</a>"
1261
 
#define CONST_MAILTO_LUCA                   "<a href=\"mailto:&#100;&#101;&#114;&#105;&#064;&#110;&#116;&#111;&#112;&#046;&#111;&#114;&#103;\" title=\"Send email to Luca Deri\">Luca Deri</a>"
1262
 
#define CONST_MAILTO_STEFANO                "<a href=\"mailto:&#115;&#116;&#101;&#102;&#097;&#110;&#111;&#064;&#110;&#116;&#111;&#112;&#046;&#111;&#114;&#103;\" title=\"Send email to Stefano Suin\">Stefano Suin</a>"
1263
 
#define CONST_MAILTO_ABDELKADER             "<a href=\"mailto:&#097;&#098;&#100;&#101;&#108;&#107;&#097;&#100;&#101;&#114;&#046;&#108;&#097;&#104;&#109;&#097;&#100;&#105;&#064;&#108;&#111;&#114;&#105;&#097;&#046;&#102;&#114;\" title=\"Send email to Abdelkader Lahmadi\">Abdelkader Lahmadi</a>"
1264
 
#define CONST_MAILTO_OLIVIER                "<a href=\"mailto:&#111;&#108;&#105;&#118;&#105;&#101;&#114;&#046;&#102;&#101;&#115;&#116;&#111;&#114;&#064;&#108;&#111;&#114;&#105;&#097;&#046;&#102;&#114;\" title=\"Send email to Olivier Festor\">Olivier Festor</a>"
1265
 
#define CONST_MAILTO_DINESH                 "<a href=\"mailto:&#100;&#100;&#117;&#116;&#116;&#064;&#099;&#105;&#115;&#099;&#111;&#046;&#099;&#111;&#109;\" title=\"Send email to Dinesh G. Dutt\">Dinesh G. Dutt</a>"
1266
 
#define CONST_MAILTO_BURTON                 "<a href=\"mailto:&#098;&#117;&#114;&#116;&#111;&#110;&#064;&#110;&#116;&#111;&#112;&#115;&#117;&#112;&#112;&#111;&#114;&#116;&#046;&#099;&#111;&#109;\" title=\"Send email to Burton Strauss\">Burton Strauss</a>"
 
1243
#define CONST_MAILTO_LIST                   "<a class=mailto href=\"mailto:&#110;&#116;&#111;&#112;&#064;&#110;&#116;&#111;&#112;&#046;&#111;&#114;&#103;\" title=\"Send email to ntop mailing list\">mailing list</a>"
 
1244
#define CONST_MAILTO_LUCA                   "<a class=mailto href=\"mailto:&#100;&#101;&#114;&#105;&#064;&#110;&#116;&#111;&#112;&#046;&#111;&#114;&#103;\" title=\"Send email to Luca Deri\">Luca Deri</a>"
 
1245
#define CONST_MAILTO_STEFANO                "<a class=mailto href=\"mailto:&#115;&#116;&#101;&#102;&#097;&#110;&#111;&#064;&#110;&#116;&#111;&#112;&#046;&#111;&#114;&#103;\" title=\"Send email to Stefano Suin\">Stefano Suin</a>"
 
1246
#define CONST_MAILTO_ABDELKADER             "<a class=mailto href=\"mailto:&#097;&#098;&#100;&#101;&#108;&#107;&#097;&#100;&#101;&#114;&#046;&#108;&#097;&#104;&#109;&#097;&#100;&#105;&#064;&#108;&#111;&#114;&#105;&#097;&#046;&#102;&#114;\" title=\"Send email to Abdelkader Lahmadi\">Abdelkader Lahmadi</a>"
 
1247
#define CONST_MAILTO_OLIVIER                "<a class=mailto href=\"mailto:&#111;&#108;&#105;&#118;&#105;&#101;&#114;&#046;&#102;&#101;&#115;&#116;&#111;&#114;&#064;&#108;&#111;&#114;&#105;&#097;&#046;&#102;&#114;\" title=\"Send email to Olivier Festor\">Olivier Festor</a>"
 
1248
#define CONST_MAILTO_DINESH                 "<a class=mailto href=\"mailto:&#100;&#100;&#117;&#116;&#116;&#064;&#099;&#105;&#115;&#099;&#111;&#046;&#099;&#111;&#109;\" title=\"Send email to Dinesh G. Dutt\">Dinesh G. Dutt</a>"
 
1249
#define CONST_MAILTO_BURTON                 "<a class=mailto href=\"mailto:&#098;&#117;&#114;&#116;&#111;&#110;&#064;&#110;&#116;&#111;&#112;&#115;&#117;&#112;&#112;&#111;&#114;&#116;&#046;&#099;&#111;&#109;\" title=\"Send email to Burton Strauss\">Burton Strauss</a>"
1267
1250
 
1268
1251
 
1269
1252
/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
1360
1343
#define CONST_HANDLEADDRESSLISTS_RRD        1
1361
1344
#define CONST_HANDLEADDRESSLISTS_NETFLOW    2
1362
1345
#define CONST_HANDLEADDRESSLISTS_CLUSTERS   3
 
1346
#define CONST_HANDLEADDRESSLISTS_COMMUNITY  4
1363
1347
 
1364
1348
/*
1365
1349
 * Protocol types
1488
1472
#define CONST_NETWORK_ENTRY                 0
1489
1473
#define CONST_NETMASK_ENTRY                 1
1490
1474
#define CONST_BROADCAST_ENTRY               2
 
1475
#define CONST_NETMASK_V6_ENTRY              3
1491
1476
#define CONST_INVALIDNETMASK                -1
1492
1477
 
1493
1478
/*
1632
1617
/*
1633
1618
 * html img tags for various devices
1634
1619
 */
1635
 
#define CONST_IMG_FIBRECHANNEL_SWITCH  "<img src=\"/switch.gif\" border=\"0\" alt=\"FibreChannel Switch\" title=\"FibreChannel Switch\">"
1636
 
#define CONST_IMG_DHCP_CLIENT          "<img src=\"/bulb.gif\" border=\"0\" alt=\"DHCP Client\" title=\"DHCP Client\">"
1637
 
#define CONST_IMG_DHCP_SERVER          "<img src=\"/antenna.gif\" border=\"0\" alt=\"DHCP Server\" title=\"DHCP Server\">"
1638
 
#define CONST_IMG_MULTIHOMED           "<img src=\"/multihomed.gif\" border=\"0\" alt=\"Multihomed\" title=\"Multihomed\">"
1639
 
#define CONST_IMG_MULTIVLANED          "<img src=\"/multivlaned.gif\"\" border=\"0\" alt=\"Multivlaned\" title=\"Multivlaned\">"
1640
 
#define CONST_IMG_BRIDGE               "<img src=\"/bridge.gif\" border=\"0\" alt=\"Bridge\" title=\"Bridge\">"
1641
 
#define CONST_IMG_ROUTER               "<img src=\"/router.gif\" border=\"0\" alt=\"Router\" title=\"Router\">"
1642
 
#define CONST_IMG_DNS_SERVER           "<img src=\"/dns.gif\" border=\"0\" alt=\"DNS\" title=\"DNS\">"
1643
 
#define CONST_IMG_PRINTER              "<img src=\"/printer.gif\" border=\"0\" alt=\"Printer\" title=\"Printer\">"
1644
 
#define CONST_IMG_SMTP_SERVER          "<img src=\"/mail.gif\" border=\"0\" alt=\"Mail (SMTP)\" title=\"Mail (SMTP)\">"
 
1620
#define CONST_IMG_FIBRECHANNEL_SWITCH  "<img class=tooltip src=\"/switch.gif\" border=\"0\" alt=\"FibreChannel Switch\" title=\"FibreChannel Switch\">"
 
1621
#define CONST_IMG_DHCP_CLIENT          "<img class=tooltip src=\"/bulb.gif\" border=\"0\" alt=\"DHCP Client\" title=\"DHCP Client\">"
 
1622
#define CONST_IMG_DHCP_SERVER          "<img class=tooltip src=\"/antenna.gif\" border=\"0\" alt=\"DHCP Server\" title=\"DHCP Server\">"
 
1623
#define CONST_IMG_MULTIHOMED           "<img class=tooltip src=\"/multihomed.gif\" border=\"0\" alt=\"Multihomed\" title=\"Multihomed\">"
 
1624
#define CONST_IMG_MULTIVLANED          "<img class=tooltip src=\"/multivlaned.gif\"\" border=\"0\" alt=\"Multivlaned\" title=\"Multivlaned\">"
 
1625
#define CONST_IMG_BRIDGE               "<img class=tooltip src=\"/bridge.gif\" border=\"0\" alt=\"Bridge\" title=\"Bridge\">"
 
1626
#define CONST_IMG_ROUTER               "<img class=tooltip src=\"/router.gif\" border=\"0\" alt=\"Router\" title=\"Router\">"
 
1627
#define CONST_IMG_DNS_SERVER           "<img class=tooltip src=\"/dns.gif\" border=\"0\" alt=\"DNS\" title=\"DNS\">"
 
1628
#define CONST_IMG_PRINTER              "<img class=tooltip src=\"/printer.gif\" border=\"0\" alt=\"Printer\" title=\"Printer\">"
 
1629
#define CONST_IMG_SMTP_SERVER          "<img class=tooltip src=\"/mail.gif\" border=\"0\" alt=\"Mail (SMTP)\" title=\"Mail (SMTP)\">"
1645
1630
#define CONST_IMG_POP_SERVER           "" /* No icon, yet */
1646
1631
#define CONST_IMG_IMAP_SERVER          "" /* No icon, yet */
1647
1632
#define CONST_IMG_DIRECTORY_SERVER     "" /* No icon, yet */
1648
1633
#define CONST_IMG_FTP_SERVER           "" /* No icon, yet */
1649
 
#define CONST_IMG_VOIP_HOST             "<img src=\"/phone.gif\" border=\"0\" alt=\"VoIP\" title=\"VoIP\">"
1650
 
#define CONST_IMG_HTTP_SERVER          "<img src=\"/web.gif\" border=\"0\" alt=\"HTTP Server\" title=\"HTTP Server\">"
1651
 
#define CONST_IMG_NTP_SERVER           "<img src=\"/clock.gif\" border=\"0\" alt=\"NTP Server\" title=\"NTP Server\">"
1652
 
#define CONST_IMG_HAS_P2P              "<img src=\"/p2p.gif\" border=\"0\" alt=\"P2P Server\" title=\"P2P Server\">"
1653
 
#define CONST_IMG_HAS_USERS            "<img src=\"/users.gif\" border=\"0\" alt=\"Users\" title=\"Users\">"
1654
 
 
1655
 
#define CONST_IMG_HIGH_RISK            " <img src=\"/Risk_high.gif\" border=\"0\" alt=\"High Risk\" title=\"High Risk\">"
1656
 
#define CONST_IMG_MEDIUM_RISK          " <img src=\"/Risk_medium.gif\" border=\"0\" alt=\"Medium Risk\" title=\"Medium Risk\">"
1657
 
#define CONST_IMG_LOW_RISK             " <img src=\"/Risk_low.gif\" border=\"0\" alt=\"Low Risk\" title=\"Low Risk\">"
1658
 
 
1659
 
#define CONST_IMG_NIC_CARD             "<img src=\"/card.gif\" border=\"0\" alt=\"Network Card\" title=\"Network Card\">"
1660
 
 
1661
 
#define CONST_IMG_SCSI_INITIATOR       "<img src=\"/initiator.gif\" border=\"0\" alt=\"SCSI Initiator\" title=\"SCSI Initiator\">"
1662
 
#define CONST_IMG_SCSI_DISK            "<img src=\"/disk.gif\" border=\"0\" alt=\"SCSI Block Device (disk)\" title=\"SCSI Block Device (disk)\">"
1663
 
 
1664
 
#define CONST_IMG_FC_VEN_BROCADE       "<img src=\"/brocade.gif\" border=\"0\" alt=\"Brocade Communications Systems, Inc.\" title=\"Brocade Communications Systems, Inc.\">"
1665
 
#define CONST_IMG_FC_VEN_EMC           "<img src=\"/emc.gif\" border=\"0\" alt=\"EMC Corporation\" title=\"EMC Corporation\">"
1666
 
#define CONST_IMG_FC_VEN_EMULEX        "<img src=\"/emulex.gif\" border=\"0\" alt=\"Emulex Corporation\" title=\"Emulex Corporation\">"
1667
 
#define CONST_IMG_FC_VEN_JNI           "<img src=\"/jni.gif\" border=\"0\" alt=\"JNI Corporation\" title=\"JNI Corporation\">"
1668
 
#define CONST_IMG_FC_VEN_SEAGATE       "<img src=\"/seagate.gif\" border=\"0\" alt=\"Seagate Technology\" title=\"Seagate Technology\">"
1669
 
 
1670
 
#define CONST_IMG_ARROW_UP             "<img src=\"/arrow_up.gif\" border=\"0\" alt=\"Ascending order, click to reverse\" title=\"Ascending order, click to reverse\">"
1671
 
#define CONST_IMG_ARROW_DOWN           "<img src=\"/arrow_down.gif\" border=\"0\" alt=\"Descending order, click to reverse\" title=\"Descending order, click to reverse\">"
1672
 
 
1673
 
#define CONST_IMG_OS_WINDOWS           "<img alt=\"OS: Windows\" title=\"OS: Windows\" align=\"middle\" src=\"/statsicons/os/windows.gif\">"
1674
 
#define CONST_IMG_OS_IRIX              "<img alt=\"OS: Irix\" title=\"OS: Irix\" align=\"middle\" src=\"/statsicons/os/irix.gif\">"
1675
 
#define CONST_IMG_OS_LINUX             "<img alt=\"OS: Linux\" title=\"OS: Linux\" align=\"middle\" src=\"/statsicons/os/linux.gif\">"
1676
 
#define CONST_IMG_OS_SUNOS             "<img alt=\"OS: SunOS\" title=\"OS: SunOS\" align=\"middle\" src=\"/statsicons/os/sun.gif\">"
1677
 
#define CONST_IMG_OS_SOLARIS           "<img alt=\"OS: Solaris\" title=\"OS: Solaris\" align=\"middle\" src=\"/statsicons/os/sun.gif\">"
1678
 
#define CONST_IMG_OS_HP_JETDIRET       "<img alt=\"OS: HP/JetDirect\" title=\"OS: HP/JetDirect\" align=\"middle\" src=\"/statsicons/os/hp.gif\">"
1679
 
#define CONST_IMG_OS_MAC               "<img alt=\"OS: Apple Mac\" title=\"OS: Apple Mac\" align=\"middle\" src=\"/statsicons/os/mac.gif\">"
1680
 
#define CONST_IMG_OS_NOVELL            "<img alt=\"OS: Novell\" title=\"OS: Novell\" align=\"middle\" src=\"/statsicons/os/novell.gif\">"
1681
 
#define CONST_IMG_OS_BSD               "<img alt=\"OS: BSD Unix\" title=\"OS: BSD Unix\" align=\"middle\" src=\"/statsicons/os/bsd.gif\">"
1682
 
#define CONST_IMG_OS_UNIX              "<img alt=\"OS: BSD Unix\" title=\"OS: BSD Unix\" align=\"middle\" src=\"/statsicons/os/bsd.gif\">"
1683
 
#define CONST_IMG_OS_BERKELEY          "<img alt=\"OS: BSD Unix\" title=\"OS: BSD Unix\" align=\"middle\" src=\"/statsicons/os/bsd.gif\">"
1684
 
#define CONST_IMG_OS_HP_UX             "<img alt=\"OS: HP-UX\" title=\"OS: HP-UX\" align=\"middle\" src=\"/statsicons/os/hp.gif\">"
1685
 
#define CONST_IMG_OS_AIX               "<img alt=\"OS: AIX\" title=\"OS: AIX\" align=\"middle\" src=\"/statsicons/os/aix.gif\">"
1686
 
#define CONST_IMG_OS_CISCO             "<img alt=\"OS: Cisco\" title=\"OS: Cisco\" align=\"middle\" src=\"/statsicons/os/cisco.gif\">"
 
1634
#define CONST_IMG_VOIP_HOST             "<img class=tooltip src=\"/phone.gif\" border=\"0\" alt=\"VoIP\" title=\"VoIP\">"
 
1635
#define CONST_IMG_HTTP_SERVER          "<img class=tooltip src=\"/web.gif\" border=\"0\" alt=\"HTTP Server\" title=\"HTTP Server\">"
 
1636
#define CONST_IMG_NTP_SERVER           "<img class=tooltip src=\"/clock.gif\" border=\"0\" alt=\"NTP Server\" title=\"NTP Server\">"
 
1637
#define CONST_IMG_HAS_P2P              "<img class=tooltip src=\"/p2p.gif\" border=\"0\" alt=\"P2P Server\" title=\"P2P Server\">"
 
1638
#define CONST_IMG_HAS_USERS            "<img class=tooltip src=\"/users.gif\" border=\"0\" alt=\"Users\" title=\"Users\">"
 
1639
 
 
1640
#define CONST_IMG_HIGH_RISK            " <img class=tooltip src=\"/Risk_high.gif\" border=\"0\" alt=\"High Risk\" title=\"High Risk\">"
 
1641
#define CONST_IMG_MEDIUM_RISK          " <img class=tooltip src=\"/Risk_medium.gif\" border=\"0\" alt=\"Medium Risk\" title=\"Medium Risk\">"
 
1642
#define CONST_IMG_LOW_RISK             " <img class=tooltip src=\"/Risk_low.gif\" border=\"0\" alt=\"Low Risk\" title=\"Low Risk\">"
 
1643
 
 
1644
#define CONST_IMG_NIC_CARD             "<img class=tooltip src=\"/card.gif\" border=\"0\" alt=\"Network Card\" title=\"Network Card\">"
 
1645
 
 
1646
#define CONST_IMG_SCSI_INITIATOR       "<img class=tooltip src=\"/initiator.gif\" border=\"0\" alt=\"SCSI Initiator\" title=\"SCSI Initiator\">"
 
1647
#define CONST_IMG_SCSI_DISK            "<img class=tooltip src=\"/disk.gif\" border=\"0\" alt=\"SCSI Block Device (disk)\" title=\"SCSI Block Device (disk)\">"
 
1648
 
 
1649
#define CONST_IMG_FC_VEN_BROCADE       "<img class=tooltip src=\"/brocade.gif\" border=\"0\" alt=\"Brocade Communications Systems, Inc.\" title=\"Brocade Communications Systems, Inc.\">"
 
1650
#define CONST_IMG_FC_VEN_EMC           "<img class=tooltip src=\"/emc.gif\" border=\"0\" alt=\"EMC Corporation\" title=\"EMC Corporation\">"
 
1651
#define CONST_IMG_FC_VEN_EMULEX        "<img class=tooltip src=\"/emulex.gif\" border=\"0\" alt=\"Emulex Corporation\" title=\"Emulex Corporation\">"
 
1652
#define CONST_IMG_FC_VEN_JNI           "<img class=tooltip src=\"/jni.gif\" border=\"0\" alt=\"JNI Corporation\" title=\"JNI Corporation\">"
 
1653
#define CONST_IMG_FC_VEN_SEAGATE       "<img class=tooltip src=\"/seagate.gif\" border=\"0\" alt=\"Seagate Technology\" title=\"Seagate Technology\">"
 
1654
 
 
1655
#define CONST_IMG_ARROW_UP             "<img class=tooltip src=\"/arrow_up.gif\" border=\"0\" alt=\"Ascending order, click to reverse\" title=\"Ascending order, click to reverse\">"
 
1656
#define CONST_IMG_ARROW_DOWN           "<img class=tooltip src=\"/arrow_down.gif\" border=\"0\" alt=\"Descending order, click to reverse\" title=\"Descending order, click to reverse\">"
 
1657
 
 
1658
#define CONST_IMG_OS_WINDOWS           "<img class=tooltip alt=\"OS: Windows\" title=\"OS: Windows\" align=\"middle\" src=\"/statsicons/os/windows.gif\">"
 
1659
#define CONST_IMG_OS_IRIX              "<img class=tooltip alt=\"OS: Irix\" title=\"OS: Irix\" align=\"middle\" src=\"/statsicons/os/irix.gif\">"
 
1660
#define CONST_IMG_OS_LINUX             "<img class=tooltip alt=\"OS: Linux\" title=\"OS: Linux\" align=\"middle\" src=\"/statsicons/os/linux.gif\">"
 
1661
#define CONST_IMG_OS_SUNOS             "<img class=tooltip alt=\"OS: SunOS\" title=\"OS: SunOS\" align=\"middle\" src=\"/statsicons/os/sun.gif\">"
 
1662
#define CONST_IMG_OS_SOLARIS           "<img class=tooltip alt=\"OS: Solaris\" title=\"OS: Solaris\" align=\"middle\" src=\"/statsicons/os/sun.gif\">"
 
1663
#define CONST_IMG_OS_HP_JETDIRET       "<img class=tooltip alt=\"OS: HP/JetDirect\" title=\"OS: HP/JetDirect\" align=\"middle\" src=\"/statsicons/os/hp.gif\">"
 
1664
#define CONST_IMG_OS_MAC               "<img class=tooltip alt=\"OS: Apple Mac\" title=\"OS: Apple Mac\" align=\"middle\" src=\"/statsicons/os/mac.gif\">"
 
1665
#define CONST_IMG_OS_NOVELL            "<img class=tooltip alt=\"OS: Novell\" title=\"OS: Novell\" align=\"middle\" src=\"/statsicons/os/novell.gif\">"
 
1666
#define CONST_IMG_OS_BSD               "<img class=tooltip alt=\"OS: BSD Unix\" title=\"OS: BSD Unix\" align=\"middle\" src=\"/statsicons/os/bsd.gif\">"
 
1667
#define CONST_IMG_OS_UNIX              "<img class=tooltip alt=\"OS: BSD Unix\" title=\"OS: BSD Unix\" align=\"middle\" src=\"/statsicons/os/bsd.gif\">"
 
1668
#define CONST_IMG_OS_BERKELEY          "<img class=tooltip alt=\"OS: BSD Unix\" title=\"OS: BSD Unix\" align=\"middle\" src=\"/statsicons/os/bsd.gif\">"
 
1669
#define CONST_IMG_OS_HP_UX             "<img class=tooltip alt=\"OS: HP-UX\" title=\"OS: HP-UX\" align=\"middle\" src=\"/statsicons/os/hp.gif\">"
 
1670
#define CONST_IMG_OS_AIX               "<img class=tooltip alt=\"OS: AIX\" title=\"OS: AIX\" align=\"middle\" src=\"/statsicons/os/aix.gif\">"
 
1671
#define CONST_IMG_OS_CISCO             "<img class=tooltip alt=\"OS: Cisco\" title=\"OS: Cisco\" align=\"middle\" src=\"/statsicons/os/cisco.gif\">"
1687
1672
 
1688
1673
/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
1689
1674
/* F L A G  and  B I T F L A G  items                                              */
1735
1720
#define FLAG_SYSLOG_NONE                    -1
1736
1721
 
1737
1722
 
1738
 
#define MAX_VLAN 4096
1739
 
 
1740
1723
/*
1741
1724
 * Define for address resolution missing on Win32
1742
1725
 */
1764
1747
#define FLAG_HTTP_TYPE_JS                   8
1765
1748
#define FLAG_HTTP_TYPE_XML                  9
1766
1749
#define FLAG_HTTP_TYPE_P3P                  10
 
1750
#define FLAG_HTTP_TYPE_SVG                  11
 
1751
#define FLAG_HTTP_TYPE_JSON                 12
1767
1752
 
1768
1753
#define BITFLAG_HTTP_IS_CACHEABLE           (1<<0)
1769
1754
#define BITFLAG_HTTP_NO_CACHE_CONTROL       (1<<1)
2114
2099
 
2115
2100
/* -O and -P are special, see globals-core.h */
2116
2101
 
2117
 
#define DEFAULT_NTOP_MAPPER_URL             NULL     /* -U */
2118
 
 
2119
2102
#define DEFAULT_NTOP_MAX_HASH_ENTRIES       (u_int)8192  /* -x */
2120
2103
#define DEFAULT_NTOP_MAX_NUM_SESSIONS       (u_int)32768 /* -X */
2121
2104
 
 
2105
#define DEFAULT_NTOP_SQL_DB_CONFIG               "localhost:root:" /* MySQL */
 
2106
#define DEFAULT_NTOP_SQL_REC_DAYS_LIFETIME       7 /* days */
 
2107
#define DEFAULT_NTOP_SAVE_REC_INTO_DB            0 /* don't save data */
 
2108
#define DEFAULT_NTOP_SAVE_SESSIONS_INTO_DB       0 /* don't save data */
 
2109
 
2122
2110
/*
2123
2111
 * What should we set tracing to unless we have a parameter?
2124
2112
 */
2125
2113
#define DEFAULT_TRACE_LEVEL                 3
2126
2114
 
 
2115
#define DEFAULT_NTOP_MAPPER_URL             "http://www.ntop.org/cgi-bin/mapper.pl" /* -U -*/
 
2116
 
2127
2117
#ifdef MAKE_WITH_SCHED_YIELD
2128
2118
#define DEFAULT_NTOP_SCHED_YIELD            TRUE
2129
2119
#endif
2133
2123
#define DEFAULT_NTOP_P3PCP                  NULL
2134
2124
#define DEFAULT_NTOP_P3PURI                 NULL
2135
2125
#define DEFAULT_NTOP_DISABLE_STOPCAP        TRUE
2136
 
#define DEFAULT_NTOP_DISABLE_IS_PURGE       TRUE
 
2126
#define DEFAULT_NTOP_DISABLE_IS_PURGE       FALSE
2137
2127
#define DEFAULT_NTOP_PRINTIPONLY            FALSE
2138
2128
#define DEFAULT_NTOP_PRINTFCONLY            FALSE
2139
2129
#define DEFAULT_NTOP_NO_INVLUN_DISPLAY      FALSE
2207
2197
/*
2208
2198
 * img tag for lock (secure URL)
2209
2199
 */
2210
 
#define CONST_IMG_LOCK                 "<img src=\"/lock.png\" alt=\"secured URL\" title=\"secured URL\" border=\"0\">"
 
2200
#define CONST_IMG_LOCK                 "<img class=tooltip src=\"/lock.png\" alt=\"Secured URL\" title=\"Secured URL\" border=\"0\">"
2211
2201
 
2212
2202
/*
2213
2203
 * Password set message - long enough to be noticeable in the console output
2653
2643
 
2654
2644
/* ******************************** */
2655
2645
 
 
2646
#define NO_VLAN       (u_int16_t)-1
 
2647
#define MAX_VLAN      4096
 
2648
 
 
2649
#define NO_INTERFACE  (u_int16_t)-1
 
2650
#define MAX_INTERFACE (u_int16_t)-1
 
2651
 
 
2652
/* ******************************** */
 
2653
 
2656
2654
#ifndef HAVE_GETOPT_H
2657
2655
 #define no_argument                        0
2658
2656
 #define required_argument                  1
2686
2684
/* Other, OS specific stuff                                                        */
2687
2685
/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
2688
2686
 
 
2687
#ifndef WIN32
2689
2688
#ifndef HAVE_SQRTF
2690
2689
#define sqrtf(x) ((float)(sqrt((double)x)))
2691
2690
#endif
 
2691
#endif
2692
2692
 
2693
2693
/*
2694
2694
 * On FreeBSD gethostbyaddr() sometimes loops and uses all the available memory.
2806
2806
#define IP_TCP_PORT_SQUID          3128
2807
2807
 
2808
2808
#define IP_UDP_PORT_SIP            5060
 
2809
#define IP_UDP_PORT_IAX2           4569 /* Asterisk */
2809
2810
#define IP_TCP_PORT_GNUTELLA1      6346
2810
2811
#define IP_TCP_PORT_GNUTELLA2      6347
2811
2812
#define IP_TCP_PORT_GNUTELLA3      6348
2816
2817
#define NULL_VALUE                 "(null)"
2817
2818
 
2818
2819
/* NTOP preference names */
2819
 
#define NTOP_PREF_DEVICES          "ntop.devices"
2820
 
#define NTOP_PREF_CAPFILE          "ntop.rFileName"
2821
 
#define NTOP_PREF_FILTER           "ntop.currentFilterExpression"
2822
 
#define NTOP_PREF_SAMPLING         "ntop.sampleRate"
2823
 
#define NTOP_PREF_WEBPORT          "ntop.webPort"
2824
 
#define NTOP_PREF_SSLPORT          "ntop.sslPort"
2825
 
#define NTOP_PREF_EN_SESSION       "ntop.enableSessionHandling"
2826
 
#define NTOP_PREF_EN_PROTO_DECODE  "ntop.enablePacketDecoding"
2827
 
#define NTOP_PREF_FLOWSPECS        "ntop.flowSpecs"
2828
 
#define NTOP_PREF_LOCALADDR        "ntop.localAddresses"
2829
 
#define NTOP_PREF_SPOOLPATH        "ntop.spoolPath"
2830
 
#define NTOP_PREF_STICKY_HOSTS     "ntop.stickyHosts"
2831
 
#define NTOP_PREF_TRACK_LOCAL      "ntop.trackOnlyLocalHosts"
2832
 
#define NTOP_PREF_NO_PROMISC       "ntop.disablePromiscuousMode"
2833
 
#define NTOP_PREF_DAEMON           "ntop.daemonMode"
2834
 
#define NTOP_PREF_REFRESH_RATE     "ntop.refreshRate"
2835
 
#define NTOP_PREF_MAXLINES         "ntop.maxNumLines"
2836
 
#define NTOP_PREF_PRINT_FCORIP     "ntop.printFcOrIp"
2837
 
#define NTOP_PREF_NO_INVLUN        "ntop.noInvalidLunDisplay"
2838
 
#define NTOP_PREF_W3C              "ntop.w3c"
2839
 
#define NTOP_PREF_IPV4             "ntop.ipv4"
2840
 
#define NTOP_PREF_IPV6             "ntop.ipv6"
2841
 
#define NTOP_PREF_IPV4V6           "ntop.ipv4orv6"
2842
 
#define NTOP_PREF_DOMAINNAME       "ntop.domainName"
2843
 
#define NTOP_PREF_NUMERIC_IP       "ntop.numericFlag"
2844
 
#define NTOP_PREF_PROTOSPECS       "ntop.protoSpecs"
2845
 
#define NTOP_PREF_P3PCP            "ntop.P3Pcp"
2846
 
#define NTOP_PREF_P3PURI           "ntop.P3Puri"
2847
 
#define NTOP_PREF_MAPPERURL        "ntop.mapperURL"
2848
 
#define NTOP_PREF_WWN_MAP          "ntop.fcNSCacheFile"
2849
 
#define NTOP_PREF_MAXHASH          "ntop.maxNumHashEntries"
2850
 
#define NTOP_PREF_MAXSESSIONS      "ntop.maxNumSessions"
2851
 
#define NTOP_PREF_MERGEIF          "ntop.mergeInterfaces"
2852
 
#define NTOP_PREF_NO_ISESS_PURGE   "ntop.disableInstantSessionPurge"
2853
 
#define NTOP_PREF_NOBLOCK          "ntop.setNonBlocking"
2854
 
#define NTOP_PREF_NO_STOPCAP       "ntop.disableStopcap"
2855
 
#define NTOP_PREF_NO_TRUST_MAC     "ntop.dontTrustMACaddr"
2856
 
#define NTOP_PREF_PCAP_LOGBASE     "ntop.pcapLogBasePath"
2857
 
#define NTOP_PREF_USE_SSLWATCH     "ntop.useSSLwatchdog"
2858
 
#define NTOP_PREF_NO_SCHEDYLD      "ntop.schedYield"
2859
 
#define NTOP_PREF_DBG_MODE         "ntop.debugMode"
2860
 
#define NTOP_PREF_TRACE_LVL        "ntop.traceLevel"
2861
 
#define NTOP_PREF_DUMP_OTHER       "ntop.enableOtherPacketDump"
2862
 
#define NTOP_PREF_DUMP_SUSP        "ntop.enableSuspiciousPacketDump"
2863
 
#define NTOP_PREF_ACCESS_LOG       "ntop.accessLogFile"
2864
 
#define NTOP_PREF_USE_SYSLOG       "ntop.useSyslog"
2865
 
#define NTOP_PREF_PCAP_LOG         "ntop.pcapLog"
2866
 
#define NTOP_PREF_NO_MUTEX_EXTRA   "ntop.disableMutexExtraInfo"
 
2820
#define NTOP_PREF_DEVICES                "ntop.devices"
 
2821
#define NTOP_PREF_CAPFILE                "ntop.rFileName"
 
2822
#define NTOP_PREF_FILTER                 "ntop.currentFilterExpression"
 
2823
#define NTOP_PREF_SAMPLING               "ntop.sampleRate"
 
2824
#define NTOP_PREF_WEBPORT                "ntop.webPort"
 
2825
#define NTOP_PREF_SSLPORT                "ntop.sslPort"
 
2826
#define NTOP_PREF_EN_SESSION             "ntop.enableSessionHandling"
 
2827
#define NTOP_PREF_EN_PROTO_DECODE        "ntop.enablePacketDecoding"
 
2828
#define NTOP_PREF_FLOWSPECS              "ntop.flowSpecs"
 
2829
#define NTOP_PREF_LOCALADDR              "ntop.localAddresses"
 
2830
#define NTOP_PREF_SPOOLPATH              "ntop.spoolPath"
 
2831
#define NTOP_PREF_STICKY_HOSTS           "ntop.stickyHosts"
 
2832
#define NTOP_PREF_TRACK_LOCAL            "ntop.trackOnlyLocalHosts"
 
2833
#define NTOP_PREF_NO_PROMISC             "ntop.disablePromiscuousMode"
 
2834
#define NTOP_PREF_DAEMON                 "ntop.daemonMode"
 
2835
#define NTOP_PREF_REFRESH_RATE           "ntop.refreshRate"
 
2836
#define NTOP_PREF_MAXLINES               "ntop.maxNumLines"
 
2837
#define NTOP_PREF_PRINT_FCORIP           "ntop.printFcOrIp"
 
2838
#define NTOP_PREF_NO_INVLUN              "ntop.noInvalidLunDisplay"
 
2839
#define NTOP_PREF_W3C                    "ntop.w3c"
 
2840
#define NTOP_PREF_IPV4                   "ntop.ipv4"
 
2841
#define NTOP_PREF_IPV6                   "ntop.ipv6"
 
2842
#define NTOP_PREF_IPV4V6                 "ntop.ipv4orv6"
 
2843
#define NTOP_PREF_DOMAINNAME             "ntop.domainName"
 
2844
#define NTOP_PREF_NUMERIC_IP             "ntop.numericFlag"
 
2845
#define NTOP_PREF_PROTOSPECS             "ntop.protoSpecs"
 
2846
#define NTOP_PREF_P3PCP                  "ntop.P3Pcp"
 
2847
#define NTOP_PREF_P3PURI                 "ntop.P3Puri"
 
2848
#define NTOP_PREF_WWN_MAP                "ntop.fcNSCacheFile"
 
2849
#define NTOP_PREF_MAXHASH                "ntop.maxNumHashEntries"
 
2850
#define NTOP_PREF_SQL_DB_CONFIG          "ntop.sqlDbConfig"
 
2851
#define NTOP_PREF_SQL_REC_LIFETIME       "ntop.sqlRecDaysLifetime"
 
2852
#define NTOP_PREF_SAVE_REC_INTO_DB       "ntop.saveRecordsIntoDb"
 
2853
#define NTOP_PREF_SAVE_SESSIONS_INTO_DB  "ntop.saveSessionsIntoDb"
 
2854
#define NTOP_PREF_MAXSESSIONS            "ntop.maxNumSessions"
 
2855
#define NTOP_PREF_MERGEIF                "ntop.mergeInterfaces"
 
2856
#define NTOP_PREF_ENABLE_L7PROTO         "ntop.enableL7Proto"
 
2857
#define NTOP_PREF_NO_ISESS_PURGE         "ntop.disableInstantSessionPurge"
 
2858
#define NTOP_PREF_NO_TRUST_MAC           "ntop.dontTrustMACaddr"
 
2859
#define NTOP_PREF_PCAP_LOGBASE           "ntop.pcapLogBasePath"
 
2860
#define NTOP_PREF_USE_SSLWATCH           "ntop.useSSLwatchdog"
 
2861
#define NTOP_PREF_NO_SCHEDYLD            "ntop.schedYield"
 
2862
#define NTOP_PREF_DBG_MODE               "ntop.debugMode"
 
2863
#define NTOP_PREF_TRACE_LVL              "ntop.traceLevel"
 
2864
#define NTOP_PREF_DUMP_OTHER             "ntop.enableOtherPacketDump"
 
2865
#define NTOP_PREF_DUMP_SUSP              "ntop.enableSuspiciousPacketDump"
 
2866
#define NTOP_PREF_ACCESS_LOG             "ntop.accessLogFile"
 
2867
#define NTOP_PREF_USE_SYSLOG             "ntop.useSyslog"
 
2868
#define NTOP_PREF_PCAP_LOG               "ntop.pcapLog"
 
2869
#define NTOP_PREF_NO_MUTEX_EXTRA         "ntop.disableMutexExtraInfo"
2867
2870
 
2868
2871
/* Values for the preferences */
2869
2872
#define NTOP_PREF_VALUE_PRINT_IPONLY 1
2874
2877
#define NTOP_PREF_VALUE_AF_INET6     AF_INET6
2875
2878
#define NTOP_PREF_VALUE_AF_BOTH      AF_UNSPEC
2876
2879
 
 
2880
#define COMMUNITY_PREFIX             "community."