Home | Trees | Indices | Help |
|
---|
|
object --+ | AddrRange --+ | CIDR
A block of contiguous IPv4 or IPv6 network addresses defined by a base network address and a bitmask prefix or subnet mask address indicating the size/extent of the subnet.
By default, this class does not allow any non-zero bits to be set right of the bitmask when it is applied to the supplied base address. Doing so raises an AddrFormatError exception. However, it is now configurable and will allow a less strict base address if you ask for one. Be aware though that the bitmask will be applied to the base address and and trailing non-zero bits removed losing the original address. It will *not* be preserved!
Contrast this behaviour with the IP class which is less strict and has a cidr() method for returning CIDR objects without any loss of information.
Examples of supported formats :-
<address>/<mask_length>
:
192.168.0.0/16 fe80::/64
192.168.0.0/255.255.0.0 == 192.168.0.0/16 fe80::/ffff:ffff:ffff:ffff:: == fe80::/64
10 == 10.0.0.0/8 10.0 == 10.0.0.0/8 10/8 == 10.0.0.0/8 128 == 128.0.0.0/16 128.0 == 128.0.0.0/16 128/16 == 128.0.0.0/16 192 == 10.0.0.0/24 192.168.0 == 192.168.0.0/24 192.168/16 == 192.168.0.0/16
Instance Methods | |||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
Inherited from Inherited from |
Static Methods | |||
|
Class Variables | |
STRATEGIES =
|
|
ADDR_TYPES =
|
|
strategy = StrategyDescriptor(STRATEGIES)
|
|
addr_type = AddrTypeDescriptor(ADDR_TYPES)
|
|
prefixlen = PrefixLenDescriptor('CIDR')
|
|
klass = KlassDescriptor(IP)
|
|
Properties | |
Inherited from |
Method Details |
A statis method that converts abbreviated CIDR addresses into their verbose form.
|
Constructor.
|
Subtract another CIDR from this one.
|
|
|
str(x)
|
repr(x)
|
|
Class Variable Details |
STRATEGIES
|
Home | Trees | Indices | Help |
|
---|
Generated by Epydoc 3.0.1 on Mon Sep 29 23:23:24 2008 | http://epydoc.sourceforge.net |