\n";
($iface, @nets) = &get_nat($nat2_file);
@maps = grep { ref($_) } @nets;
@nets = grep { !ref($_) } @nets;
print " $text{'nat_desc'} | \n";
printf " %s \n",
$iface ? "" : "checked", $text{'nat_disabled'};
printf " %s\n",
$iface ? "checked" : "", $text{'nat_enabled'};
print &iface_input("iface", $iface);
print " | \n";
print " $text{'nat_nets'} | \n";
print "\n";
$i = 0;
foreach $n ((grep { $_ !~ /^\!/ } @nets), undef, undef, undef) {
print " ",&group_input("net_$i", $n, 1)," | \n";
$i++;
}
print " | \n";
print "$text{'nat_excl'} | \n";
print "\n";
$i = 0;
foreach $n ((grep { $_ =~ /^\!/ } @nets), undef, undef, undef) {
print " ",&group_input("excl_$i", $n =~ /^\!(.*)/ ? $1 : undef, 1)," | \n";
$i++;
}
print " | \n";
print " $text{'nat_maps'}",
" $text{'nat_mapsdesc'} | \n";
print "\n";
print " $text{'nat_ext'} | ",
"$text{'nat_int'} | ",
"$text{'nat_virt'} | \n";
$i = 0;
foreach $m (@maps, [ ], [ ], [ ]) {
print "\n";
printf " | \n",
$i, $m->[0];
printf " | \n",
$i, $m->[1];
print "",&iface_input("virt_$i", $m->[2], 1, 1, 1)," | \n";
print " \n";
$i++;
}
print " | \n";
print " |