|
|
|
@ -161,10 +161,10 @@ sub gst_network_config_wireless
|
|
|
|
|
sub gst_network_enable_iface
|
|
|
|
|
{
|
|
|
|
|
my ($hash, $dev, $command_ifconfig) = @_;
|
|
|
|
|
my ($address, $nettqmask, $bootproto, $remote_address);
|
|
|
|
|
my ($address, $netmask, $bootproto, $remote_address);
|
|
|
|
|
|
|
|
|
|
$address = $$hash{"configuration"}{"address"};
|
|
|
|
|
$nettqmask = $$hash{"configuration"}{"nettqmask"};
|
|
|
|
|
$netmask = $$hash{"configuration"}{"netmask"};
|
|
|
|
|
$bootproto = $$hash{"configuration"}{"bootproto"};
|
|
|
|
|
$remote_address = $$hash{"configuration"}{"remote_address"};
|
|
|
|
|
|
|
|
|
@ -188,7 +188,7 @@ sub gst_network_enable_iface
|
|
|
|
|
$command = $command_ifconfig;
|
|
|
|
|
$command .= " $dev";
|
|
|
|
|
$command .= " $address" if ($address);
|
|
|
|
|
$command .= " nettqmask $nettqmask" if ($nettqmask);
|
|
|
|
|
$command .= " netmask $netmask" if ($netmask);
|
|
|
|
|
$command .= " dstaddr $remote_address" if ($remote_address);
|
|
|
|
|
$command .= " up";
|
|
|
|
|
}
|
|
|
|
@ -432,11 +432,11 @@ sub gst_network_ipv4_vec2str
|
|
|
|
|
# Gets the subnet, in bitmap.
|
|
|
|
|
sub gst_network_ipv4_calc_subnet_vec
|
|
|
|
|
{
|
|
|
|
|
my ($addr, $tqmask) = @_;
|
|
|
|
|
my ($addr, $mask) = @_;
|
|
|
|
|
my ($addrvec, $maskvec);
|
|
|
|
|
|
|
|
|
|
$addrvec = &gst_network_ipv4_str2vec ($addr);
|
|
|
|
|
$maskvec = &gst_network_ipv4_str2vec ($tqmask);
|
|
|
|
|
$maskvec = &gst_network_ipv4_str2vec ($mask);
|
|
|
|
|
|
|
|
|
|
return $addrvec & $maskvec;
|
|
|
|
|
}
|
|
|
|
@ -444,7 +444,7 @@ sub gst_network_ipv4_calc_subnet_vec
|
|
|
|
|
# What you're looking for.
|
|
|
|
|
sub gst_network_ipv4_calc_subnet
|
|
|
|
|
{
|
|
|
|
|
my ($addr, $tqmask) = @_;
|
|
|
|
|
my ($addr, $mask) = @_;
|
|
|
|
|
|
|
|
|
|
return &gst_network_ipv4_vec2str (&gst_network_ipv4_calc_subnet_vec);
|
|
|
|
|
}
|
|
|
|
@ -452,10 +452,10 @@ sub gst_network_ipv4_calc_subnet
|
|
|
|
|
# The broadcast, bitmap.
|
|
|
|
|
sub gst_network_ipv4_calc_bcast_vec
|
|
|
|
|
{
|
|
|
|
|
my ($addr, $tqmask) = @_;
|
|
|
|
|
my ($addr, $mask) = @_;
|
|
|
|
|
|
|
|
|
|
$addrvec = &gst_network_ipv4_str2vec ($addr);
|
|
|
|
|
$maskvec = &gst_network_ipv4_str2vec ($tqmask);
|
|
|
|
|
$maskvec = &gst_network_ipv4_str2vec ($mask);
|
|
|
|
|
|
|
|
|
|
return $addrvec | ~$maskvec;
|
|
|
|
|
}
|
|
|
|
@ -463,7 +463,7 @@ sub gst_network_ipv4_calc_bcast_vec
|
|
|
|
|
# And this returning the quad-dot notation.
|
|
|
|
|
sub gst_network_ipv4_calc_bcast
|
|
|
|
|
{
|
|
|
|
|
my ($addr, $tqmask) = @_;
|
|
|
|
|
my ($addr, $mask) = @_;
|
|
|
|
|
|
|
|
|
|
return &gst_network_ipv4_vec2str (&gst_network_ipv4_calc_bcast_vec);
|
|
|
|
|
}
|
|
|
|
@ -870,7 +870,7 @@ sub gst_network_freebsd_interfaces_get_info
|
|
|
|
|
{
|
|
|
|
|
$ifaces{$dev}{"hwaddr"} = $1 if /ether[ \t]+([^ \t]+)/i;
|
|
|
|
|
$ifaces{$dev}{"addr"} = $1 if /inet[ \t]+([^ \t]+)/i;
|
|
|
|
|
$ifaces{$dev}{"tqmask"} = $1 if /nettqmask[ \t]+([^ \t]+)/i;
|
|
|
|
|
$ifaces{$dev}{"mask"} = $1 if /netmask[ \t]+([^ \t]+)/i;
|
|
|
|
|
$ifaces{$dev}{"bcast"} = $1 if /broadcast[ \t]+([^ \t]+)/i;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
@ -905,7 +905,7 @@ sub gst_network_linux_interfaces_get_info
|
|
|
|
|
{
|
|
|
|
|
$ifaces{$dev}{"hwaddr"} = $1 if /HWaddr[ \t]+([^ \t]+)/i;
|
|
|
|
|
$ifaces{$dev}{"addr"} = $1 if /addr:([^ \t]+)/i;
|
|
|
|
|
$ifaces{$dev}{"tqmask"} = $1 if /tqmask:([^ \t]+)/i;
|
|
|
|
|
$ifaces{$dev}{"mask"} = $1 if /mask:([^ \t]+)/i;
|
|
|
|
|
$ifaces{$dev}{"bcast"} = $1 if /bcast:([^ \t]+)/i;
|
|
|
|
|
$ifaces{$dev}{"enabled"} = 1 if /^UP[ \t]/i;
|
|
|
|
|
}
|
|
|
|
@ -1028,17 +1028,17 @@ sub gst_network_interface_ensure_broadcast_and_network
|
|
|
|
|
{
|
|
|
|
|
my ($iface) = @_;
|
|
|
|
|
|
|
|
|
|
if (exists $$iface{"nettqmask"} &&
|
|
|
|
|
if (exists $$iface{"netmask"} &&
|
|
|
|
|
exists $$iface{"address"})
|
|
|
|
|
{
|
|
|
|
|
if (! exists $$iface{"broadcast"})
|
|
|
|
|
{
|
|
|
|
|
$$iface{"broadcast"} = &gst_network_ipv4_calc_bcast ($$iface{"address"}, $$iface{"nettqmask"});
|
|
|
|
|
$$iface{"broadcast"} = &gst_network_ipv4_calc_bcast ($$iface{"address"}, $$iface{"netmask"});
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
if (! exists $$iface{"network"})
|
|
|
|
|
{
|
|
|
|
|
$$iface{"network"} = &gst_network_ipv4_calc_subnet ($$iface{"address"}, $$iface{"nettqmask"});
|
|
|
|
|
$$iface{"network"} = &gst_network_ipv4_calc_subnet ($$iface{"address"}, $$iface{"netmask"});
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
@ -1660,7 +1660,7 @@ sub gst_network_interfaces_get
|
|
|
|
|
{
|
|
|
|
|
delete $$hash{$i}{"addr"};
|
|
|
|
|
delete $$hash{$i}{"bcast"};
|
|
|
|
|
delete $$hash{$i}{"tqmask"};
|
|
|
|
|
delete $$hash{$i}{"mask"};
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
foreach $i (@ifaces)
|
|
|
|
@ -2182,7 +2182,7 @@ sub gst_network_suse70_interface_activate
|
|
|
|
|
sub gst_network_slackware91_interface_activate_by_dev
|
|
|
|
|
{
|
|
|
|
|
my ($dev, $enabled) = @_;
|
|
|
|
|
my ($address, $nettqmask, $gateway);
|
|
|
|
|
my ($address, $netmask, $gateway);
|
|
|
|
|
my ($file) = "/etc/rc.d/rc.inet1.conf";
|
|
|
|
|
my ($ret) = 0;
|
|
|
|
|
|
|
|
|
@ -2206,10 +2206,10 @@ sub gst_network_slackware91_interface_activate_by_dev
|
|
|
|
|
else
|
|
|
|
|
{
|
|
|
|
|
$address = &gst_parse_rcinet1conf ($file, $dev, "IPADDR");
|
|
|
|
|
$nettqmask = &gst_parse_rcinet1conf ($file, $dev, "NETMASK");
|
|
|
|
|
$gateway = &gst_network_get_gateway ($file, "GATEWAY", $address, $nettqmask);
|
|
|
|
|
$netmask = &gst_parse_rcinet1conf ($file, $dev, "NETMASK");
|
|
|
|
|
$gateway = &gst_network_get_gateway ($file, "GATEWAY", $address, $netmask);
|
|
|
|
|
|
|
|
|
|
$ret = &gst_file_run ("ifconfig $dev $address nettqmask $nettqmask up");
|
|
|
|
|
$ret = &gst_file_run ("ifconfig $dev $address netmask $netmask up");
|
|
|
|
|
|
|
|
|
|
# Add the gateway if necessary
|
|
|
|
|
if ($gateway ne undef)
|
|
|
|
@ -3526,11 +3526,11 @@ sub gst_network_suse90_set_auto
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
# Return IP address or nettqmask, depending on $what
|
|
|
|
|
# Return IP address or netmask, depending on $what
|
|
|
|
|
sub gst_network_pld10_get_ipaddr
|
|
|
|
|
{
|
|
|
|
|
my ($file, $key, $what) = @_;
|
|
|
|
|
my ($ipaddr, $nettqmask, $ret, $i);
|
|
|
|
|
my ($ipaddr, $netmask, $ret, $i);
|
|
|
|
|
my @netmask_prefixes = (0, 128, 192, 224, 240, 248, 252, 254, 255);
|
|
|
|
|
|
|
|
|
|
$ipaddr = &gst_parse_sh($file, $key);
|
|
|
|
@ -3538,22 +3538,22 @@ sub gst_network_pld10_get_ipaddr
|
|
|
|
|
|
|
|
|
|
if($ipaddr =~ /([^\/]*)\/([[:digit:]]*)/)
|
|
|
|
|
{
|
|
|
|
|
$nettqmask = $2;
|
|
|
|
|
return undef if $nettqmask eq "";
|
|
|
|
|
$netmask = $2;
|
|
|
|
|
return undef if $netmask eq "";
|
|
|
|
|
|
|
|
|
|
if($what eq "address")
|
|
|
|
|
{
|
|
|
|
|
return $1;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
for($i = 0; $i < int($nettqmask/8); $i++)
|
|
|
|
|
for($i = 0; $i < int($netmask/8); $i++)
|
|
|
|
|
{
|
|
|
|
|
$ret .= "255.";
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
$ret .= "$netmask_prefixes[$b%8]." if $nettqmask < 32;
|
|
|
|
|
$ret .= "$netmask_prefixes[$b%8]." if $netmask < 32;
|
|
|
|
|
|
|
|
|
|
for($i = int($nettqmask/8) + 1; $i < 4; $i++)
|
|
|
|
|
for($i = int($netmask/8) + 1; $i < 4; $i++)
|
|
|
|
|
{
|
|
|
|
|
$ret .= "0.";
|
|
|
|
|
}
|
|
|
|
@ -3564,7 +3564,7 @@ sub gst_network_pld10_get_ipaddr
|
|
|
|
|
return undef;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
# Writes IP address or nettqmask, depending in $what, to $file
|
|
|
|
|
# Writes IP address or netmask, depending in $what, to $file
|
|
|
|
|
sub gst_network_pld10_set_ipaddr
|
|
|
|
|
{
|
|
|
|
|
my ($file, $key, $what, $value) = @_;
|
|
|
|
@ -3580,7 +3580,7 @@ sub gst_network_pld10_set_ipaddr
|
|
|
|
|
"254" => 7,
|
|
|
|
|
"255" => 8
|
|
|
|
|
);
|
|
|
|
|
my ($ipaddr, $nettqmask);
|
|
|
|
|
my ($ipaddr, $netmask);
|
|
|
|
|
|
|
|
|
|
$ipaddr = &gst_parse_sh($file, $key);
|
|
|
|
|
return undef if $ipaddr eq "";
|
|
|
|
@ -3593,8 +3593,8 @@ sub gst_network_pld10_set_ipaddr
|
|
|
|
|
{
|
|
|
|
|
if($value =~ /([[:digit:]]*).([[:digit:]]*).([[:digit:]]*).([[:digit:]]*)/)
|
|
|
|
|
{
|
|
|
|
|
$nettqmask = $prefixes{$1} + $prefixes{$2} + $prefixes{$3} + $prefixes{$4};
|
|
|
|
|
$ipaddr =~ s/\/[[:digit:]]*/\/$nettqmask/;
|
|
|
|
|
$netmask = $prefixes{$1} + $prefixes{$2} + $prefixes{$3} + $prefixes{$4};
|
|
|
|
|
$ipaddr =~ s/\/[[:digit:]]*/\/$netmask/;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
@ -3605,25 +3605,25 @@ sub gst_network_pld10_set_ipaddr
|
|
|
|
|
# it checks if a IP address is in the same network than another
|
|
|
|
|
sub gst_network_is_ip_in_same_network
|
|
|
|
|
{
|
|
|
|
|
my ($address1, $address2, $nettqmask) = @_;
|
|
|
|
|
my (@add1, @add2, @tqmask);
|
|
|
|
|
my ($address1, $address2, $netmask) = @_;
|
|
|
|
|
my (@add1, @add2, @mask);
|
|
|
|
|
my ($i);
|
|
|
|
|
|
|
|
|
|
return 0 if (($address1 eq undef) ||
|
|
|
|
|
($address2 eq undef) ||
|
|
|
|
|
($nettqmask eq undef));
|
|
|
|
|
($netmask eq undef));
|
|
|
|
|
|
|
|
|
|
@add1 = split (/\./, $address1);
|
|
|
|
|
@add2 = split (/\./, $address2);
|
|
|
|
|
@tqmask = split (/\./, $nettqmask);
|
|
|
|
|
@mask = split (/\./, $netmask);
|
|
|
|
|
|
|
|
|
|
for ($i = 0; $i < 4; $i++)
|
|
|
|
|
{
|
|
|
|
|
$add1[$i] += 0;
|
|
|
|
|
$add2[$i] += 0;
|
|
|
|
|
$tqmask[$i] += 0;
|
|
|
|
|
$mask[$i] += 0;
|
|
|
|
|
|
|
|
|
|
return 0 if (($add1[$i] & $tqmask[$i]) != ($add2[$i] & $tqmask[$i]));
|
|
|
|
|
return 0 if (($add1[$i] & $mask[$i]) != ($add2[$i] & $mask[$i]));
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
return 1;
|
|
|
|
@ -3633,14 +3633,14 @@ sub gst_network_is_ip_in_same_network
|
|
|
|
|
sub gst_network_get_gateway_dev_from_address
|
|
|
|
|
{
|
|
|
|
|
my ($interface, $gateway) = @_;
|
|
|
|
|
my ($address, $nettqmask, $key);
|
|
|
|
|
my ($address, $netmask, $key);
|
|
|
|
|
|
|
|
|
|
foreach $key (keys %$interface)
|
|
|
|
|
{
|
|
|
|
|
$address = $$interface{$key}{"address"};
|
|
|
|
|
$nettqmask = $$interface{$key}{"nettqmask"};
|
|
|
|
|
$netmask = $$interface{$key}{"netmask"};
|
|
|
|
|
|
|
|
|
|
return $$interface{$key}{"dev"} if (&gst_network_is_ip_in_same_network ($address, $gateway, $nettqmask));
|
|
|
|
|
return $$interface{$key}{"dev"} if (&gst_network_is_ip_in_same_network ($address, $gateway, $netmask));
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
return undef;
|
|
|
|
@ -3658,23 +3658,23 @@ sub gst_network_get_plip_gateway
|
|
|
|
|
|
|
|
|
|
sub gst_network_get_gateway
|
|
|
|
|
{
|
|
|
|
|
my ($file, $key, $address, $nettqmask) = @_;
|
|
|
|
|
my ($file, $key, $address, $netmask) = @_;
|
|
|
|
|
my ($gateway);
|
|
|
|
|
|
|
|
|
|
return undef if ($address eq undef);
|
|
|
|
|
|
|
|
|
|
$gateway = &gst_parse_sh ($file, $key);
|
|
|
|
|
|
|
|
|
|
return $gateway if &gst_network_is_ip_in_same_network ($address, $gateway, $nettqmask);
|
|
|
|
|
return $gateway if &gst_network_is_ip_in_same_network ($address, $gateway, $netmask);
|
|
|
|
|
return undef;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
sub gst_network_suse90_get_gateway
|
|
|
|
|
{
|
|
|
|
|
my ($file, $address, $nettqmask) = @_;
|
|
|
|
|
my ($file, $address, $netmask) = @_;
|
|
|
|
|
my ($gateway) = &gst_parse_split_first_array_pos ($file, "default", 0, "[ \t]+", "[ \t]+");
|
|
|
|
|
|
|
|
|
|
return $gateway if &gst_network_is_ip_in_same_network ($address, $gateway, $nettqmask);
|
|
|
|
|
return $gateway if &gst_network_is_ip_in_same_network ($address, $gateway, $netmask);
|
|
|
|
|
return undef;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
@ -3689,10 +3689,10 @@ sub gst_network_suse90_get_plip_gateway
|
|
|
|
|
|
|
|
|
|
sub gst_network_suse90_replace_gateway
|
|
|
|
|
{
|
|
|
|
|
my ($file, $dev, $address, $nettqmask, $value) = @_;
|
|
|
|
|
my ($file, $dev, $address, $netmask, $value) = @_;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
return &gst_replace_split ($file, "default", "[ \t]+", "$value \- $dev") if &gst_network_is_ip_in_same_network ($address, $value, $nettqmask);
|
|
|
|
|
return &gst_replace_split ($file, "default", "[ \t]+", "$value \- $dev") if &gst_network_is_ip_in_same_network ($address, $value, $netmask);
|
|
|
|
|
# return &gst_replace_split ($file, "default", "[ \t]+", "$value \- $dev") ;
|
|
|
|
|
return undef;
|
|
|
|
|
|
|
|
|
@ -4039,7 +4039,7 @@ sub gst_network_ensure_loopback_interface
|
|
|
|
|
"user" => 0,
|
|
|
|
|
"dev" => "lo",
|
|
|
|
|
"address" => "127.0.0.1",
|
|
|
|
|
"nettqmask" => "255.0.0.0",
|
|
|
|
|
"netmask" => "255.0.0.0",
|
|
|
|
|
"broadcast" => "127.255.255.255",
|
|
|
|
|
"network" => "127.0.0.0",
|
|
|
|
|
"bootproto" => "none",
|
|
|
|
@ -4674,7 +4674,7 @@ sub gst_network_get_interface_parse_table
|
|
|
|
|
# [ "user", \&gst_parse_sh_bool, IFCFG, USERCTL ],
|
|
|
|
|
[ "dev", \&gst_parse_sh, IFCFG, DEVICE ],
|
|
|
|
|
[ "address", \&gst_parse_sh, IFCFG, IPADDR ],
|
|
|
|
|
[ "nettqmask", \&gst_parse_sh, IFCFG, NETMASK ],
|
|
|
|
|
[ "netmask", \&gst_parse_sh, IFCFG, NETMASK ],
|
|
|
|
|
[ "broadcast", \&gst_parse_sh, IFCFG, BROADCAST ],
|
|
|
|
|
[ "network", \&gst_parse_sh, IFCFG, NETWORK ],
|
|
|
|
|
[ "gateway", \&gst_parse_sh, IFCFG, GATEWAY ],
|
|
|
|
@ -4737,7 +4737,7 @@ sub gst_network_get_interface_parse_table
|
|
|
|
|
# [ "name", \&gst_parse_trivial, IFACE ],
|
|
|
|
|
[ "dev", \&gst_parse_sh, IFCFG, DEVICE ],
|
|
|
|
|
[ "address", \&gst_parse_sh, IFCFG, IPADDR ],
|
|
|
|
|
[ "nettqmask", \&gst_parse_sh, IFCFG, NETMASK ],
|
|
|
|
|
[ "netmask", \&gst_parse_sh, IFCFG, NETMASK ],
|
|
|
|
|
[ "broadcast", \&gst_parse_sh, IFCFG, BROADCAST ],
|
|
|
|
|
[ "network", \&gst_parse_sh, IFCFG, NETWORK ],
|
|
|
|
|
[ "gateway", \&gst_parse_sh, IFCFG, GATEWAY ],
|
|
|
|
@ -4807,7 +4807,7 @@ sub gst_network_get_interface_parse_table
|
|
|
|
|
# [ "name", \&gst_parse_trivial, IFACE ],
|
|
|
|
|
[ "dev", \&gst_parse_sh, IFCFG, DEVICE ],
|
|
|
|
|
[ "address", \&gst_parse_sh, IFCFG, IPADDR ],
|
|
|
|
|
[ "nettqmask", \&gst_parse_sh, IFCFG, NETMASK ],
|
|
|
|
|
[ "netmask", \&gst_parse_sh, IFCFG, NETMASK ],
|
|
|
|
|
[ "broadcast", \&gst_parse_sh, IFCFG, BROADCAST ],
|
|
|
|
|
[ "network", \&gst_parse_sh, IFCFG, NETWORK ],
|
|
|
|
|
[ "gateway", \&gst_parse_sh, IFCFG, GATEWAY ],
|
|
|
|
@ -4874,7 +4874,7 @@ sub gst_network_get_interface_parse_table
|
|
|
|
|
# [ "name", \&gst_parse_sh, IFCFG, NAME ],
|
|
|
|
|
[ "dev", \&gst_parse_sh, IFCFG, DEVICE ],
|
|
|
|
|
[ "address", \&gst_parse_sh, IFCFG, IPADDR ],
|
|
|
|
|
[ "nettqmask", \&gst_parse_sh, IFCFG, NETMASK ],
|
|
|
|
|
[ "netmask", \&gst_parse_sh, IFCFG, NETMASK ],
|
|
|
|
|
[ "broadcast", \&gst_parse_sh, IFCFG, BROADCAST ],
|
|
|
|
|
[ "network", \&gst_parse_sh, IFCFG, NETWORK ],
|
|
|
|
|
[ "gateway", \&gst_parse_sh, IFCFG, GATEWAY ],
|
|
|
|
@ -4938,7 +4938,7 @@ sub gst_network_get_interface_parse_table
|
|
|
|
|
# [ "name", \&gst_parse_sh, IFCFG, NAME ],
|
|
|
|
|
[ "dev", \&gst_parse_sh, IFCFG, DEVICE ],
|
|
|
|
|
[ "address", \&gst_parse_sh, IFCFG, IPADDR ],
|
|
|
|
|
[ "nettqmask", \&gst_parse_sh, IFCFG, NETMASK ],
|
|
|
|
|
[ "netmask", \&gst_parse_sh, IFCFG, NETMASK ],
|
|
|
|
|
[ "broadcast", \&gst_parse_sh, IFCFG, BROADCAST ],
|
|
|
|
|
[ "network", \&gst_parse_sh, IFCFG, NETWORK ],
|
|
|
|
|
[ "gateway", \&gst_parse_sh, IFCFG, GATEWAY ],
|
|
|
|
@ -5003,7 +5003,7 @@ sub gst_network_get_interface_parse_table
|
|
|
|
|
# [ "name", \&gst_parse_sh, IFCFG, NAME ],
|
|
|
|
|
[ "dev", \&gst_parse_sh, IFCFG, DEVICE ],
|
|
|
|
|
[ "address", \&gst_parse_sh, IFCFG, IPADDR ],
|
|
|
|
|
[ "nettqmask", \&gst_parse_sh, IFCFG, NETMASK ],
|
|
|
|
|
[ "netmask", \&gst_parse_sh, IFCFG, NETMASK ],
|
|
|
|
|
[ "broadcast", \&gst_parse_sh, IFCFG, BROADCAST ],
|
|
|
|
|
[ "network", \&gst_parse_sh, IFCFG, NETWORK ],
|
|
|
|
|
[ "gateway", \&gst_parse_sh, IFCFG, GATEWAY ],
|
|
|
|
@ -5069,7 +5069,7 @@ sub gst_network_get_interface_parse_table
|
|
|
|
|
[ "auto", \&gst_parse_interfaces_option_kw_not, [INTERFACES, IFACE], "noauto" ],
|
|
|
|
|
# [ "name", \&gst_parse_interfaces_option_str, [INTERFACES, IFACE], "name" ],
|
|
|
|
|
[ "address", \&gst_parse_interfaces_option_str, [INTERFACES, IFACE], "address" ],
|
|
|
|
|
[ "nettqmask", \&gst_parse_interfaces_option_str, [INTERFACES, IFACE], "nettqmask" ],
|
|
|
|
|
[ "netmask", \&gst_parse_interfaces_option_str, [INTERFACES, IFACE], "netmask" ],
|
|
|
|
|
[ "broadcast", \&gst_parse_interfaces_option_str, [INTERFACES, IFACE], "broadcast" ],
|
|
|
|
|
[ "network", \&gst_parse_interfaces_option_str, [INTERFACES, IFACE], "network" ],
|
|
|
|
|
[ "gateway", \&gst_parse_interfaces_option_str, [INTERFACES, IFACE], "gateway" ],
|
|
|
|
@ -5124,7 +5124,7 @@ sub gst_network_get_interface_parse_table
|
|
|
|
|
[ "auto", \&gst_network_debian_woody_get_auto, [INTERFACES, IFACE]],
|
|
|
|
|
# [ "name", \&gst_parse_interfaces_option_str, [INTERFACES, IFACE], "name" ],
|
|
|
|
|
[ "address", \&gst_parse_interfaces_option_str, [INTERFACES, IFACE], "address" ],
|
|
|
|
|
[ "nettqmask", \&gst_parse_interfaces_option_str, [INTERFACES, IFACE], "nettqmask" ],
|
|
|
|
|
[ "netmask", \&gst_parse_interfaces_option_str, [INTERFACES, IFACE], "netmask" ],
|
|
|
|
|
[ "broadcast", \&gst_parse_interfaces_option_str, [INTERFACES, IFACE], "broadcast" ],
|
|
|
|
|
[ "network", \&gst_parse_interfaces_option_str, [INTERFACES, IFACE], "network" ],
|
|
|
|
|
[ "gateway", \&gst_parse_interfaces_option_str, [INTERFACES, IFACE], "gateway" ],
|
|
|
|
@ -5176,7 +5176,7 @@ sub gst_network_get_interface_parse_table
|
|
|
|
|
[ "name", \&gst_network_suse70_parse_iface_sh, [IFCFG, IFACE], GST_IFACE_NAME ],
|
|
|
|
|
[ "dev", \&gst_network_suse70_parse_iface_sh, [IFCFG, IFACE], NETDEV ],
|
|
|
|
|
[ "address", \&gst_network_suse70_parse_iface_sh, [IFCFG, IFACE], IPADDR ],
|
|
|
|
|
[ "nettqmask", \&gst_network_suse70_get_ifconfig_arg, [IFCFG, IFACE], nettqmask ],
|
|
|
|
|
[ "netmask", \&gst_network_suse70_get_ifconfig_arg, [IFCFG, IFACE], netmask ],
|
|
|
|
|
[ "broadcast", \&gst_network_suse70_get_ifconfig_arg, [IFCFG, IFACE], broadcast ],
|
|
|
|
|
# [ "network", \&gst_parse_trivial, 0 ], # not supported.
|
|
|
|
|
# [ "gateway", \&gst_parse_sh, IFCFG, GATEWAY ], # not supported
|
|
|
|
@ -5203,12 +5203,12 @@ sub gst_network_get_interface_parse_table
|
|
|
|
|
[ "auto", \&gst_network_suse90_get_auto, IFCFG, STARTMODE ],
|
|
|
|
|
[ "bootproto", \&gst_network_parse_bootproto, IFCFG, BOOTPROTO ],
|
|
|
|
|
[ "address", \&gst_parse_sh, IFCFG, IPADDR ],
|
|
|
|
|
[ "nettqmask", \&gst_parse_sh, IFCFG, NETMASK ],
|
|
|
|
|
[ "netmask", \&gst_parse_sh, IFCFG, NETMASK ],
|
|
|
|
|
[ "remote_address", \&gst_parse_sh, IFCFG, REMOTE_IPADDR ],
|
|
|
|
|
[ "essid", \&gst_parse_sh, IFCFG, WIRELESS_ESSID ],
|
|
|
|
|
[ "key_type", \&gst_network_get_wep_key_type, [ \&gst_parse_sh, IFCFG, WIRELESS_KEY ]],
|
|
|
|
|
[ "key", \&gst_network_get_wep_key, [ \&gst_parse_sh, IFCFG, WIRELESS_KEY ]],
|
|
|
|
|
[ "gateway", \&gst_network_suse90_get_gateway, ROUTE_CONF, "%address%", "%nettqmask%" ],
|
|
|
|
|
[ "gateway", \&gst_network_suse90_get_gateway, ROUTE_CONF, "%address%", "%netmask%" ],
|
|
|
|
|
[ "gateway", \&gst_network_suse90_get_plip_gateway, ROUTE_CONF, "%remote_address%" ],
|
|
|
|
|
# Modem stuff goes here
|
|
|
|
|
[ "serial_port", \&gst_parse_sh, IFCFG, MODEM_DEVICE ],
|
|
|
|
@ -5252,7 +5252,7 @@ sub gst_network_get_interface_parse_table
|
|
|
|
|
# [ "name", \&gst_parse_sh, IFCFG, DEVICE ],
|
|
|
|
|
[ "dev", \&gst_parse_sh, IFCFG, DEVICE ],
|
|
|
|
|
[ "address", \&gst_network_pld10_get_ipaddr, IFCFG, IPADDR, "address" ],
|
|
|
|
|
[ "nettqmask", \&gst_network_pld10_get_ipaddr, IFCFG, IPADDR, "nettqmask" ],
|
|
|
|
|
[ "netmask", \&gst_network_pld10_get_ipaddr, IFCFG, IPADDR, "netmask" ],
|
|
|
|
|
# [ "broadcast", \&gst_parse_sh, IFCFG, BROADCAST ],
|
|
|
|
|
# [ "network", \&gst_parse_sh, IFCFG, NETWORK ],
|
|
|
|
|
[ "gateway", \&gst_parse_sh, IFCFG, GATEWAY ],
|
|
|
|
@ -5300,8 +5300,8 @@ sub gst_network_get_interface_parse_table
|
|
|
|
|
[ "user", \&gst_parse_trivial, 0 ], # not supported.
|
|
|
|
|
[ "dev", \&gst_parse_trivial, IFACE ],
|
|
|
|
|
[ "address", \&gst_parse_rcinet1conf, [RC_INET_CONF, IFACE], IPADDR ],
|
|
|
|
|
[ "nettqmask", \&gst_parse_rcinet1conf, [RC_INET_CONF, IFACE], NETMASK ],
|
|
|
|
|
[ "gateway", \&gst_network_get_gateway, RC_INET_CONF, GATEWAY, "%address%", "%nettqmask%" ],
|
|
|
|
|
[ "netmask", \&gst_parse_rcinet1conf, [RC_INET_CONF, IFACE], NETMASK ],
|
|
|
|
|
[ "gateway", \&gst_network_get_gateway, RC_INET_CONF, GATEWAY, "%address%", "%netmask%" ],
|
|
|
|
|
[ "auto", \&gst_network_slackware91_get_auto, [RC_INET, RC_LOCAL, IFACE]],
|
|
|
|
|
[ "bootproto", \&gst_network_slackware91_parse_bootproto, [RC_INET_CONF, IFACE]],
|
|
|
|
|
[ "essid", \&gst_parse_wireless_opts, [ WIRELESS, IFACE ], \&gst_network_get_wireless_ifaces, ESSID ],
|
|
|
|
@ -5348,7 +5348,7 @@ sub gst_network_get_interface_parse_table
|
|
|
|
|
[ "user", \&gst_parse_trivial, 0 ], # not supported.
|
|
|
|
|
[ "dev", \&gst_parse_trivial, IFACE ],
|
|
|
|
|
[ "address", \&gst_parse_confd_net_re, NET, "config_%dev%", "^[ \t]*([0-9\.]+)" ],
|
|
|
|
|
[ "nettqmask", \&gst_parse_confd_net_re, NET, "config_%dev%", "nettqmask[ \t]+([0-9\.]*)" ],
|
|
|
|
|
[ "netmask", \&gst_parse_confd_net_re, NET, "config_%dev%", "netmask[ \t]+([0-9\.]*)" ],
|
|
|
|
|
[ "remote_address", \&gst_parse_confd_net_re, NET, "config_%dev%", "dest_address[ \t]+([0-9\.]*)" ],
|
|
|
|
|
# [ "gateway", \&gst_parse_sh_re, NET, "gateway", "%dev%/([0-9\.\:]*)" ],
|
|
|
|
|
[ "gateway", \&gst_network_gentoo_parse_gateway, [ NET, IFACE ]],
|
|
|
|
@ -5396,15 +5396,15 @@ sub gst_network_get_interface_parse_table
|
|
|
|
|
# we need to double check these values both in the start_if and in the rc.conf files, in this order
|
|
|
|
|
[ "address", \&gst_parse_startif, STARTIF, "inet[ \t]+([0-9\.]+)" ],
|
|
|
|
|
[ "address", \&gst_parse_sh_re, RC_CONF, "ifconfig_%dev%", "inet[ \t]+([0-9\.]+)" ],
|
|
|
|
|
[ "nettqmask", \&gst_parse_startif, STARTIF, "nettqmask[ \t]+([0-9\.]+)" ],
|
|
|
|
|
[ "nettqmask", \&gst_parse_sh_re, RC_CONF, "ifconfig_%dev%", "nettqmask[ \t]+([0-9\.]+)" ],
|
|
|
|
|
[ "netmask", \&gst_parse_startif, STARTIF, "netmask[ \t]+([0-9\.]+)" ],
|
|
|
|
|
[ "netmask", \&gst_parse_sh_re, RC_CONF, "ifconfig_%dev%", "netmask[ \t]+([0-9\.]+)" ],
|
|
|
|
|
[ "remote_address", \&gst_parse_startif, STARTIF, "dest_address[ \t]+([0-9\.]+)" ],
|
|
|
|
|
[ "remote_address", \&gst_parse_sh_re, RC_CONF, "ifconfig_%dev%", "dest_address[ \t]+([0-9\.]+)" ],
|
|
|
|
|
[ "essid", \&gst_parse_startif, STARTIF, "ssid[ \t]+(\".*\"|[^\"][^ ]+)" ],
|
|
|
|
|
[ "essid", \&gst_parse_sh_re, RC_CONF, "ifconfig_%dev%", "ssid[ \t]+([^ ]*)" ],
|
|
|
|
|
# this is for plip interfaces
|
|
|
|
|
[ "gateway", \&gst_network_get_plip_gateway, RC_CONF, "defaultrouter", "%remote_address%" ],
|
|
|
|
|
[ "gateway", \&gst_network_get_gateway, RC_CONF, "defaultrouter", "%address%", "%nettqmask%" ],
|
|
|
|
|
[ "gateway", \&gst_network_get_gateway, RC_CONF, "defaultrouter", "%address%", "%netmask%" ],
|
|
|
|
|
[ "enabled", \&gst_network_interface_active, IFACE, \&gst_network_freebsd5_active_interfaces_get ],
|
|
|
|
|
[ "bootproto", \&gst_network_parse_bootproto, RC_CONF, "ifconfig_%dev%" ],
|
|
|
|
|
# Modem stuff
|
|
|
|
@ -5961,7 +5961,7 @@ sub gst_network_get_interface_replace_table
|
|
|
|
|
[ "dev", \&gst_replace_sh, IFCFG, NAME ],
|
|
|
|
|
[ "dev", \&gst_replace_sh, IFCFG, DEVICE ],
|
|
|
|
|
[ "address", \&gst_replace_sh, IFCFG, IPADDR ],
|
|
|
|
|
[ "nettqmask", \&gst_replace_sh, IFCFG, NETMASK ],
|
|
|
|
|
[ "netmask", \&gst_replace_sh, IFCFG, NETMASK ],
|
|
|
|
|
[ "broadcast", \&gst_replace_sh, IFCFG, BROADCAST ],
|
|
|
|
|
[ "network", \&gst_replace_sh, IFCFG, NETWORK ],
|
|
|
|
|
[ "gateway", \&gst_replace_sh, IFCFG, GATEWAY ],
|
|
|
|
@ -6020,7 +6020,7 @@ sub gst_network_get_interface_replace_table
|
|
|
|
|
[ "name", \&gst_replace_sh, IFCFG, NAME ],
|
|
|
|
|
[ "dev", \&gst_replace_sh, IFCFG, DEVICE ],
|
|
|
|
|
[ "address", \&gst_replace_sh, IFCFG, IPADDR ],
|
|
|
|
|
[ "nettqmask", \&gst_replace_sh, IFCFG, NETMASK ],
|
|
|
|
|
[ "netmask", \&gst_replace_sh, IFCFG, NETMASK ],
|
|
|
|
|
[ "broadcast", \&gst_replace_sh, IFCFG, BROADCAST ],
|
|
|
|
|
[ "network", \&gst_replace_sh, IFCFG, NETWORK ],
|
|
|
|
|
[ "gateway", \&gst_replace_sh, IFCFG, GATEWAY ],
|
|
|
|
@ -6082,7 +6082,7 @@ sub gst_network_get_interface_replace_table
|
|
|
|
|
[ "name", \&gst_replace_sh, IFCFG, NAME ],
|
|
|
|
|
[ "dev", \&gst_replace_sh, IFCFG, DEVICE ],
|
|
|
|
|
[ "address", \&gst_replace_sh, IFCFG, IPADDR ],
|
|
|
|
|
[ "nettqmask", \&gst_replace_sh, IFCFG, NETMASK ],
|
|
|
|
|
[ "netmask", \&gst_replace_sh, IFCFG, NETMASK ],
|
|
|
|
|
[ "broadcast", \&gst_replace_sh, IFCFG, BROADCAST ],
|
|
|
|
|
[ "network", \&gst_replace_sh, IFCFG, NETWORK ],
|
|
|
|
|
[ "gateway", \&gst_replace_sh, IFCFG, GATEWAY ],
|
|
|
|
@ -6142,7 +6142,7 @@ sub gst_network_get_interface_replace_table
|
|
|
|
|
[ "name", \&gst_replace_sh, IFCFG, NAME ],
|
|
|
|
|
[ "dev", \&gst_replace_sh, IFCFG, DEVICE ],
|
|
|
|
|
[ "address", \&gst_replace_sh, IFCFG, IPADDR ],
|
|
|
|
|
[ "nettqmask", \&gst_replace_sh, IFCFG, NETMASK ],
|
|
|
|
|
[ "netmask", \&gst_replace_sh, IFCFG, NETMASK ],
|
|
|
|
|
[ "broadcast", \&gst_replace_sh, IFCFG, BROADCAST ],
|
|
|
|
|
[ "network", \&gst_replace_sh, IFCFG, NETWORK ],
|
|
|
|
|
[ "gateway", \&gst_replace_sh, IFCFG, GATEWAY ],
|
|
|
|
@ -6202,7 +6202,7 @@ sub gst_network_get_interface_replace_table
|
|
|
|
|
[ "name", \&gst_replace_sh, IFCFG, NAME ],
|
|
|
|
|
[ "dev", \&gst_replace_sh, IFCFG, DEVICE ],
|
|
|
|
|
[ "address", \&gst_replace_sh, IFCFG, IPADDR ],
|
|
|
|
|
[ "nettqmask", \&gst_replace_sh, IFCFG, NETMASK ],
|
|
|
|
|
[ "netmask", \&gst_replace_sh, IFCFG, NETMASK ],
|
|
|
|
|
[ "broadcast", \&gst_replace_sh, IFCFG, BROADCAST ],
|
|
|
|
|
[ "network", \&gst_replace_sh, IFCFG, NETWORK ],
|
|
|
|
|
[ "gateway", \&gst_replace_sh, IFCFG, GATEWAY ],
|
|
|
|
@ -6262,7 +6262,7 @@ sub gst_network_get_interface_replace_table
|
|
|
|
|
[ "name", \&gst_replace_sh, IFCFG, NAME ],
|
|
|
|
|
[ "dev", \&gst_replace_sh, IFCFG, DEVICE ],
|
|
|
|
|
[ "address", \&gst_replace_sh, IFCFG, IPADDR ],
|
|
|
|
|
[ "nettqmask", \&gst_replace_sh, IFCFG, NETMASK ],
|
|
|
|
|
[ "netmask", \&gst_replace_sh, IFCFG, NETMASK ],
|
|
|
|
|
[ "broadcast", \&gst_replace_sh, IFCFG, BROADCAST ],
|
|
|
|
|
[ "network", \&gst_replace_sh, IFCFG, NETWORK ],
|
|
|
|
|
[ "gateway", \&gst_replace_sh, IFCFG, GATEWAY ],
|
|
|
|
@ -6324,7 +6324,7 @@ sub gst_network_get_interface_replace_table
|
|
|
|
|
[ "auto", \&gst_replace_interfaces_option_kw_not, [INTERFACES, IFACE], "noauto" ],
|
|
|
|
|
[ "name", \&gst_replace_interfaces_option_str, [INTERFACES, IFACE], "name" ],
|
|
|
|
|
[ "address", \&gst_replace_interfaces_option_str, [INTERFACES, IFACE], "address" ],
|
|
|
|
|
[ "nettqmask", \&gst_replace_interfaces_option_str, [INTERFACES, IFACE], "nettqmask" ],
|
|
|
|
|
[ "netmask", \&gst_replace_interfaces_option_str, [INTERFACES, IFACE], "netmask" ],
|
|
|
|
|
[ "broadcast", \&gst_replace_interfaces_option_str, [INTERFACES, IFACE], "broadcast" ],
|
|
|
|
|
[ "network", \&gst_replace_interfaces_option_str, [INTERFACES, IFACE], "network" ],
|
|
|
|
|
[ "gateway", \&gst_replace_interfaces_option_str, [INTERFACES, IFACE], "gateway" ],
|
|
|
|
@ -6372,7 +6372,7 @@ sub gst_network_get_interface_replace_table
|
|
|
|
|
[ "bootproto", \&gst_network_deb22_replace_bootproto, [INTERFACES, IFACE]],
|
|
|
|
|
[ "auto", \&gst_network_debian_woody_set_auto, [INTERFACES, IFACE]],
|
|
|
|
|
[ "address", \&gst_replace_interfaces_option_str, [INTERFACES, IFACE], "address" ],
|
|
|
|
|
[ "nettqmask", \&gst_replace_interfaces_option_str, [INTERFACES, IFACE], "nettqmask" ],
|
|
|
|
|
[ "netmask", \&gst_replace_interfaces_option_str, [INTERFACES, IFACE], "netmask" ],
|
|
|
|
|
[ "gateway", \&gst_replace_interfaces_option_str, [INTERFACES, IFACE], "gateway" ],
|
|
|
|
|
[ "essid", \&gst_replace_interfaces_option_str, [INTERFACES, IFACE], "wireless-essid" ],
|
|
|
|
|
[ "key", \&gst_replace_interfaces_option_str, [INTERFACES, IFACE], "wireless-key" ],
|
|
|
|
@ -6432,7 +6432,7 @@ sub gst_network_get_interface_replace_table
|
|
|
|
|
[ "name", \&gst_network_suse70_replace_iface_sh, [IFCFG, IFACE], GST_IFACE_NAME ],
|
|
|
|
|
[ "address", \&gst_network_suse70_replace_iface_sh, [IFCFG, IFACE], IPADDR ],
|
|
|
|
|
[ "address", \&gst_network_suse70_set_ifconfig_ip, [IFCFG, IFACE] ],
|
|
|
|
|
[ "nettqmask", \&gst_network_suse70_set_ifconfig_arg, [IFCFG, IFACE], nettqmask ],
|
|
|
|
|
[ "netmask", \&gst_network_suse70_set_ifconfig_arg, [IFCFG, IFACE], netmask ],
|
|
|
|
|
[ "broadcast", \&gst_network_suse70_set_ifconfig_arg, [IFCFG, IFACE], broadcast ],
|
|
|
|
|
# [ "network", \&gst_parse_trivial, 0 ], # not supported.
|
|
|
|
|
# [ "gateway", \&gst_parse_sh, IFCFG, GATEWAY ], # not supported
|
|
|
|
@ -6458,7 +6458,7 @@ sub gst_network_get_interface_replace_table
|
|
|
|
|
[ "auto", \&gst_network_suse90_set_auto, IFCFG, STARTMODE ],
|
|
|
|
|
[ "bootproto", \&gst_network_suse90_replace_bootproto, IFCFG, BOOTPROTO ],
|
|
|
|
|
[ "address", \&gst_replace_sh, IFCFG, IPADDR ],
|
|
|
|
|
[ "nettqmask", \&gst_replace_sh, IFCFG, NETMASK ],
|
|
|
|
|
[ "netmask", \&gst_replace_sh, IFCFG, NETMASK ],
|
|
|
|
|
[ "remote_address", \&gst_replace_sh, IFCFG, REMOTE_IPADDR ],
|
|
|
|
|
[ "essid", \&gst_replace_sh, IFCFG, WIRELESS_ESSID ],
|
|
|
|
|
[ "key", \&gst_replace_sh, IFCFG, WIRELESS_KEY ],
|
|
|
|
@ -6506,7 +6506,7 @@ sub gst_network_get_interface_replace_table
|
|
|
|
|
# [ "name", \&gst_replace_sh, IFCFG, NAME ],
|
|
|
|
|
[ "dev", \&gst_replace_sh, IFCFG, DEVICE ],
|
|
|
|
|
[ "address", \&gst_network_pld10_set_ipaddr, IFCFG, IPADDR, "address" ],
|
|
|
|
|
[ "nettqmask", \&gst_network_pld10_set_ipaddr, IFCFG, IPADDR, "nettqmask" ],
|
|
|
|
|
[ "netmask", \&gst_network_pld10_set_ipaddr, IFCFG, IPADDR, "netmask" ],
|
|
|
|
|
# [ "broadcast", \&gst_replace_sh, IFCFG, BROADCAST ],
|
|
|
|
|
# [ "network", \&gst_replace_sh, IFCFG, NETWORK ],
|
|
|
|
|
[ "gateway", \&gst_replace_sh, IFCFG, GATEWAY ],
|
|
|
|
@ -6551,7 +6551,7 @@ sub gst_network_get_interface_replace_table
|
|
|
|
|
table =>
|
|
|
|
|
[
|
|
|
|
|
[ "address", \&gst_replace_rcinet1conf, [ RC_INET_CONF, IFACE ], IPADDR ],
|
|
|
|
|
[ "nettqmask", \&gst_replace_rcinet1conf, [ RC_INET_CONF, IFACE ], NETMASK ],
|
|
|
|
|
[ "netmask", \&gst_replace_rcinet1conf, [ RC_INET_CONF, IFACE ], NETMASK ],
|
|
|
|
|
[ "gateway", \&gst_replace_rcinet1conf_global, RC_INET_CONF, GATEWAY ],
|
|
|
|
|
[ "bootproto", \&gst_network_slackware91_replace_bootproto, [ RC_INET_CONF, IFACE ] ],
|
|
|
|
|
[ "auto", \&gst_network_slackware91_set_auto, [ RC_INET, RC_LOCAL, IFACE ] ],
|
|
|
|
@ -6603,7 +6603,7 @@ sub gst_network_get_interface_replace_table
|
|
|
|
|
[ "bootproto", \&gst_network_gentoo_replace_bootproto, [ NET, IFACE ]],
|
|
|
|
|
[ "address", \&gst_replace_confd_net_re, NET, "config_%dev%", "^[ \t]*([0-9\.]+)" ],
|
|
|
|
|
[ "address", \&gst_replace_confd_net_re, NET, "config_%dev%", "^[ \t]*([0-9\.]+)" ],
|
|
|
|
|
[ "nettqmask", \&gst_replace_confd_net_re, NET, "config_%dev%", "[ \t]+nettqmask[ \t]+[0-9\.]*", " nettqmask %nettqmask%"],
|
|
|
|
|
[ "netmask", \&gst_replace_confd_net_re, NET, "config_%dev%", "[ \t]+netmask[ \t]+[0-9\.]*", " netmask %netmask%"],
|
|
|
|
|
[ "broadcast", \&gst_replace_confd_net_re, NET, "config_%dev%", "[ \t]+broadcast[ \t]+[0-9\.]*", " broadcast %broadcast%" ],
|
|
|
|
|
[ "remote_address", \&gst_replace_confd_net_re, NET, "config_%dev%", "[ \t]+dest_address[ \t]+[0-9\.]*", " dest_address %remote_address%" ],
|
|
|
|
|
[ "gateway", \&gst_replace_confd_net_re, NET, "routes_%dev%", "[ \t]*default[ \t]+(via|gw)[ \t]+[0-9\.\:]*", "default via %gateway%" ],
|
|
|
|
@ -6648,7 +6648,7 @@ sub gst_network_get_interface_replace_table
|
|
|
|
|
[ "auto", \&gst_network_freebsd5_set_auto, [ RC_CONF, IFACE ]],
|
|
|
|
|
[ "bootproto", \&gst_network_freebsd5_replace_bootproto, [ RC_CONF, IFACE ]],
|
|
|
|
|
[ "address", \&gst_replace_sh_re, RC_CONF, "ifconfig_%dev%", "inet[ \t]+([0-9\.]+)", "inet %address%" ],
|
|
|
|
|
[ "nettqmask", \&gst_replace_sh_re, RC_CONF, "ifconfig_%dev%", "nettqmask[ \t]+([0-9\.]+)", " nettqmask %nettqmask%" ],
|
|
|
|
|
[ "netmask", \&gst_replace_sh_re, RC_CONF, "ifconfig_%dev%", "netmask[ \t]+([0-9\.]+)", " netmask %netmask%" ],
|
|
|
|
|
[ "remote_address", \&gst_replace_sh_re, RC_CONF, "ifconfig_%dev%", "dest_address[ \t]+([0-9\.]+)", " dest_address %remote_address%" ],
|
|
|
|
|
[ "essid", \&gst_network_freebsd5_replace_essid, [ RC_CONF, STARTIF, IFACE ]],
|
|
|
|
|
# Modem stuff
|
|
|
|
|