Inherits object.
Inherited by rpki.resource_set.roa_prefix_ipv4, and rpki.resource_set.roa_prefix_ipv6.
Public Member Functions | |
def | __cmp__ |
def | __init__ |
def | __str__ |
def | max |
def | min |
def | to_resource_range |
def | to_roa_tuple |
Public Attributes | |
max_prefixlen | |
Maxmimum prefix length. | |
prefix | |
The prefix itself, an IP address with bits beyond the prefix length zeroed. | |
prefixlen | |
(Minimum) prefix length. |
ROA prefix. This is similar to the resource_range_ip class, but differs in that it only represents prefixes, never ranges, and includes the maximum prefix length as an additional value. This is a virtual class, you probably don't want to use it directly.
Definition at line 666 of file resource_set.py.
def rpki.resource_set.roa_prefix.__cmp__ | ( | self, | ||
other | ||||
) |
Compare two ROA prefix objects. Comparision is based on prefix, prefixlen, and max_prefixlen, in that order.
Definition at line 697 of file resource_set.py.
def rpki.resource_set.roa_prefix.__init__ | ( | self, | ||
prefix, | ||||
prefixlen, | ||||
max_prefixlen = None | ||||
) |
Initialize a ROA prefix. max_prefixlen is optional and defaults to prefixlen. max_prefixlen must not be smaller than prefixlen.
Definition at line 685 of file resource_set.py.
def rpki.resource_set.roa_prefix.__str__ | ( | self | ) |
Convert a ROA prefix to string format.
Definition at line 710 of file resource_set.py.
def rpki.resource_set.roa_prefix.max | ( | self | ) |
Return highest address covered by prefix.
Definition at line 731 of file resource_set.py.
def rpki.resource_set.roa_prefix.min | ( | self | ) |
Return lowest address covered by prefix.
Definition at line 727 of file resource_set.py.
def rpki.resource_set.roa_prefix.to_resource_range | ( | self | ) |
Convert this ROA prefix to the equivilent resource_range_ip object. This is an irreversable transformation because it loses the max_prefixlen attribute, nothing we can do about that.
Definition at line 719 of file resource_set.py.
def rpki.resource_set.roa_prefix.to_roa_tuple | ( | self | ) |
Convert a resource_range_ip to tuple format for ROA ASN.1 encoding.
Definition at line 738 of file resource_set.py.
Maxmimum prefix length.
Definition at line 695 of file resource_set.py.
The prefix itself, an IP address with bits beyond the prefix length zeroed.
Definition at line 693 of file resource_set.py.
(Minimum) prefix length.
Definition at line 694 of file resource_set.py.