extern int ip_count;\r
extern int found_lmsid;\r
extern int free_min;\r
+extern const int highest_priority;\r
\r
-/* function implemented in prometheus.c */\r
-void TheIP(void);\r
+/* This must be object oriented! This looks almost like constructor ;-) */\r
+void TheIP(void)\r
+{\r
+ create(ip,IP);\r
+ ip->name = "";\r
+ ip->addr = "";\r
+ ip->sharing = NULL;\r
+ ip->prio = highest_priority+1;\r
+ ip->lmsid = -1;\r
+ ip->fixedprio = \\r
+ ip->mark = \\r
+ ip->min = \\r
+ ip->max = \\r
+ ip->desired = \\r
+ ip->credit = \\r
+ ip->upload = \\r
+ ip->proxy = \\r
+ ip->direct = \\r
+ ip->traffic = \\r
+ ip->pktsup = \\r
+ ip->pktsdown = 0;\r
+ ip->keyword = keywords;\r
+ push(ip,ips);\r
+}\r
\r
/* == This function strips extra characters after IPv4 address and stores it = */\r
void parse_ip(char *str)\r
} *idxs=NULL, *idx, *metaindex;\r
\r
\r
-/* Damned, this must be object oriented! This looks almost like constructor ;-) */\r
\r
-void TheIP(void)\r
-{\r
- create(ip,IP);\r
- ip->name = "";\r
- ip->addr = "";\r
- ip->sharing = NULL;\r
- ip->prio = highest_priority+1;\r
- ip->lmsid = -1;\r
- ip->fixedprio = \\r
- ip->mark = \\r
- ip->min = \\r
- ip->max = \\r
- ip->desired = \\r
- ip->credit = \\r
- ip->upload = \\r
- ip->proxy = \\r
- ip->direct = \\r
- ip->traffic = \\r
- ip->pktsup = \\r
- ip->pktsdown = 0;\r
- ip->keyword = keywords;\r
- push(ip,ips);\r
-}\r
+void TheIP(void);\r
+/* function implemented in parsehosts.c */\r
\r
/* ====== iptables indexes are used to reduce complexity to log8(N) ===== */\r
\r