added ippool.h and ippool.c
diff --git a/sgsnemu/cmdline.c b/sgsnemu/cmdline.c
index a781b18..2240c56 100644
--- a/sgsnemu/cmdline.c
+++ b/sgsnemu/cmdline.c
@@ -1,7 +1,7 @@
 /*
-  File autogenerated by gengetopt version 2.8rc
+  File autogenerated by gengetopt version 2.8
   generated with the following command:
-  ../../gengetopt-2.8rc/src/gengetopt --conf-parser 
+  gengetopt --conf-parser 
 
   The developers of gengetopt consider the fixed text that goes in all
   gengetopt output files to be in the public domain:
@@ -61,10 +61,9 @@
   printf("   -uSTRING   --uid=STRING       Login user ID (default='mig')\n");
   printf("   -pSTRING   --pwd=STRING       Login password (default='hemmelig')\n");
   printf("              --createif         Create local network interface (default=off)\n");
+  printf("              --defaultroute     Create default route (default=off)\n");
   printf("              --ipup=STRING      Script to run after link-up\n");
   printf("              --ipdown=STRING    Script to run after link-down\n");
-  printf("              --net=STRING       Network (default='0.0.0.0')\n");
-  printf("              --mask=STRING      Network mask (default='0.0.0.0')\n");
   printf("              --pinghost=STRING  Ping remote host\n");
   printf("              --pingrate=INT     Number of ping req per second (default='1')\n");
   printf("              --pingsize=INT     Number of ping data bytes (default='56')\n");
@@ -112,10 +111,9 @@
   args_info->uid_given = 0 ;
   args_info->pwd_given = 0 ;
   args_info->createif_given = 0 ;
+  args_info->defaultroute_given = 0 ;
   args_info->ipup_given = 0 ;
   args_info->ipdown_given = 0 ;
-  args_info->net_given = 0 ;
-  args_info->mask_given = 0 ;
   args_info->pinghost_given = 0 ;
   args_info->pingrate_given = 0 ;
   args_info->pingsize_given = 0 ;
@@ -139,10 +137,9 @@
   args_info->uid_arg = strdup("mig") ;\
   args_info->pwd_arg = strdup("hemmelig") ;\
   args_info->createif_flag = 0;\
+  args_info->defaultroute_flag = 0;\
   args_info->ipup_arg = NULL; \
   args_info->ipdown_arg = NULL; \
-  args_info->net_arg = strdup("0.0.0.0") ;\
-  args_info->mask_arg = strdup("0.0.0.0") ;\
   args_info->pinghost_arg = NULL; \
   args_info->pingrate_arg = 1 ;\
   args_info->pingsize_arg = 56 ;\
@@ -181,10 +178,9 @@
         { "uid",	1, NULL, 'u' },
         { "pwd",	1, NULL, 'p' },
         { "createif",	0, NULL, 0 },
+        { "defaultroute",	0, NULL, 0 },
         { "ipup",	1, NULL, 0 },
         { "ipdown",	1, NULL, 0 },
-        { "net",	1, NULL, 0 },
-        { "mask",	1, NULL, 0 },
         { "pinghost",	1, NULL, 0 },
         { "pingrate",	1, NULL, 0 },
         { "pingsize",	1, NULL, 0 },
@@ -410,6 +406,19 @@
             args_info->createif_flag = !(args_info->createif_flag);
             break;
           }
+          /* Create default route.  */
+          else if (strcmp (long_options[option_index].name, "defaultroute") == 0)
+          {
+            if (args_info->defaultroute_given)
+              {
+                fprintf (stderr, "%s: `--defaultroute' option given more than once\n", PACKAGE);
+                clear_args ();
+                exit (EXIT_FAILURE);
+              }
+            args_info->defaultroute_given = 1;
+            args_info->defaultroute_flag = !(args_info->defaultroute_flag);
+            break;
+          }
           /* Script to run after link-up.  */
           else if (strcmp (long_options[option_index].name, "ipup") == 0)
           {
@@ -436,32 +445,6 @@
             args_info->ipdown_arg = strdup (optarg);
             break;
           }
-          /* Network.  */
-          else if (strcmp (long_options[option_index].name, "net") == 0)
-          {
-            if (args_info->net_given)
-              {
-                fprintf (stderr, "%s: `--net' option given more than once\n", PACKAGE);
-                clear_args ();
-                exit (EXIT_FAILURE);
-              }
-            args_info->net_given = 1;
-            args_info->net_arg = strdup (optarg);
-            break;
-          }
-          /* Network mask.  */
-          else if (strcmp (long_options[option_index].name, "mask") == 0)
-          {
-            if (args_info->mask_given)
-              {
-                fprintf (stderr, "%s: `--mask' option given more than once\n", PACKAGE);
-                clear_args ();
-                exit (EXIT_FAILURE);
-              }
-            args_info->mask_given = 1;
-            args_info->mask_arg = strdup (optarg);
-            break;
-          }
           /* Ping remote host.  */
           else if (strcmp (long_options[option_index].name, "pinghost") == 0)
           {
@@ -851,6 +834,15 @@
                 }
               continue;
             }
+          if (!strcmp(fopt, "defaultroute"))
+            {
+              if (override || !args_info->defaultroute_given)
+                {
+                  args_info->defaultroute_given = 1;
+                  args_info->defaultroute_flag = !(args_info->defaultroute_flag);
+                }
+              continue;
+            }
           if (!strcmp(fopt, "ipup"))
             {
               if (override || !args_info->ipup_given)
@@ -883,38 +875,6 @@
                 }
               continue;
             }
-          if (!strcmp(fopt, "net"))
-            {
-              if (override || !args_info->net_given)
-                {
-                  args_info->net_given = 1;
-                  if (fnum == 2)
-                    args_info->net_arg = strdup (farg);
-                  else
-                    {
-                      fprintf (stderr, "%s:%d: required <option_name> <option_val>\n",
-                               filename, line_num);
-                      exit (EXIT_FAILURE);
-                    }
-                }
-              continue;
-            }
-          if (!strcmp(fopt, "mask"))
-            {
-              if (override || !args_info->mask_given)
-                {
-                  args_info->mask_given = 1;
-                  if (fnum == 2)
-                    args_info->mask_arg = strdup (farg);
-                  else
-                    {
-                      fprintf (stderr, "%s:%d: required <option_name> <option_val>\n",
-                               filename, line_num);
-                      exit (EXIT_FAILURE);
-                    }
-                }
-              continue;
-            }
           if (!strcmp(fopt, "pinghost"))
             {
               if (override || !args_info->pinghost_given)