+#Establish simple filtering&sorting boxes on top of table
+
+our %cgiparams;
+&Header::getcgihash(\%cgiparams);
+
+my @list_proto = ($Lang::tr{'all'}, 'icmp', 'udp', 'tcp');
+my @list_state = ($Lang::tr{'all'}, 'SYN_SENT', 'SYN_RECV', 'ESTABLISHED', 'FIN_WAIT',
+ 'CLOSE_WAIT', 'LAST_ACK', 'TIME_WAIT', 'CLOSE', 'LISTEN');
+my @list_mark = ($Lang::tr{'all'}, '[ASSURED]', '[UNREPLIED]');
+my @list_sort = ('orgsip','protocol', 'expires', 'status', 'orgdip', 'orgsp',
+ 'orgdp', 'exsip', 'exdip', 'exsp', 'exdp', 'marked');
+
+# init or silently correct unknown value...
+if ( ! grep ( /^$cgiparams{'SEE_PROTO'}$/ , @list_proto )) { $cgiparams{'SEE_PROTO'} = $list_proto[0] };
+if ( ! grep ( /^$cgiparams{'SEE_STATE'}$/ , @list_state )) { $cgiparams{'SEE_STATE'} = $list_state[0] };
+if ( ($cgiparams{'SEE_MARK'} ne $Lang::tr{'all'}) && # ok the grep should work but it doesn't because of
+ ($cgiparams{'SEE_MARK'} ne '[ASSURED]') && # the '[' & ']' interpreted as list separator.
+ ($cgiparams{'SEE_MARK'} ne '[UNREPLIED]') # So, explicitly enumerate items.
+ ) { $cgiparams{'SEE_MARK'} = $list_mark[0] };
+if ( ! grep ( /^$cgiparams{'SEE_SORT'}$/ , @list_sort )) { $cgiparams{'SEE_SORT'} = $list_sort[0] };
+# *.*.*.* or a valid IP
+if ( $cgiparams{'SEE_SRC'} !~ /^(\*\.\*\.\*\.\*\.|\d+\.\d+\.\d+\.\d+)$/) { $cgiparams{'SEE_SRC'} = '*.*.*.*' };
+if ( $cgiparams{'SEE_DEST'} !~ /^(\*\.\*\.\*\.\*\.|\d+\.\d+\.\d+\.\d+)$/) { $cgiparams{'SEE_DEST'} = '*.*.*.*' };
+
+
+our %entries = (); # will hold the lines analyzed correctly
+my $unknownlines = ''; # should be empty all the time...
+my $index = 0; # just a counter to make unique entryies in entries
+