parsehosts.c = first step to independent hosts parser
authorxchaos <xchaos@251d49ef-1d17-4917-a970-b30cf55b089b>
Sun, 7 Oct 2012 20:10:45 +0000 (20:10 +0000)
committerxchaos <xchaos@251d49ef-1d17-4917-a970-b30cf55b089b>
Sun, 7 Oct 2012 20:10:45 +0000 (20:10 +0000)
git-svn-id: https://dev.arachne.cz/repos/prometheus/trunk@195 251d49ef-1d17-4917-a970-b30cf55b089b

Makefile
cll1-0.6.2.h
ipstruct.h [new file with mode: 0644]
parsehosts.c [new file with mode: 0644]
parselogs.c
prometheus.c

index ef902d65968108b43f065984fe26f87aa242b960..05d120be51d29048e01b4c6ada3a85c87510a702 100644 (file)
--- a/Makefile
+++ b/Makefile
@@ -7,7 +7,7 @@ sbindir=$(prefix)/sbin
 sysconfdir=/etc
 
 main: prometheus
 sysconfdir=/etc
 
 main: prometheus
-       $(CC) -o prometheus parselogs.c prometheus.c
+       $(CC) -o prometheus parsehosts.c parselogs.c prometheus.c
 
 deb: main
        debian/prometheus.debian
 
 deb: main
        debian/prometheus.debian
index 7c33ce8f3742dfae1fc31535c560a4dde87f3392..37a6ab5577819489bf4de80f9273ec02d3e435fd 100644 (file)
@@ -34,6 +34,8 @@
 /* Section For Dummies part 1, updated 2004-05-07 by xCh. */
 
 #define not !
 /* Section For Dummies part 1, updated 2004-05-07 by xCh. */
 
 #define not !
+#define and &&
+#define or &&
 #define TRUE 1
 #define FALSE 0
 #define loop while(1)
 #define TRUE 1
 #define FALSE 0
 #define loop while(1)
