iprfc/
rfc4380.rs

1use core::net::Ipv6Addr;
2
3use ipnet::{IpNet, Ipv6Net};
4
5use super::RFC;
6
7/// 2001:0000::/32
8const IPV6_1: Ipv6Net = Ipv6Net::new_assert(Ipv6Addr::new(0x2001, 0, 0, 0, 0, 0, 0, 0), 32);
9
10/// [RFC 4380] Teredo: Tunneling IPv6 over UDP through  Network Address Translations (NATs)
11///
12/// **Addresses:**
13/// - **IPv6:**
14///   1. `2001:0000::/32`: ยง2.6 Global Teredo IPv6 Service Prefix
15///
16/// [RFC 4380]: https://datatracker.ietf.org/doc/rfc4380/
17pub const RFC4380: RFC = RFC {
18  id: 4380,
19  ip_nets: &[IpNet::V6(IPV6_1)],
20  ipv4_nets: &[],
21  ipv6_nets: &[IPV6_1],
22};
23
24#[test]
25fn t() {
26  let addr: Ipv6Net = "2001:0000::/32".parse().unwrap(); 
27  assert_eq!(IPV6_1, addr);
28}