BGPmon-CPM-Prefix-Finder-1

 view release on metacpan or  search on metacpan

lib/BGPmon/CPM/Prefix/Finder.pm  view on Meta::CPAN

Input: source and netname
Output: array of prefixes

=cut
sub netname2prefixes{
  my $source = shift;
  my $netname = shift;

  my $ua = LWP::UserAgent->new;
  my $res = $ua->get("http://apps.db.ripe.net/whois/grs-search?" .
                     "&type-filter=inetnum&type-filter=inet6num" .
                     "&source=$source-grs&query-string=$netname" .
                     "&flags=Cr",'Accept'=>'application/json');
  my $res_struct = decode_json($res->content);
  print Dumper($res_struct);
}

=head2 orghandle2nets

Input: orghandle
Output: array of nets



( run in 0.294 second using v1.01-cache-2.11-cpan-87723dcf8b7 )