Softpedia
 


LINUX CATEGORIES:



GLOBAL PAGES >>
NEWS ARCHIVE >>
SOFTPEDIA REVIEWS >>
MEET THE EDITORS >>
WEEK'S BEST
  • Linux Kernel 3.9.2 / 3....
  • LibreOffice 3.6.6 / 4.0.3
  • MPlayer 1.1.1
  • systemd 204
  • Arch Linux 2013.05.01
  • Blender 2.67
  • KDE Software Compilatio...
  • CrunchBang Linux Stable...
  • Elementary OS 0.1 / 0.2...
  • SystemRescueCd 3.6.0
  • Home > Linux > Programming > Perl Modules

    RDR::Collector 1.0000

    Download button

    No screenshots available
    Downloads: 449  Tell us about an update
    User Rating:
    Rated by:
    NOT RATED
    0 user(s)
    Developer:

    License / Price:

    Last Updated:

    Category:
    Andrew S. Kennedy | More programs
    Perl Artistic License / FREE
    July 22nd, 2009, 17:33 GMT
    ROOT / Programming / Perl Modules

     Read user reviews (0)  Refer to a friend  Subscribe

    RDR::Collector description

    Collect RDRv1 packets

    RDR::Collector is a Perl module designed to capture and process raw RDR packets from a Cisco SCE series device.

    The configuration for the SCE device is very simple and consists of one line of configuration per priority.

    An example configuration is shown below

     RDR-formatter forwarding-mode multicast
     RDR-formatter destination 192.168.1.1 port 33110 category number 1 priority 70
     RDR-formatter destination 192.168.1.1 port 33120 category number 2 priority 70
     RDR-formatter destination 192.168.1.1 port 33130 category number 3 priority 70
     RDR-formatter destination 192.168.1.1 port 33140 category number 4 priority 70

    The RDR collector is not designed to accept multiple connections so each priority needs to be sent to a different port. You then need to set up a receiver on 4 different ports (run the example script 4 times) so you can collect the RDRs. In the example above the collecting host is on IP 192.168.1.1. Alternatively if you have multiple SCE devices then you need to configure each one to send to different ports.

    An example on how to use this module is shown below. It is relatively simple and sets up a listening port bound to the IP and Port specified.

     #!/usr/bin/perl

     use strict;
     use RDR::Collector;
     use IO::File;

     my $rdr_client = new RDR::Collector(
     [
     ServerIP => '192.168.1.1',
     ServerPort => '10000',
     Timeout => 2,
     DataHandler => &display_data
     ]
     );

     # Setup the local RDR listener
     my $status = $rdr_client->connect();

     # If we could not listen tell us why.
     if ( !$status )
     {
     print "Status was '".$rdr_client->return_status()."'
    ";
     print "Error was '".$rdr_client->return_error()."'
    ";
     exit(0);
     }

     # Now just wait for RDR data.
     $rdr_client->check_data_available();

     exit(0);

     # This routine is called from DataHandler when the module
     # instance is initialised.
     # 4 parameters are returned, internal ref, remote IP, remote Port and
     # the raw data
     sub display_data
     {
     my ( $glob ) = shift;
     my ( $remote_ip ) = shift;
     my ( $remote_port ) = shift;
     my ( $data ) = shift;
     my $attribute_line;
     my $data_line;
     my @keys = keys %{$data};
     foreach my $key_name ( @keys )
     {
     $attribute_line.="$key_name,";
     $data_line.=${$data}{$key_name}.",";
     }
     print "#$attribute_line
    ";
     print "$data_line
    ";
     }


    This is the most basic way to access the data. There are multiple scripts in the examples directory which will allow you to collect and process the RDR data.


    Product's homepage

    Requirements:

    · Perl

      


    TAGS:

    RDRv1 collector | packet collector | Perl module | RDRv1 | collector | Perl

    Go to top

    WindowsGamesDriversMacLinuxScriptsMobileHandheldNews

    SUBMIT PROGRAM   |   ADVERTISE   |   GET HELP   |   SEND US FEEDBACK   |   RSS FEEDS   |   UPDATE YOUR SOFTWARE   |   ROMANIAN FORUM