diff --git a/ipstruct.h b/ipstruct.h
new file mode 100644 (file)
index 0000000..2410047
--- /dev/null
@@ -0,0 +1,54 @@
+struct IP\r
+{\r
+ char *addr;\r
+ char *name;\r
+ char *sharing;\r
+ int min;\r
+ int desired;\r
+ int max;\r
+ int mark;\r
+ int prio;\r
+ int fixedprio;\r
+ int group;\r
+ int lmsid;\r
+ unsigned long long direct;\r
+ unsigned long long proxy;\r
+ unsigned long long upload;\r
+ unsigned long long traffic;\r
+ unsigned long long credit;\r
+ unsigned long pktsup;\r
+ unsigned long pktsdown;\r
+ struct Keyword *keyword;\r
+ list(IP);\r
+};\r
+\r
+struct Group\r
+{\r
+ int min;\r
+ int count;\r
+ int desired;\r
+ int id;\r
+ list(Group);\r
+};\r
+\r
+struct Keyword\r
+{\r
+ char *key;\r
\r
+ int asymetry_ratio;        /* ratio for ADSL-like upload */\r
+ int asymetry_fixed;        /* fixed treshold for ADSL-like upload */\r
+ int data_limit;            /* hard shaping: apply magic_treshold if max*data_limit MB exceeded */\r
+ int data_prio;             /* soft shaping (qos): reduce HTB prio if max*data_prio MB exceeded */\r
+ long fixed_limit;          /* fixed data limit for setting lower HTB ceil */\r
+ long fixed_prio;           /* fixed data lmit for setting lower HTB prio */\r
+ int reserve_min;          /* bonus for nominal HTB rate bandwidth (in kbps) */\r
+ int reserve_max;          /* malus for nominal HTB ceil (in kbps) */\r
+// int divide_max;         /* relative malus: new_ceil=rate+(old_ceil-rate)/divide_max */\r
+// int htb_ceil_bonus_divide; /* relative bonus: new_ceil=old_ceil+old_ceil/htb_ceil_bonus_divide */\r
+ int default_prio;         /* default HTB priority for this keyword */\r
+ char *html_color;\r
+ int ip_count;\r
+ char *leaf_discipline;\r
\r
+ list(Keyword);\r
+};\r
diff --git a/parsehosts.c b/parsehosts.c
new file mode 100644 (file)
index 0000000..2740c1c
--- /dev/null
@@ -0,0 +1,178 @@
+/* Modified by: xChaos, 20121007 */\r
+\r
+#include "cll1-0.6.2.h"\r
+#include "ipstruct.h"\r
+\r
+#define FIRSTGROUPID 1024\r
+#define FIRSTIPCLASS 2048\r
+\r
+/* globals declared in prometheus.c */\r
+extern struct IP *ips, *ip, *sharedip;\r
+extern struct Group *groups, *group;\r
+extern struct Keyword *keyword, *defaultkeyword, *keywords;\r
+extern int class_count;\r
+extern int ip_count;\r
+extern int found_lmsid;\r
+extern int free_min;\r
+\r
+/* function implemented in prometheus.c */\r
+void TheIP(void);\r
+\r
+/* == This function strips extra characters after IPv4 address and stores it = */\r
+void parse_ip(char *str)\r
+{\r
+ char *ptr, *ipaddr = NULL, *ipname = NULL, *lmsid = NULL;\r
+\r
+ ptr = strchr(str, '{');\r
+ if(ptr)\r
+ {\r
+  lmsid = ++ptr;\r
+  while(*ptr and *ptr != '}')\r
+  {\r
+   ptr++;\r
+  }\r
+  *ptr = 0;\r
+ }\r
\r
+ ptr = str;\r
+ while(*ptr and *ptr!=' ' and *ptr!=9)\r
+ {\r
+  ptr++;\r
+ }\r
\r
+ *ptr = 0;\r
+ ipaddr = str;\r
+ ptr++;\r
+ while(*ptr and (*ptr==' ' or *ptr==9))\r
+ {\r
+  ptr++;\r
+ }\r
+ ipname=ptr; \r
+ while(*ptr and *ptr!=' ' and *ptr!=9)\r
+ {\r
+  ptr++;\r
+ }\r
+ *ptr=0;\r
+\r
+ if_exists(ip, ips, eq(ip->addr,ipaddr));\r
+ else\r
+ {\r
+  TheIP();\r
+ }\r
+ ip->addr = ipaddr;\r
+ ip->name = ipname;\r
+ if(lmsid)\r
+ {\r
+  ip->lmsid = atoi(lmsid);\r
+  found_lmsid = TRUE;\r
+ }\r
+}\r
+\r
+/* == This function parses hosts style main configuration file == */\r
+void parse_hosts(char *hosts)\r
+{\r
+ int groupidx = FIRSTGROUPID;\r
+ char *str, *ptr;\r
+ char *substring;\r
+\r
+ parse(hosts)\r
+ {\r
+  str=_;\r
+\r
+  if(*str < '0' or *str > '9')\r
+  {\r
+   /* any line starting with non-number is comment ...*/\r
+   continue;\r
+  }\r
+  \r
+  /* Does this IP share QoS class with some other ? */\r
+  substring = strstr(str, "sharing-");\r
+  if(substring)\r
+  { \r
+   substring += 8; /* "sharing-" */\r
+   parse_ip(str);\r
+   ip_count++;\r
+   ip->sharing = substring;\r
+   ip->keyword = defaultkeyword; /* settings for default keyword */\r
+   while(*substring and *substring != '\n')\r
+   {\r
+    substring++;\r
+   }\r
+   *substring = 0; \r
+  }\r
+  else\r
+  {\r
+   /*Do we have to create new QoS class for this IP ? */\r
+\r
+   if_exists(keyword,keywords,(substring=strstr(str,keyword->key)))\r
+   {\r
+    parse_ip(str);\r
+    ip_count++;\r
+    ip->keyword = keyword;\r
+    keyword->ip_count++;\r
+    ip->prio = keyword->default_prio;\r
+    substring += strlen(keyword->key)+1;\r
+    ptr = substring;\r
+    while(*ptr and *ptr != '-')\r
+    {\r
+     ptr++;\r
+    }\r
+    if(*ptr == '-')\r
+    {\r
+     *ptr=0;\r
+     ip->max = ip->desired = atoi(ptr+1);\r
+    }\r
+    ip->min = atoi(substring);\r
+    if(ip->min <= 0)\r
+    {\r
+     printf(" %s: Illegal value of minimum bandwidth 0 kbps, using %d kb/s\n",\r
+            str, free_min);\r
+     ip->min = free_min;\r
+    }\r
+    if(ip->max <= ip->min)\r
+    {\r
+     ip->fixedprio = TRUE;\r
+     ip->max = ip->min + ip->keyword->reserve_min;\r
+    }\r
+    else \r
+    {\r
+     ip->max -= ip->keyword->reserve_max;\r
+     if(ip->max<ip->min)\r
+     {\r
+      ip->max=ip->min;\r
+     }\r
+    }\r
+    ip->mark = FIRSTIPCLASS+1+class_count++;\r
+\r
+    if_exists(group,groups,(group->min == ip->min)) \r
+    { \r
+     group->count++;      \r
+     group->desired += ip->min;\r
+     ip->group = group->id;   \r
+    }\r
+    else\r
+    {\r
+     create(group,Group);\r
+     group->min = ip->min;\r
+     group->id = groupidx++;\r
+     ip->group = group->id;\r
+\r
+     if(group->min < 8) group->min = 8;\r
+     /* Warning - this is maybe because of primitive tc namespace, can be fixed */\r
+     /* it is because class IDs are derived from min. bandwidth. - xCh */\r
+     //if(group->min>MAX_GUARANTED_KBPS) group->min=MAX_GUARANTED_KBPS;\r
+     \r
+     group->count = 1;\r
+     group->desired = ip->min;   \r
+     insert(group, groups, desc_order_by,min);\r
+    }\r
+   }//endif keyword-\r
+  }//endif sharing-\r
+ }\r
+ fail\r
+ {\r
+  perror(hosts);\r
+  exit(-1);\r
+ }\r
+ done; /* ugly macro end */\r
+}
\ No newline at end of file
index 6d92680c66e2377bb07cb38906033bce0f178c7a..a5c2acfdced78d0e6dc991456ebb9ff6601574d9 100644 (file)
@@ -1,6 +1,7 @@
 #include "cll1-0.6.2.h"\r
 #define STRLEN 512\r
 \r
 #include "cll1-0.6.2.h"\r
 #define STRLEN 512\r
 \r
