digital-divide, total avg.speed was nonsense
[svn/Prometheus-QoS/.git] / parsehosts.c
index 27d378e9a9fa81b8e8f4d0c4ddc054327ed438fe..47b06bd5c28925d6495e7ddf20ca6065311a98e4 100644 (file)
@@ -25,27 +25,30 @@ void update_network(char *look_for, struct IP* ip);
 void TheIP(char *ipaddr, int is_network)\r
 {\r
  create(ip,IP);\r
- ip->name        = "";\r
- ip->addr        = ipaddr;\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->pps_limit   = \\r
- ip->pktsdown    = 0;\r
- ip->keyword     = keywords;\r
- ip->v6          = (strchr(ip->addr,':')!=NULL);\r
- ip->mask        = ((ip->v6)?64:32);\r
+ ip->name         = "";\r
+ ip->addr         = ipaddr;\r
+ ip->sharing      = NULL;\r
+ ip->prio         = highest_priority+1;\r
+ ip->lmsid        = -1;\r
+ ip->fixedprio    = \\r
+ ip->aggregated   = \\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->traffic_down = \\r
+ ip->traffic_up   = \\r
+ ip->pktsup       = \\r
+ ip->pps_limit    = \\r
+ ip->pktsdown     = 0;\r
+ ip->keyword      = keywords;\r
+ ip->v6           = (strchr(ip->addr,':')!=NULL);\r
+ ip->mask         = ((ip->v6)?64:32);\r
  if(is_network)\r
  {\r
   push(ip, networks);\r
@@ -126,7 +129,7 @@ void parse_and_append_ip(char *str, struct IP *listhead)
  {\r
   concatenate(ip6prefix,ip6range,ptr);\r
   ip6range=ptr;\r
-  if_exists(ip, ips, eq(ip->addr,ip6range));\r
+  if_exists(ip, ips, eq(ip->addr,ip6range)); /* check - allocated range must be unique */\r
   else\r
   {\r
    TheIP(ip6range, FALSE);\r
@@ -149,11 +152,7 @@ void parse_and_append_ip(char *str, struct IP *listhead)
  {\r
   concatenate(ip6prefix,ip6uplink,ptr);\r
   ip6uplink=ptr;\r
-  if_exists(ip, ips, eq(ip->addr,ip6uplink));\r
-  else\r
-  {\r
-   TheIP(ip6uplink, FALSE);\r
-  }\r
+  TheIP(ip6uplink, FALSE); /* always new IP - more IPs in single uplink network */\r
   ip->name = ip6uplink;\r
   ip->keyword = defaultkeyword; /* settings for default keyword */\r
   if(lmsid)\r
This page took 0.163541 seconds and 4 git commands to generate.