+ load(qosfreeinterface, qosfreeinterfaces,\r
+ qosfreefile, QosFreeInterface, name);\r
+\r
+ /*-----------------------------------------------------------------*/\r
+ printf("Parsing macro definition file %s ...\n", macrosfile);\r
+ /*-----------------------------------------------------------------*/\r
+ parse(macrosfile)\r
+ {\r
+ ptr = parse_datafile_line(_);\r
+ if(ptr)\r
+ {\r
+ create(macro, Macro);\r
+ macro->rewrite_from = _;\r
+ macro->rewrite_to = ptr;\r
+ push(macro, macros);\r
+ printf("%s -> %s\n", macro->rewrite_from, macro->rewrite_to);\r
+ }\r
+ }\r
+ done; /* ugly macro end */\r
+\r
+\r
+\r
+ /*-----------------------------------------------------------------*/\r
+ printf("Parsing class defintion file %s ...\n", hosts);\r
+ /*-----------------------------------------------------------------*/\r
+ parse_hosts(hosts);\r
+\r
+#ifdef MONITORINGTRHU_CTU\r
+//special hack only to generate certain required CSV statistics for www.ctu.cz (regulation body)\r
+//not required for everyday use, requires special syntax sugar in hosts file, see parsehosts.c\r
+ for_each(technology, technologies)\r
+ {\r
+ char *filename;\r
+ FILE *f;\r
+ string(filename, strlen(log_dir) + strlen(technology->filename) + 5);\r
+ strcpy(filename, log_dir);\r
+ strcat(filename, technology->filename); \r
+ strcat(filename, ".csv");\r
+ /*-----------------------------------------------------------------*/\r
+ printf("Writing report file %s ...\n", filename);\r
+ /*-----------------------------------------------------------------*/\r
+ f = fopen(filename, "w");\r
+ if(f)\r
+ {\r
+ for_each(ip, ips) if(eq(technology->filename, ip->technology_str))\r
+ {\r
+ fprintf(f,"%s,%s,%d\n", ip->code, ip->ruian_id_str, ip->max);\r
+ }\r
+ fclose(f);\r
+ }\r
+ else\r
+ perror(filename); \r
+ } \r
+#endif\r