@@ -, +, @@ &showMenu(); Delete('showmenu'); &showMenu(self_url()); my @args = @_; my ($err1, $err2); unless( $debug ) { RRDs::graph( '-', @args); } else { } my ($imgurl) = @_; my $q = new CGI::Pretty(""); # Avoid inheriting the parameter list print $q->header, $q->start_html( -title => 'Generate FlowScan graphs on the fly', print $q->center( $q->img({ -src => $imgurl, -align => 'center', print $q->start_form( -action => $q->url(), -method => 'get' ); # Just the url, without query string print $q->start_table( { -align => 'center', print $q->start_Tr( { -align => 'center', print $q->td( { -rowspan => '2' }, my %hours = ( 24 => '24 hours', print $q->td( { -align => 'right' }, print $q->td( { -rowspan => '2' }, print $q->td( { -rowspan => '2' }, print $q->td( { -rowspan => '2' }, print $q->end_Tr(); print $q->start_Tr( { -align => 'center' } ); print $q->td( { -align => 'right' }, print $q->end_Tr(); print $q->end_table(); print $q->start_table( { align => 'center', print $q->Tr( { -align => 'center' }, foreach my $router ( 'all', sort &getRouterList() ) { } print $q->end_table(); print $q->br; print $q->hidden('showmenu','1'); print $q->center( $q->submit( -name => '', print $q->end_form; print $q->end_html; exit; print header; print start_html(-title => 'Error Occurred', print '
', "\n";
    print @_;
    print "\n", '
', "\n"; exit; if( param('imageType') ) { } if( !param('router') ) { } # XXX how much is tainting a problem? .. attacks, etc else { } if( param('hours') ) { } if( param('duration') ) { } else { $duration = $hours; } if( param('width') ) { } if( param('height') ) { } foreach my $r (@router) { } if( param('debug') && param('debug') eq '1' ) { } else { $debug = 0 } defined param('report') or &browserDie( "You must specify report type" ); return &generateImage( &io_report( param('report'), param('legend') ) ); foreach my $r (@router) { } foreach my $r (@router) { } foreach my $r (@router) { } # Networks are only in the all category, for total traffic if( param("all_network") ) { } foreach my $n ( param("all_network") ) { } foreach my $r (@router) { } # "nice" colors. taken from Packeteer PacketShaper's web interface # (via Dave Plonka) and other places my @safe_colors = ( 0x746FAE, # lavender 0xB8860B, # dark goldenrod 0xCCFFFF, # lt. cyan 0x660066, # purple 0xFF6666, # orange 0x0066CC, # med. blue 0xCCCCFF, # pale lavender 0x000066, # dk. blue 0x0000FF, # blue 0xFFFF00 # yellow ); foreach my $r (@router) { } my $color = shift @{$_[0]}; push @{$_[0]}, $color; return sprintf('#%06x', $color); opendir( DIR, $rrddir ) or &browserDie("open $rrddir failed ($!)"); @_ = grep { /^protocol_.*\.rrd$/ } readdir( DIR ); closedir DIR; foreach (@_) { } return @_; opendir( DIR, $rrddir ) or &browserDie("open $rrddir failed ($!)"); @_ = grep { /^service_.*_src\.rrd$/ } readdir( DIR ); closedir DIR; foreach (@_) { } return @_; opendir( DIR, $rrddir ) or &browserDie("open $rrddir failed ($!)"); @_ = grep { /^tos_.*\.rrd$/ } readdir( DIR ); closedir DIR; foreach (@_) { } return @_; opendir( DIR, $rrddir ) or &browserDie("open $rrddir failed ($!)"); @_ = grep { /^as_.*\.rrd$/ } readdir( DIR ); closedir DIR; foreach (@_) { } return @_; opendir( DIR, $rrddir ) or &browserDie("open $rrddir failed ($!)"); @_ = grep { /^network_.*\.rrd$/ } readdir( DIR ); closedir DIR; foreach (@_) { } return @_; opendir( DIR, $rrddir ) or &browserDie("open $rrddir failed ($!)"); while( $_ = readdir( DIR ) ) { } closedir DIR; return @_; my $def = shift; return $def if $debug; unless( exists $cdef{$def} ) { } return $cdef{$def}; my $labelLength = 15; my $s = shift; my $txt = shift; return uc($s) . ' ' x ($labelLength - length $s) . $txt; my $labelLength = 47; my $p = shift; return uc($p) . ' ' x ($labelLength - length $p); my $labelLength = 51; my $label = shift; my $format = shift; return $label . ' ' x ($labelLength - length $label) . $format; my $reportType = shift; my $legend = shift; my @args; my $str; unless( exists $reportName{$reportType} ) { } push @args, ('--interlaced', push @args, '--no-legend' unless($legend); # CDEF for total foreach my $r (@router) { } # CDEFs for each service foreach my $r (@router) { } # CDEFs for service by percentage foreach my $r (@router) { } # CDEFs for each protocol foreach my $r (@router) { } # CDEFs for protocol by percentage foreach my $r (@router) { } # CDEFs for each AS foreach my $r (@router) { } # CDEFs for AS by percentage foreach my $r (@router) { } # CDEFs for each TOS foreach my $r (@router) { } # CDEFs for TOS by percentage foreach my $r (@router) { } # CDEFs for each network foreach my $n ( @{$network{'all'}} ) { } # CDEFs for network by percentage if( scalar @{$network{'all'}} ) { } # Graph commands my $count; foreach my $r (@router) { } push @args, 'HRULE:0#000000'; return @args;