+/* globals declared in prometheus.c */\r
 extern char *log_dir;\r
 extern const char *version;\r
 extern const char *stats_html_signature;\r
 extern char *log_dir;\r
 extern const char *version;\r
 extern const char *stats_html_signature;\r
@@ -11,8 +12,8 @@ extern char *log_url;
 extern char *lms_url;\r
 extern long long int line;\r
 \r
 extern char *lms_url;\r
 extern long long int line;\r
 \r
+/* function implemented in prometheus.c */\r
 const char *tr_odd_even(void);\r
 const char *tr_odd_even(void);\r
-/* implemented in prometheus.c */\r
 \r
 struct IpLog\r
 {\r
 \r
 struct IpLog\r
 {\r
index 64012559235dc72987d087318984737e747a92bf..07980f637bfbd4a3762065dc7e3b812b974678f6 100644 (file)
@@ -7,7 +7,7 @@
 /*  Credit: CZFree.Net,Martin Devera,Netdave,Aquarius,Gandalf  */\r
 /* - - - - - - - - - - - - - - - - - - - - - - - - - - - - -  */\r
 \r
 /*  Credit: CZFree.Net,Martin Devera,Netdave,Aquarius,Gandalf  */\r
 /* - - - - - - - - - - - - - - - - - - - - - - - - - - - - -  */\r
 \r
-/* Modified by: xChaos, 20120612\r
+/* Modified by: xChaos, 20121007\r
                  ludva, 20080415\r
  \r
    Prometheus QoS is free software; you can redistribute it and/or\r
                  ludva, 20080415\r
  \r
    Prometheus QoS is free software; you can redistribute it and/or\r
    GNU General Public License is located in file COPYING */\r
 \r
 #define STRLEN 512\r
    GNU General Public License is located in file COPYING */\r
 \r
 #define STRLEN 512\r
-#define FIRSTGROUPID 1024\r
-#define FIRSTIPCLASS 2048\r
 #undef DEBUG\r
 \r
 #include "cll1-0.6.2.h"\r
 #undef DEBUG\r
 \r
 #include "cll1-0.6.2.h"\r
+#include "ipstruct.h"\r
 \r
 \r
-const char *version = "0.8.3-f";\r
+const char *version = "0.8.3-g";\r
 \r
 /* Version numbers: 0.8.3 is development releases ("beta"), 0.8.4 will be "stable" */\r
 /* Debian(RPM) package versions/patchlevels: 0.7.9-2, 0.8.0-1, 0.8.0-2, etc. */\r
 \r
 /* Version numbers: 0.8.3 is development releases ("beta"), 0.8.4 will be "stable" */\r
 /* Debian(RPM) package versions/patchlevels: 0.7.9-2, 0.8.0-1, 0.8.0-2, etc. */\r
@@ -74,6 +73,9 @@ int      row_odd_even = 0; /*<tr class="odd/even"> */
 void parse_ip_log(int argc, char **argv);\r
 /* implementid in parselog.c */\r
 \r
 void parse_ip_log(int argc, char **argv);\r
 /* implementid in parselog.c */\r
 \r
+void parse_hosts(char *hosts);\r
+/* implementid in parsehosts.c */\r
+\r
 const char *tr_odd_even(void)\r
 {\r
  row_odd_even = 1 - row_odd_even;\r
 const char *tr_odd_even(void)\r
 {\r
  row_odd_even = 1 - row_odd_even;\r
@@ -146,6 +148,8 @@ int         burst_main = 64;
 int        burst_group = 32;\r
 int     magic_treshold = 8; /* reduce ceil by X*magic_treshhold kbps (hard shaping) */\r
 int       keywordcount = 0;\r
 int        burst_group = 32;\r
 int     magic_treshold = 8; /* reduce ceil by X*magic_treshhold kbps (hard shaping) */\r
 int       keywordcount = 0;\r
+int class_count        = 0;\r
+int ip_count           = 0;\r
 /* not yet implemented:\r
 int      fixed_packets = 0; maximum number of pps per IP address (not class!) \r
 int       packet_limit = 5; maximum number of pps to htn CEIL, not rate !!! \r
 /* not yet implemented:\r
 int      fixed_packets = 0; maximum number of pps per IP address (not class!) \r
 int       packet_limit = 5; maximum number of pps to htn CEIL, not rate !!! \r
@@ -160,40 +164,11 @@ const int idxtable_treshold2 = 12;      /* this is no longer configurable */
 const int idxtable_bitmask1  = 3;        /* this is no longer configurable */\r
 const int idxtable_bitmask2  = 3;        /* this is no longer configurable */\r
 \r
 const int idxtable_bitmask1  = 3;        /* this is no longer configurable */\r
 const int idxtable_bitmask2  = 3;        /* this is no longer configurable */\r
 \r
-/* ==== This is C<<1 stuff - learn C<<1 first! https://dev.arachne.cz/svn/cll1h ==== */\r
+struct IP *ips = NULL, *ip, *sharedip;\r
+struct Group *groups = NULL, *group;\r
+struct Keyword *keyword, *defaultkeyword=NULL, *keywords=NULL;\r
 \r
 \r
-struct IP\r
-{\r
- char *addr;\r
- char *name;\r
- char *sharing;\r
- int min;\r
- int desired;\r
- int max;\r
- int mark;\r
- int prio;\r
- int fixedprio;\r
- int group;\r
- int lmsid;\r
- unsigned long long direct;\r
- unsigned long long proxy;\r
- unsigned long long upload;\r
- unsigned long long traffic;\r
- unsigned long long credit;\r
- unsigned long pktsup;\r
- unsigned long pktsdown;\r
- struct Keyword *keyword;\r
- list(IP);\r
-} *ips=NULL, *ip, *sharedip;\r
-\r
-struct Group\r
-{\r
- int min;\r
- int count;\r
- int desired;\r
- int id;\r
- list(Group);\r
-} *groups=NULL, *group;\r
+/* ==== This is C<<1 stuff - learn C<<1 first! https://dev.arachne.cz/svn/cll1h ==== */\r
 \r
 struct Index\r
 {\r
 \r
 struct Index\r
 {\r
@@ -205,27 +180,6 @@ struct Index
  list(Index);\r
 } *idxs=NULL, *idx, *metaindex;\r
 \r
  list(Index);\r
 } *idxs=NULL, *idx, *metaindex;\r
 \r
-struct Keyword\r
-{\r
- char *key;\r
\r
- int asymetry_ratio;        /* ratio for ADSL-like upload */\r
- int asymetry_fixed;        /* fixed treshold for ADSL-like upload */\r
- int data_limit;            /* hard shaping: apply magic_treshold if max*data_limit MB exceeded */\r
- int data_prio;             /* soft shaping (qos): reduce HTB prio if max*data_prio MB exceeded */\r
- long fixed_limit;          /* fixed data limit for setting lower HTB ceil */\r
- long fixed_prio;           /* fixed data lmit for setting lower HTB prio */\r
- int reserve_min;          /* bonus for nominal HTB rate bandwidth (in kbps) */\r
- int reserve_max;          /* malus for nominal HTB ceil (in kbps) */\r
-// int divide_max;         /* relative malus: new_ceil=rate+(old_ceil-rate)/divide_max */\r
-// int htb_ceil_bonus_divide; /* relative bonus: new_ceil=old_ceil+old_ceil/htb_ceil_bonus_divide */\r
- int default_prio;         /* default HTB priority for this keyword */\r
- char *html_color;\r
- int ip_count;\r
- char *leaf_discipline;\r
\r
- list(Keyword);\r
-} *keyword,*defaultkeyword=NULL,*keywords=NULL;\r
 \r
 /* Damned, this must be object oriented! This looks almost like constructor ;-) */\r
 \r
 \r
 /* Damned, this must be object oriented! This looks almost like constructor ;-) */\r
 \r
@@ -712,57 +666,6 @@ void run_restore(void)
  free(restor);\r
 }\r
 \r
  free(restor);\r
 }\r
 \r
-/* == This function strips extra characters after IP address and stores it = */\r
-\r
-void parse_ip(char *str)\r
-{\r
- char *ptr,*ipaddr=NULL,*ipname=NULL,*lmsid=NULL;\r
-\r
- ptr=strchr(str,'{');\r
- if(ptr)\r
- {\r
-  lmsid=++ptr;\r
-  while(*ptr && *ptr!='}')\r
-  {\r
-   ptr++;\r
-  }\r
-  *ptr=0;\r
- }\r
\r
- ptr=str;\r
- while(*ptr && *ptr!=' ' && *ptr!=9)\r
- {\r
-  ptr++;\r
- }\r
\r
- *ptr=0;\r
- ipaddr=str;\r
- ptr++;\r
- while(*ptr && (*ptr==' ' || *ptr==9))\r
- {\r
-  ptr++;\r
- }\r
- ipname=ptr; \r
- while(*ptr && *ptr!=' ' && *ptr!=9)\r
- {\r
-  ptr++;\r
- }\r
- *ptr=0;\r
-\r
- if_exists(ip,ips,eq(ip->addr,ipaddr));\r
- else\r
- {\r
-  TheIP();\r
- }\r
- ip->addr=ipaddr;\r
- ip->name=ipname;\r
- if(lmsid)\r
- {\r
-  ip->lmsid=atoi(lmsid);\r
-  found_lmsid=1;\r
- }\r
-}\r
-\r
 char *parse_datafile_line(char *str)\r
 {\r
  char *ptr=strchr(str,' ');\r
 char *parse_datafile_line(char *str)\r
 {\r
  char *ptr=strchr(str,' ');\r
@@ -779,9 +682,6 @@ char *parse_datafile_line(char *str)
  }\r
 }\r
 \r
  }\r
 }\r
 \r
