|
/Users/cpanrun/depot/main/contrib-patched/perl/CPAN/src/IPDevice/blib/lib/IPDevice/RouterBase/PrefixlistEntry.pm |
new([%args])set_sequence($seq)get_sequence()set_prefix($prefix)get_prefix()set_network($network)get_network()set_mask($mask)get_mask()set_prefixlen($prefixlength)get_prefixlen()set_permitdeny(('permit'|'deny'))get_permitdeny()set_le($prefixlength)get_le()set_ge($prefixlength)get_ge()matches_prefix($prefix)matches_ip($ip)
IPDevice::RouterBase::PrefixlistEntry
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');
This module provides routines for storing informations regarding a single IP prefix list entry.
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 (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.
Samuel Abels <spam debain org>
|
/Users/cpanrun/depot/main/contrib-patched/perl/CPAN/src/IPDevice/blib/lib/IPDevice/RouterBase/PrefixlistEntry.pm |