++ed by:
ABRAXXA DCPETROV MMUSGROVE POTATOGIM HANENKAMP
2 non-PAUSE users
Author image Michael Robinton

$rv=list2NetAddr(\@inlist,\@NAobject);

Build of NetAddr object structure from a list of IPv4 addresses or address ranges. This object is passed to matchNetAddr to check if a given IP address is contained in the list.

  input:        array reference pointer
                to a list of addresses

  i.e.          11.22.33.44
                11.22.33.0/24
                11.22.33.0/255.255.255.0
                11.22.33.20-11.22.33.46
                11.22.33.20 - 11.22.33.46

  output:       Number of objects created
                or undef on error

The NAobject array is filled with NetAddr::IP::Lite object references.

$rv = matchNetAddr($ip,\@NAobject);

Check if an IP address appears in a list of NetAddr objects.

  input:        dot quad IP address,
                reference to NetAddr objects
  output:       true if match else false