-\r
-\r
-\r
 void append_log(struct IP *self) /*using global variables*/\r
 {\r
  char *d, *str;\r
 void append_log(struct IP *self) /*using global variables*/\r
 {\r
  char *d, *str;\r
@@ -804,7 +704,6 @@ void append_log(struct IP *self) /*using global variables*/
  }\r
 }\r
 \r
  }\r
 }\r
 \r
-\r
 /*-----------------------------------------------------------------*/\r
 /* Are you looking for int main(int argc, char **argv) ? :-))      */\r
 /*-----------------------------------------------------------------*/\r
 /*-----------------------------------------------------------------*/\r
 /* Are you looking for int main(int argc, char **argv) ? :-))      */\r
 /*-----------------------------------------------------------------*/\r
@@ -815,7 +714,7 @@ program
  FILE *f=NULL;               /* everything is just stream of bytes... */\r
  char *str, *ptr, *d;        /* LET A$=B$ :-) */\r
  char *substring;\r
  FILE *f=NULL;               /* everything is just stream of bytes... */\r
  char *str, *ptr, *d;        /* LET A$=B$ :-) */\r
  char *substring;\r
- int class_count=0,ip_count=0;\r
+\r
  int parent=1;\r
  int just_flush=FALSE;       /* deactivates all previous actions */\r
  int nodelay=FALSE;\r
  int parent=1;\r
  int just_flush=FALSE;       /* deactivates all previous actions */\r
  int nodelay=FALSE;\r
