X-Git-Url: http://git.harvie.cz/?p=svn%2FPrometheus-QoS%2F.git;a=blobdiff_plain;f=parsehosts.c;h=db3bf2eb52f2003c647518487023cceb98d9d118;hp=2740c1c8c08d29936dcef4301abaa0572f85788b;hb=1ab008b9af1556f1bcba85b2d262fa83b617f01e;hpb=1c9cae56507516acf3eda8fcfe60a74bfe923ee4;ds=sidebyside diff --git a/parsehosts.c b/parsehosts.c index 2740c1c..db3bf2e 100644 --- a/parsehosts.c +++ b/parsehosts.c @@ -14,9 +14,32 @@ extern int class_count; extern int ip_count; extern int found_lmsid; extern int free_min; +extern const int highest_priority; -/* function implemented in prometheus.c */ -void TheIP(void); +/* This must be object oriented! This looks almost like constructor ;-) */ +void TheIP(void) +{ + create(ip,IP); + ip->name = ""; + ip->addr = ""; + ip->sharing = NULL; + ip->prio = highest_priority+1; + ip->lmsid = -1; + ip->fixedprio = \ + ip->mark = \ + ip->min = \ + ip->max = \ + ip->desired = \ + ip->credit = \ + ip->upload = \ + ip->proxy = \ + ip->direct = \ + ip->traffic = \ + ip->pktsup = \ + ip->pktsdown = 0; + ip->keyword = keywords; + push(ip,ips); +} /* == This function strips extra characters after IPv4 address and stores it = */ void parse_ip(char *str)