\n";
+ print &ui_subheading($text{'open_header2'});
- print " | $text{'open_type'} | ",
- "$text{'open_proto'} | ",
- "$text{'open_fd'} | ",
- "$text{'open_desc'} | \n";
+ print &ui_columns_start([ $text{'open_type'},
+ $text{'open_proto'},
+ $text{'open_fd'},
+ $text{'open_desc'} ], 100, 0,
+ [ "", "", "", "colspan=4" ]);
foreach $n (@nets) {
- print "\n";
- print "| ",uc($n->{'type'})," | \n";
- print "",uc($n->{'proto'})," | \n";
- print "",$n->{'fd'}," | \n";
+ @cols = ( uc($n->{'type'}),
+ uc($n->{'proto'}),
+ $n->{'fd'} );
+ @tds = ( "", "", "" );
if ($n->{'listen'} && $n->{'lhost'} eq '*') {
- print "",
- &text('open_listen1', "$n->{'lport'}"),
- " | \n";
+ push(@cols, &text('open_listen1',
+ "$n->{'lport'}"));
+ push(@tds, "colspan=4");
}
elsif ($n->{'listen'}) {
- print "",
- &text('open_listen2', "$n->{'lhost'}",
- "$n->{'lport'}")," | \n";
+ push(@cols, &text('open_listen2',
+ "$n->{'lhost'}",
+ "$n->{'lport'}"));
+ push(@tds, "colspan=4");
}
elsif ($n->{'rhost'}) {
- print "$n->{'lhost'}:$n->{'lport'} | \n";
- print "-> | \n";
- print "$n->{'rhost'}:$n->{'rport'} | \n";
- print "$n->{'state'} | \n";
+ push(@cols, "$n->{'lhost'}:$n->{'lport'}",
+ "->",
+ "$n->{'rhost'}:$n->{'rport'}",
+ "$n->{'state'}");
}
else {
- print "",
- &text('open_recv', "$n->{'lhost'}",
- "$n->{'lport'}")," | \n";
+ push(@cols, &text('open_recv', "$n->{'lhost'}",
+ "$n->{'lport'}"));
+ push(@tds, "colspan=4");
}
- print " \n";
+ print &ui_columns_row(\@cols, \@tds);
}
- print " |