NAME
IPDevice::RouterBase::PrefixlistEntry
SYNOPSIS
use IPDevice::RouterBase::PrefixlistEntry;
my $entry = new IPDevice::RouterBase::PrefixlistEntry;
$entry->set_prefix('192.168.0.0/22');
$entry->set_ge(20);
$entry->set_le(24);
print "Prefix matches!\n" if $entry->match('192.168.1.12');
DESCRIPTION
This module provides routines for storing informations regarding a single IP prefix list entry.
CONSTRUCTOR AND METHODS
new([%args])
Object constructor. Valid arguments: none.
set_sequence($seq)
Defines the sequence number of the entry.
get_sequence()
Returns the sequence number of the entry.
set_prefix($prefix)
Check & set the IP prefix.
get_prefix()
Returns the IP prefix.
set_network($network)
Set the IP network address.
get_network()
Returns the IP network address.
set_mask($mask)
Set the IP prefix mask.
get_mask()
Returns the IP prefix mask.
set_prefixlen($prefixlength)
Set the IP prefix length.
get_prefixlen()
Returns the IP prefix length.
set_permitdeny(('permit'|'deny'))
Defines whether this prefix is explicitly allowed or explicitly denied.
get_permitdeny()
Returns whether this prefix is explicitly allowed or explicitly denied. Returns either 'permit' or 'deny'.
set_le($prefixlength)
Defines, until which prefixlength this item will match (less-equal settings).
get_le()
Returns an integer indicating to which prefixlength this item will match (less-equal setting).
set_ge($prefixlength)
Defines, until which prefixlength this item will match (greater-equal setting).
get_ge()
Returns an integer indicating to which prefixlength this item will match (greater-equal settings).
matches_prefix($prefix)
Returns TRUE if the given prefix matches this prefix, otherwise FALSE.
matches_ip($ip)
Returns TRUE if the ip address is in the range of this prefix, otherwise FALSE.
COPYRIGHT
Copyright (c) 2004 Samuel Abels. All rights reserved.
This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself.
AUTHOR
Samuel Abels <spam debain org>