iprfc/rfc4038.rs
1use core::net::Ipv6Addr;
2
3use ipnet::{IpNet, Ipv6Net};
4
5use super::RFC;
6
7/// 0:0:0:0:0:ffff::/96
8const IPV6_1: Ipv6Net = Ipv6Net::new_assert(Ipv6Addr::new(0, 0, 0, 0, 0, 65535, 0, 0), 96);
9
10/// [RFC 4038] Application Aspects of IPv6 Transition
11///
12/// **Addresses:**
13/// - **IPv6:**
14/// 1. `0:0:0:0:0:ffff::/96`: ยง4.2. IPv6 Applications in a Dual-Stack Node
15///
16/// [RFC 4038]: https://datatracker.ietf.org/doc/rfc4038/
17pub const RFC4038: RFC = RFC {
18 id: 4038,
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 = "0:0:0:0:0:ffff::/96".parse().unwrap();
27 assert_eq!(IPV6_1, addr);
28}