@@ -894,107 +793,7 @@ Credit: CZFree.Net, Martin Devera, Netdave, Aquarius, Gandalf\n\n",version);
  /*-----------------------------------------------------------------*/\r
  printf("Parsing class defintion file %s ...\n", hosts);\r
  /*-----------------------------------------------------------------*/\r
  /*-----------------------------------------------------------------*/\r
  printf("Parsing class defintion file %s ...\n", hosts);\r
  /*-----------------------------------------------------------------*/\r
- int groupidx = FIRSTGROUPID;\r
- parse(hosts)\r
- {\r
-  str=_;\r
-\r
-  if(*str<'0' || *str>'9')\r
-  {\r
-   /* any line starting with non-number is comment ...*/\r
-   continue;\r
-  }\r
-  \r
-  //Does this IP share QoS class with some other ?\r
-  substring=strstr(str,"sharing-");\r
-  if(substring)\r
-  { \r
-   substring+=8; //"sharing-"\r
-   parse_ip(str);\r
-   ip_count++;\r
-   ip->sharing=substring;\r
-   ip->keyword=defaultkeyword; /* settings for default keyword */\r
-   while(*substring && *substring!='\n')\r
-   {\r
-    substring++;\r
-   }\r
-   *substring=0; \r
-  }\r
-  else\r
-  {\r
-   //Do we have to create new QoS class for this IP ?\r
-\r
-   if_exists(keyword,keywords,(substring=strstr(str,keyword->key)))\r
-   {\r
-    parse_ip(str);\r
-    ip_count++;\r
-    ip->keyword=keyword;\r
-    keyword->ip_count++;\r
-    ip->prio=keyword->default_prio;\r
-    substring+=strlen(keyword->key)+1;\r
-    ptr=substring;\r
-    while(*ptr && *ptr!='-')\r
-    {\r
-     ptr++;\r
-    }\r
-    if(*ptr=='-')\r
-    {\r
-     *ptr=0;\r
-     ip->max = ip->desired=atoi(ptr+1);\r
-    }\r
-    ip->min = atoi(substring);\r
-    if(ip->min <= 0)\r
-    {\r
-     printf(" %s: Illegal value of minimum bandwidth 0 kbps, using %d kb/s\n",\r
-            str, free_min);\r
-     ip->min = free_min;\r
-    }\r
-    if(ip->max <= ip->min)\r
-    {\r
-     ip->fixedprio = 1;\r
-     ip->max = ip->min+ip->keyword->reserve_min;\r
-    }\r
-    else \r
-    {\r
-     ip->max -= ip->keyword->reserve_max;\r
-     if(ip->max<ip->min)\r
-     {\r
-      ip->max=ip->min;\r
-     }\r
-    }\r
-    ip->mark=FIRSTIPCLASS+1+class_count++;\r
-\r
-    if_exists(group,groups,group->min==ip->min) \r
-    { \r
-     group->count++;      \r
-     group->desired += ip->min;\r
-     ip->group = group->id;   \r
-    }\r
-    else\r
-    {\r
-     create(group,Group);\r
-     group->min = ip->min;\r
-     group->id = groupidx++;\r
-     ip->group = group->id;\r
-\r
-     if(group->min<8) group->min=8;\r
-     /* Warning - this is maybe because of primitive tc namespace, can be fixed */\r
-     /* it is because class IDs are derived from min. bandwidth. - xCh */\r
-     //if(group->min>MAX_GUARANTED_KBPS) group->min=MAX_GUARANTED_KBPS;\r
-     \r
-     group->count=1;\r
-     group->desired=ip->min;   \r
-     insert(group,groups,desc_order_by,min);\r
-    }\r
-   }//endif keyword-\r
-  }//endif sharing-\r
- }\r
- fail\r
- {\r
-  perror(hosts);\r
-  exit(-1);\r
- }\r
- done; /* ugly macro end */\r
+ parse_hosts(hosts);\r
 \r
  /*-----------------------------------------------------------------*/\r
  /* cll1.h - let's allocate brand new character buffer...           */\r
 \r
  /*-----------------------------------------------------------------*/\r
  /* cll1.h - let's allocate brand new character buffer...           */\r
@@ -1014,7 +813,7 @@ Credit: CZFree.Net, Martin Devera, Netdave, Aquarius, Gandalf\n\n",version);
    ip->lmsid=sharedip->lmsid;\r
    break;\r
   }\r
    ip->lmsid=sharedip->lmsid;\r
    break;\r
   }\r
-  if(!sharedip)\r
+  if(not sharedip)\r
   {\r
    printf("Unresolved shared connection: %s %s sharing-%s\n",\r
           ip->addr, ip->name, ip->sharing);\r
   {\r
    printf("Unresolved shared connection: %s %s sharing-%s\n",\r
           ip->addr, ip->name, ip->sharing);\r
This page took 0.319999 seconds and 4 git commands to generate.