IPDR::Process::XDR - IPDR XDR Prcoessing Client
Version 0.41
This is an IPDR module primarily written to process XDR files.
It is not very pretty code, nor perhaps the best approach for some of the code, but it does work and will hopefully save time for other people attempting to decode the IPDR/XDR files.
An example on how to use this module is shown below. It is relatively simple use the different module for Cisco, all others use Client.
#!/usr/local/bin/perl use strict; use IPDR::Process::XDR; my $ipdr_client = new IPDR::Process::XDR ( [ DataHandler => \&display_data, SourceFile => 'source_file.xdr' ] ); # Run the decode. $ipdr_client->decode_file(); exit(0); sub display_data { my ( $data ) = shift; my ( $self ) = shift; foreach my $sequence ( sort { $a<=>$b } keys %{$data} ) { print "Sequence is '$sequence'\n"; foreach my $attribute ( keys %{${$data}{$sequence}} ) { print "Sequence '$sequence' attribute '$attribute'"; print " value '${$data}{$sequence}{$attribute}'\n"; } } }
This is the only way to current access the XDR records.
The new construct builds an object ready to used by the rest of the module and can be passed the following varaibles
DataHandler - This MUST be set and a pointer to a function (see example) SourceFile - The filename of the source XDR file. DEBUG - Set at your peril, 5 being the highest value.
An example of using new is
my $ipdr_client = new IPDR::Process::XDR ( [ DataHandler => \&display_data, SourceFile => 'source_file.xdr' ] );
This runs the decode routine.
The remaining of the functions should never be called and are considered internal only.
XDR File Location http://www.ipdr.org/public/DocumentMap/XDR3.6.pdf
Andrew S. Kennedy, <shamrock at cpan.org>
<shamrock at cpan.org>
Please report any bugs or feature requests to bug-ipdr-cisco at rt.cpan.org, or through the web interface at http://rt.cpan.org/NoAuth/ReportBug.html?Queue=IPDR-Process-XDR. I will be notified, and then you'll automatically be notified of progress on your bug as I make changes.
bug-ipdr-cisco at rt.cpan.org
You can find documentation for this module with the perldoc command.
perldoc IPDR::Process::XDR
You can also look for information at:
AnnoCPAN: Annotated CPAN documentation
http://annocpan.org/dist/IPDR-Process-XDR
CPAN Ratings
http://cpanratings.perl.org/d/IPDR-Process-XDR
RT: CPAN's request tracker
http://rt.cpan.org/NoAuth/Bugs.html?Dist=IPDR-Process-XDR
Search CPAN
http://search.cpan.org/dist/IPDR-Process-XDR
Thanks to http://www.streamsolutions.co.uk/ for my Flash Streaming Server
Copyright 2011 Andrew S. Kennedy, all rights reserved.
This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself.
To install IPDR, copy and paste the appropriate command in to your terminal.
cpanm
cpanm IPDR
CPAN shell
perl -MCPAN -e shell install IPDR
For more information on module installation, please visit the detailed CPAN module installation guide.