+int filter_type = 1; /*1 mark, 2 classify*/\r
+char *final_chain = "DROP"; /* REJECT would be better, but it is impossible in mangle */\r
+char *mark = "MARK";\r
+char *mark_iptables = "MARK --set-mark ";\r
+int dry_run = FALSE; /* preview commands - use puts() instead of system() */\r
+int skip_stats = FALSE; /* skip generating statistics */\r
+char *iptablespreamble = "*mangle\n:PREROUTING ACCEPT [0:0]\n:POSTROUTING ACCEPT [0:0]\n:INPUT ACCEPT [0:0]\n:OUTPUT ACCEPT [0:0]\n:FORWARD ACCEPT [0:0]";\r
+char *ip6preamble = "-A FORWARD -p ipv6-icmp -j ACCEPT\n-A POSTROUTING -p ipv6-icmp -j ACCEPT\n-A FORWARD -s fe80::/10 -j ACCEPT\n-A FORWARD -d ff00::/8 -j ACCEPT\n-A POSTROUTING -s fe80::/10 -j ACCEPT\n-A POSTROUTING -d ff00::/8 -j ACCEPT";\r
+FILE *iptables_file = NULL;\r
+FILE *ip6tables_file = NULL;\r
+int enable_credit = TRUE; /* enable credit file */\r
+int use_credit = FALSE; /* use credit file (if enabled)*/\r
+char *title = "Hall of Fame - Greatest Suckers"; /* hall of fame title */\r
+int hall_of_fame = TRUE; /* enable hall of fame */\r
+char *medium = "1000Mbit"; /* 10Mbit/100Mbit ethernet */\r
+//obsolete: char *lan = "eth0"; /* LAN interface */\r
+//obsolete: char *lan_medium = "1000Mbit"; /* 10Mbit/100Mbit ethernet */\r
+char *ip6prefix = NULL; /* Prefix for global /48 IPv6 subnet */\r
+char *qos_leaf = "sfq perturb 5"; /* leaf discipline */\r
+char *qos_free_zone = NULL; /* QoS free zone */\r
+char *qos_free_dst_ipset = NULL; /* QoS free zone - dst match ipset name, must be prepared outside prometheus */\r
+char *qos_free_src_ipset = NULL; /* QoS free zone - src match ipset name, must be prepared outside prometheus */\r
+/* int qos_proxy = TRUE; include proxy port to QoS */\r
+int found_code = FALSE; /* show links to users in LMS information system */\r
+int include_upload = TRUE; /* upload+download=total traffic */\r
+/* char *proxy_ip = "192.168.1.1/32"; our IP with proxy port */\r
+/* int proxy_port = 3128; proxy port number */\r
+//obsolete: long long int line = 1024; /* WAN/ISP download in kbps */\r
+//obsolete: long long int up = 1024; /* WAN/ISP upload in kbps */\r
+int free_min = 256; /* minimum guaranted bandwidth for all undefined hosts */\r
+int free_max = 512; /* maximum allowed bandwidth for all undefined hosts */\r
+int overlimit_min = 256; /* minimum guaranted bandwidth for all undefined hosts */\r
+int overlimit_max = 512; /* maximum allowed bandwidth for all undefined hosts */\r
+int qos_free_delay = 0; /* seconds to sleep before applying new QoS rules */\r
+int digital_divide = 2; /* controls digital divide weirdness ratio, 1...3 */ \r
+int max_nesting = 5; /* /include/uapi/linux/pkt_sched.h: #define TC_HTB_MAXDEPTH 8 [... - 3 parent classes] */\r
+//obsolete: int htb_r2q = 256; /* should work for leaf values 512 kbps to 8 Mbps */\r
+int htb_quantum = 1514; /* MTU + ethernet header */\r
+int burst = 8; /* HTB burst (in kbits) */\r
+int burst_main = 64;\r
+int burst_group = 32;\r
+int magic_treshold = 8; /* reduce ceil by X*magic_treshhold kbps (hard shaping) */\r
+int keywordcount = 0;\r
+int class_count = 0;\r
+int ip_count = 0;\r
+FILE *log_file = NULL;\r
+char *kwd = "via-prometheus"; /* /etc/hosts comment, eg. #qos-64-128 */\r
+\r
+const int highest_priority = 0; /* highest HTB priority (HTB built-in value is 0) */\r
+const int lowest_priority = 7; /* lowest HTB priority /include/uapi/linux/pkt_sched.h: #define TC_HTB_NUMPRIO 8 */\r
+const int idxtable_treshold1 = 24; /* this is no longer configurable */\r
+const int idxtable_treshold2 = 12; /* this is no longer configurable */\r
+const int idxtable_bitmask1 = 3; /* this is no longer configurable */\r
+const int idxtable_bitmask2 = 3; /* this is no longer configurable */\r
+\r
+struct IP *ips = NULL, *networks = NULL, *ip, *sharedip;\r
+struct Group *groups = NULL, *group;\r
+struct Keyword *keyword, *defaultkeyword=NULL, *keywords = NULL;\r
+struct Macro *macro, *macros = NULL;\r
+struct Index *idxs = NULL, *idx, *metaindex;\r
+struct Interface *interfaces = NULL, *interface;\r
+struct QosFreeInterface *qosfreeinterfaces = NULL, *qosfreeinterface;\r
+\r
+#define FREE_CLASS 3\r
+#define OVERLIMIT_CLASS 4\r
+\r
+void help(void);\r
+/* implemented in help.c */
+\r
+void get_traffic_statistics(const char *whichiptables, int ipv6);\r
+/* implemented in parseiptables.c */\r
+\r
+void parse_ip_log(int argc, char **argv);\r
+/* implemented in parselog.c */\r
+\r
+void parse_hosts(char *hosts);\r
+/* implemented in parsehosts.c */\r
+\r
+void write_json_traffic(char *json);\r
+/* implemented in json.c */\r
+\r
+void write_htmlandlogs(char *html, char *d, int total, int just_preview);\r
+/* implemented in htmlandlogs.c */\r
+\r
+void analyse_topology(char *traceroute);\r
+/* implemented in networks.c */\r
+\r
+char *parse_datafile_line(char *str);\r
+/* implemented in utils.c */\r
+\r
+time_t get_mtime(const char *path);\r
+/* implemented in utils.c */\r
+\r
+const char *tr_odd_even(void)\r