rpkimancer.resources module

Number resource ASN.1 type helpers.

rpkimancer.resources.net_to_bitstring(network)

Convert an IPNetwork to an ASN.1 BIT STRING representation.

Parameters:

network (Union[IPv4Network, IPv6Network]) –

Return type:

Tuple[int, int]

rpkimancer.resources.bitstring_to_net(bits, version)

Convert an ASN.1 BIT STRING representation to an IPNetwork.

Parameters:
  • bits (Tuple[int, int]) –

  • version (int) –

Return type:

Union[IPv4Network, IPv6Network]

class rpkimancer.resources.IPAddrBlocks(ip_resources)

Bases: Interface

ASN.1 IPAddrBlocks type - RFC3779.

Parameters:

ip_resources (IpResourcesInfo) –

content_syntax: ASN1Obj = <IPAddrBlocks (SEQUENCE OF)>
class rpkimancer.resources.ASIdOrRange(a)

Bases: Interface

ASN.1 ASIdOrRange type - RFC3779.

Parameters:

a (ASIdOrRangeInfo) –

content_syntax: ASN1Obj = <ASIdOrRange (CHOICE)>
class rpkimancer.resources.ASIdentifiers(as_resources)

Bases: Interface

ASN.1 ASIdentifiers type - RFC3779.

Parameters:

as_resources (AsResourcesInfo) –

content_syntax: ASN1Obj = <ASIdentifiers (SEQUENCE)>