Author image Andre Rodrigues Viegas

NAME

Net::GrpNetworks - Perl extension to determine in which network group a IP belongs to.

SYNOPSIS

  use Net::GrpNetworks;

  $grpnet = new Net::GrpNetworks();

  $grpnet->add(group name, network block, netmask);
  $GroupName = $grpnet->find(IP); 

DESCRIPTION

Net::GrpNetworks creates network groups and allows researching for specific IPs discovering in which network group each IP belongs to.

For example:

  use Net::GrpNetworks;

  $grpnet = new Net::GrpNetworks();

  $grpnet->add("New York", "210.210.10.0", "255.255.255.0");
  $grpnet->add("New York", "210.210.11.0", "255.255.255.0");
  $grpnet->add("New York", "210.210.12.0", "255.255.254.0");
  $grpnet->add("Rio de Janeiro", "200.255.49.128", "255.255.255.128");
  $grpnet->add("Rio de Janeiro", "200.255.50.0", "255.255.252.0");
  $grpnet->add("Rio de Janeiro", "200.255.60.0", "255.255.255.0");

  $City = $grpnet->find("200.255.60.10");  # $City will be set to "Rio de Janeiro"
  if ( $City = $grpnet->find("210.210.9.5") ) # Will be false

COPYRIGHT

    Copyright (c) 1997 Andre Rodrigues Viegas. All rights reserved. This
    program is free software; you can redistribute it and/or modify it
    under the same terms as Perl itself. 

AUTHOR

Andre R. Viegas, andre.viegas@writeme.com.br