\n";
# Comment, if allowed
if (defined(&can_iface_desc) && &can_iface_desc($b)) {
print " | $text{'ifcs_desc'} | \n";
print "",
&ui_textbox("desc", $b ? $b->{'desc'} : undef, 60),
" | \n";
}
# Interface name
print " | $text{'ifcs_name'} | \n";
if ($in{'new'} && $in{'virtual'}) {
print "\n";
print "$in{'virtual'}:\n";
}
elsif ($in{'new'}) {
if($in{'vlan'} == 1) {
print "auto";
print ""
} else {
print "\n";
}
}
else {
print "$b->{'fullname'}\n";
}
print " | \n";
# IP address
print "$text{'ifcs_ip'} | \n";
$virtual = (!$b && $in{'virtual'}) || ($b && $b->{'virtual'} ne "");
$dhcp = &can_edit("dhcp") && !$virtual;
$bootp = &can_edit("bootp") && !$virtual;
if ($dhcp) {
printf " %s\n",
$b && $b->{'dhcp'} ? "checked" : "", $text{'ifcs_dhcp'};
}
if ($bootp) {
printf " %s\n",
$b && $b->{'bootp'} ? "checked" : "", $text{'ifcs_bootp'};
}
if ($dhcp || $bootp) {
printf " %s\n",
!$b || (!$b->{'bootp'} && !$b->{'dhcp'}) ? "checked" : "",
$text{'ifcs_static'};
}
else {
print "\n";
}
printf " | \n",
$b && !$b->{'bootp'} && !$b->{'dhcp'} ? $b->{'address'} : "";
# Netmask
print " | $text{'ifcs_mask'} | \n";
if ($in{'virtual'} && $in{'new'} && $virtual_netmask) {
# Virtual netmask cannot be edited
print "$virtual_netmask | \n";
}
elsif (&can_edit("netmask", $b) && $access{'netmask'}) {
printf " | \n",
$b ? $b->{'netmask'} : $config{'def_netmask'};
}
else {
printf "%s | \n", $b ? $b->{'netmask'} : $text{'ifcs_auto'};
}
print "$text{'ifcs_broad'} | \n";
if (&can_edit("broadcast", $b) && $access{'broadcast'}) {
printf " | \n",
$b ? $b->{'broadcast'} : $config{'def_broadcast'};
}
else {
printf "%s | \n", $b ? $b->{'broadcast'}
: $text{'ifcs_auto'};
}
print " | $text{'ifcs_mtu'} | \n";
if (&can_edit("mtu", $b) && $access{'mtu'}) {
printf " | \n",
$b ? $b->{'mtu'} : $config{'def_mtu'};
}
else {
printf "%s | \n", $b && $b->{'mtu'} ? $b->{'mtu'}
: $text{'ifcs_auto'};
}
print "$text{'ifcs_act'} | \n";
if (&can_edit("up", $b) && $access{'up'}) {
printf " $text{'yes'}\n",
!$b || $b->{'up'} ? "checked" : "";
printf " $text{'no'} | \n",
$b && !$b->{'up'} ? "checked" : "";
}
else {
printf "%s | \n",
!$b ? $text{'yes'} :
$b->{'up'} ? $text{'yes'} : $text{'no'};
}
print " | \n";
if ($b && $b->{'virtual'} eq "") {
print "$text{'ifcs_virts'} | \n";
$vcount = 0;
foreach $vb (@boot) {
if ($vb->{'virtual'} ne "" && $vb->{'name'} eq $b->{'name'}) {
$vcount++;
}
}
print "$vcount\n";
if ($access{'virt'} && !$noos_support_add_virtifcs) {
print "(",
"$text{'ifcs_addvirt'})\n";
}
print " | \n";
}
print " \n";
# Special parameters for teaming
print "\n";
if($in{'bond'} or (&iface_type($b->{'name'}) eq 'Bonded')) {
# Select bonding teampartner
print "| $text{'bonding_teamparts'} | \n";
print "\n";
print "";
print " | \n";
@mode = ("balance-rr", "activebackup", "balance-xor", "broadcast", "802.3ad", "balance-tlb", "balance-alb");
# Select teaming mode
print "$text{'bonding_teammode'} | \n";
print "\n";
print "\n";
print " | \n";
print " \n";
# Select mii Monitoring Interval
print "| $text{'bonding_miimon'} | \n";
print "\n";
print "{'miimon'} . "\"/> ms\n";
print " | \n";
# Select updelay
print "$text{'bonding_updelay'} | \n";
print "\n";
print "{'updelay'} . "\" /> ms\n";
print " | \n";
print " \n";
print "\n";
# Select downdelay
print "| $text{'bonding_downdelay'} | \n";
print "\n";
print "{'downdelay'} . "\" /> ms\n";
print " | \n";
}
print " \n";
# Special Parameter for vlan tagging
if(($in{'vlan'}) or (&iface_type($b->{'name'}) =~ /^(.*) (VLAN)$/)) {
$b->{'name'} =~ /(\S+)\.(\d+)/;
$physical = $1;
$vlanid = $2;
print "\n";
print "| $text{'vlan_physical'} | \n";
print "\n";
if(!$in{'new'}) {
print "$physical";
print "\n";
} else {
print "";
}
print " | \n";
print "VLAN-ID | \n";
print "\n";
if(!$in{'new'}) {
print "$vlanid";
print "\n";
} else {
print "\n";
print " | \n";
}
print " |