Initial commit: mwhois with SCION AS support and decimal AS conversion

Based on mwhois by Antonios A. Chariton
Modifications for SCION AS support by Olaf Baumert, Axpo Systems AG
This commit is contained in:
Olaf Baumert
2025-06-03 11:01:02 +00:00
commit 34c631a06d
340 changed files with 212460 additions and 0 deletions

View File

@@ -0,0 +1,48 @@
=IP Function Tests=
Copyright (c) 2008-2015, David P. D. Moss. All rights reserved.
{{{
>>> from netaddr import *
}}}
During a cidr merge operation, the address 0.0.0.0/0, representing the whole of the IPv4 address space, should swallow anything it is merged with.
{{{
>>> cidr_merge(['0.0.0.0/0', '0.0.0.0'])
[IPNetwork('0.0.0.0/0')]
>>> cidr_merge(['0.0.0.0/0', '255.255.255.255'])
[IPNetwork('0.0.0.0/0')]
>>> cidr_merge(['0.0.0.0/0', '192.0.2.0/24', '10.0.0.0/8'])
[IPNetwork('0.0.0.0/0')]
}}}
Same goes for the IPv6 CIDR ::/0, representing the whole of the IPv6 address space.
{{{
>>> cidr_merge(['::/0', 'fe80::1'])
[IPNetwork('::/0')]
>>> cidr_merge(['::/0', '::'])
[IPNetwork('::/0')]
>>> cidr_merge(['::/0', '::192.0.2.0/124', 'ff00::101'])
[IPNetwork('::/0')]
}}}
This also applies to mixed IPv4 and IPv6 address lists.
{{{
>>> cidr_merge(['0.0.0.0/0', '0.0.0.0', '::/0', '::'])
[IPNetwork('0.0.0.0/0'), IPNetwork('::/0')]
}}}