MCPcopy Index your code
hub / github.com/python/cpython / _IPv6Constants

Class _IPv6Constants

Lib/ipaddress.py:2370–2414  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

2368
2369
2370class _IPv6Constants:
2371
2372 _linklocal_network = IPv6Network('fe80::/10')
2373
2374 _multicast_network = IPv6Network('ff00::/8')
2375
2376 # Not globally reachable address blocks listed on
2377 # https://www.iana.org/assignments/iana-ipv6-special-registry/iana-ipv6-special-registry.xhtml
2378 _private_networks = [
2379 IPv6Network('::1/128'),
2380 IPv6Network('::/128'),
2381 IPv6Network('::ffff:0:0/96'),
2382 IPv6Network('64:ff9b:1::/48'),
2383 IPv6Network('100::/64'),
2384 IPv6Network('2001::/23'),
2385 IPv6Network('2001:db8::/32'),
2386 # IANA says N/A, let's consider it not globally reachable to be safe
2387 IPv6Network('2002::/16'),
2388 # RFC 9637: https://www.rfc-editor.org/rfc/rfc9637.html#section-6-2.2
2389 IPv6Network('3fff::/20'),
2390 IPv6Network('fc00::/7'),
2391 IPv6Network('fe80::/10'),
2392 ]
2393
2394 _private_networks_exceptions = [
2395 IPv6Network('2001:1::1/128'),
2396 IPv6Network('2001:1::2/128'),
2397 IPv6Network('2001:3::/32'),
2398 IPv6Network('2001:4:112::/48'),
2399 IPv6Network('2001:20::/28'),
2400 IPv6Network('2001:30::/28'),
2401 ]
2402
2403 _reserved_networks = [
2404 IPv6Network('::/8'), IPv6Network('100::/8'),
2405 IPv6Network('200::/7'), IPv6Network('400::/6'),
2406 IPv6Network('800::/5'), IPv6Network('1000::/4'),
2407 IPv6Network('4000::/3'), IPv6Network('6000::/3'),
2408 IPv6Network('8000::/3'), IPv6Network('A000::/3'),
2409 IPv6Network('C000::/3'), IPv6Network('E000::/4'),
2410 IPv6Network('F000::/5'), IPv6Network('F800::/6'),
2411 IPv6Network('FE00::/9'),
2412 ]
2413
2414 _sitelocal_network = IPv6Network('fec0::/10')
2415
2416
2417IPv6Address._constants = _IPv6Constants

Callers

nothing calls this directly

Calls 1

IPv6NetworkClass · 0.85

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…