more refucktoring (into multiple modules)
[svn/Prometheus-QoS/.git] / parsehosts.c
index 2740c1c8c08d29936dcef4301abaa0572f85788b..db3bf2eb52f2003c647518487023cceb98d9d118 100644 (file)
@@ -14,9 +14,32 @@ extern int class_count;
 extern int ip_count;\r
 extern int found_lmsid;\r
 extern int free_min;\r
 extern int ip_count;\r
 extern int found_lmsid;\r
 extern int free_min;\r
+extern const int highest_priority;\r
 \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
 \r
 /* == This function strips extra characters after IPv4 address and stores it = */\r
 void parse_ip(char *str)\r
This page took 0.125362 seconds and 4 git commands to generate.