RPKI Engine 1.0
Public Member Functions | Public Attributes

rpki.resource_set.roa_prefix Class Reference

Inheritance diagram for rpki.resource_set.roa_prefix:
Inheritance graph
Collaboration diagram for rpki.resource_set.roa_prefix:
Collaboration graph

List of all members.

Public Member Functions

def __cmp__
def __init__
def __str__
def from_roa_tuple
def max
def min
def parse_str
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.

Detailed Description

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 801 of file resource_set.py.


Constructor & Destructor Documentation

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 820 of file resource_set.py.


Member Function Documentation

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 832 of file resource_set.py.

def rpki.resource_set.roa_prefix.__str__ (   self)
Convert a ROA prefix to string format.

Definition at line 842 of file resource_set.py.

def rpki.resource_set.roa_prefix.from_roa_tuple (   cls,
  o 
)
Convert from ROA ASN.1 tuple format.

Definition at line 894 of file resource_set.py.

def rpki.resource_set.roa_prefix.max (   self)
Return highest address covered by prefix.

Definition at line 865 of file resource_set.py.

def rpki.resource_set.roa_prefix.min (   self)
Return lowest address covered by prefix.

Definition at line 859 of file resource_set.py.

def rpki.resource_set.roa_prefix.parse_str (   cls,
  x 
)
Parse ROA prefix from text (eg, an XML attribute).

Definition at line 881 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 851 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 872 of file resource_set.py.


Member Data Documentation

Maxmimum prefix length.

Definition at line 823 of file resource_set.py.

The prefix itself, an IP address with bits beyond the prefix length zeroed.

Definition at line 823 of file resource_set.py.

(Minimum) prefix length.

Definition at line 823 of file resource_set.py.


The documentation for this class was generated from the following file:
 All Classes Namespaces Files Functions Variables