9
0
Fork 0

Removed defaultroute option

This commit is contained in:
jjako 2003-01-28 23:21:44 +00:00
parent 286bc984ed
commit f573244215
4 changed files with 0 additions and 35 deletions

View File

@ -103,12 +103,6 @@ remote 10.0.0.240
# Executed with the following parameters: <devicename> <ip address>
#ipdown /etc/sgsnemu/ip-down
# TAG: defaultroute
# Use this flag if you want to add a default route to the routing tables
# after the network interface has been brought up.
# If net and/or mask tags are set this overrides the use of a default route.
#defaultroute
# TAG: net
# IP network address of external packet data network.
# Only used if the defaultroute flag is set.

View File

@ -63,7 +63,6 @@ cmdline_parser_print_help (void)
printf(" --createif Create local network interface (default=off)\n");
printf(" --ipup=STRING Script to run after link-up\n");
printf(" --ipdown=STRING Script to run after link-down\n");
printf(" --defaultroute Add default route after link-up (default=off)\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");
@ -115,7 +114,6 @@ cmdline_parser (int argc, char * const *argv, struct gengetopt_args_info *args_i
args_info->createif_given = 0 ;
args_info->ipup_given = 0 ;
args_info->ipdown_given = 0 ;
args_info->defaultroute_given = 0 ;
args_info->net_given = 0 ;
args_info->mask_given = 0 ;
args_info->pinghost_given = 0 ;
@ -143,7 +141,6 @@ cmdline_parser (int argc, char * const *argv, struct gengetopt_args_info *args_i
args_info->createif_flag = 0;\
args_info->ipup_arg = NULL; \
args_info->ipdown_arg = NULL; \
args_info->defaultroute_flag = 0;\
args_info->net_arg = strdup("0.0.0.0") ;\
args_info->mask_arg = strdup("0.0.0.0") ;\
args_info->pinghost_arg = NULL; \
@ -186,7 +183,6 @@ cmdline_parser (int argc, char * const *argv, struct gengetopt_args_info *args_i
{ "createif", 0, NULL, 0 },
{ "ipup", 1, NULL, 0 },
{ "ipdown", 1, NULL, 0 },
{ "defaultroute", 0, NULL, 0 },
{ "net", 1, NULL, 0 },
{ "mask", 1, NULL, 0 },
{ "pinghost", 1, NULL, 0 },
@ -440,19 +436,6 @@ cmdline_parser (int argc, char * const *argv, struct gengetopt_args_info *args_i
args_info->ipdown_arg = strdup (optarg);
break;
}
/* Add default route after link-up. */
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;
}
/* Network. */
else if (strcmp (long_options[option_index].name, "net") == 0)
{
@ -900,15 +883,6 @@ cmdline_parser_configfile (char * const filename, struct gengetopt_args_info *ar
}
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, "net"))
{
if (override || !args_info->net_given)

View File

@ -35,7 +35,6 @@ option "pwd" p "Login password" string default="hemmeli
option "createif" - "Create local network interface" flag off
option "ipup" - "Script to run after link-up" string no
option "ipdown" - "Script to run after link-down" string no
option "defaultroute" - "Add default route after link-up" flag off
option "net" - "Network" string default="0.0.0.0" no
option "mask" - "Network mask" string default="0.0.0.0" no

View File

@ -39,7 +39,6 @@ struct gengetopt_args_info
int createif_flag; /* Create local network interface (default=off). */
char * ipup_arg; /* Script to run after link-up. */
char * ipdown_arg; /* Script to run after link-down. */
int defaultroute_flag; /* Add default route after link-up (default=off). */
char * net_arg; /* Network (default='0.0.0.0'). */
char * mask_arg; /* Network mask (default='0.0.0.0'). */
char * pinghost_arg; /* Ping remote host. */
@ -69,7 +68,6 @@ struct gengetopt_args_info
int createif_given ; /* Whether createif was given. */
int ipup_given ; /* Whether ipup was given. */
int ipdown_given ; /* Whether ipdown was given. */
int defaultroute_given ; /* Whether defaultroute was given. */
int net_given ; /* Whether net was given. */
int mask_given ; /* Whether mask was given. */
int pinghost_given ; /* Whether pinghost was given. */