Skip to content

v0.2.0 — IPv6 subnet math + CIDR membership

Latest

Choose a tag to compare

@TYEclipse TYEclipse released this 30 Aug 21:57
· 3 commits to main since this release

What's new / 新功能

  • ipv6_subnet — full IPv6 subnet layout from any CIDR (addr/prefix 0–128 or a bare address as /128): network address, first/last usable host, exact address counts as decimal strings (128-bit BigInt math, counts up to 2^128 stay exact), RFC 5952 canonical + full forms, IANA address class. /127 follows RFC 6164 (both addresses usable), /128 is a single host.
  • ip_match — membership test: is a bare IPv4/IPv6 address inside a CIDR range? Reports the verdict plus the normalized network range; mixed-version input is rejected with a clear reason instead of a wrong answer.

ipv6_subnet — 任意 IPv6 CIDR(地址/前缀 0–128,裸地址按 /128)→ 完整子网布局:网络地址、首末可用主机、精确地址数(十进制字符串,128 位 BigInt,2^128 内不失真)、RFC 5952 规范形与全展开形、IANA 分类。/127 遵循 RFC 6164、/128 视为单主机。
ip_match — 隶属判定:裸 IPv4/IPv6 地址是否属于某 CIDR 网段,附规范化网段范围;版本错配明确报因,绝不静默出错。

Quality / 质量

  • 155 tests green (124 + 31 new) / 155 测试全绿
  • Anchors generated by an independent oracle (Python stdlib ipaddress) / 锚点由独立 oracle(Python 标准库 ipaddress)生成
  • Zero runtime dependencies, pure local math / 零运行时依赖,纯本地计算

Install / 安装

dsh plugin --profile <your-profile> add github:TYEclipse/dsh-ipcalc#v0.2.0