Author jana
Recipients bbayles, ekohl, h.venev, jana, pmoody, ronaldoussoren
Date 2021-04-12.18:37:26
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1618252646.74.0.866492971268.issue30528@roundup.psfhosted.org>
In-reply-to
Content
This code does the trick:

ipn = ipaddress.ip_network("2a0c:ac10::/32")
prefix = ipn.prefixlen
if ipn.version == 6:
    rest = int((ipn.max_prefixlen - prefix) / 4)
elif ipn.version == 4:
    rest = int((ipn.max_prefixlen - prefix) / 8)
return ipn.network_address.reverse_pointer.split(".", rest)[-1]
History
Date User Action Args
2021-04-12 18:37:26janasetrecipients: + jana, ronaldoussoren, pmoody, h.venev, bbayles, ekohl
2021-04-12 18:37:26janasetmessageid: <1618252646.74.0.866492971268.issue30528@roundup.psfhosted.org>
2021-04-12 18:37:26janalinkissue30528 messages
2021-04-12 18:37:26janacreate