diff options
Diffstat (limited to 'dns/ipv6.py')
-rw-r--r-- | dns/ipv6.py | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/dns/ipv6.py b/dns/ipv6.py index 1ab00da..bf658af 100644 --- a/dns/ipv6.py +++ b/dns/ipv6.py @@ -161,3 +161,8 @@ def inet_aton(text): return text.decode('hex_codec') except TypeError: raise dns.exception.SyntaxError + +_mapped_prefix = '\x00' * 10 + '\xff\xff' + +def is_mapped(address): + return address.startswith(_mapped_prefix) |