Skip to content

Commit de418a0

Browse files
committed
Add IPv4 and IPv6 CIDR format specifications
Signed-off-by: Zhiwei Liang <zhiwei.liang@zliang.me>
1 parent 3310133 commit de418a0

2 files changed

Lines changed: 38 additions & 0 deletions

File tree

registries/_format/ipv4-cidr.md

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
---
2+
owner: ChihweiLHBird
3+
issue:
4+
description: An IPv4 address in CIDR notation
5+
base_type: string
6+
layout: default
7+
source_label: RFC 4632
8+
source: https://www.rfc-editor.org/rfc/rfc4632#section-3.1
9+
---
10+
11+
{% capture summary %}
12+
The `{{page.slug}}` format represents an IPv4 address in CIDR notation, with the address and prefix-length syntax described in [RFC4632](https://www.rfc-editor.org/rfc/rfc4632#section-3.1).
13+
14+
The address MUST be a valid `ipv4` address, and the prefix length MUST be a decimal integer from `0` to `32`, inclusive. A plain IPv4 address without a prefix length is not accepted.
15+
16+
Examples of valid values include `10.0.0.0/8` and `192.168.1.0/24`.
17+
{% endcapture %}
18+
19+
{% include format-entry.md summary=summary %}

registries/_format/ipv6-cidr.md

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
---
2+
owner: ChihweiLHBird
3+
issue:
4+
description: An IPv6 address in CIDR-style notation
5+
base_type: string
6+
layout: default
7+
source_label: RFC 4291
8+
source: https://www.rfc-editor.org/rfc/rfc4291#section-2.3
9+
---
10+
11+
{% capture summary %}
12+
The `{{page.slug}}` format represents an IPv6 address in CIDR notation, with the syntax described in [RFC4291](https://www.rfc-editor.org/rfc/rfc4291#section-2.3).
13+
14+
The address MUST be a valid `ipv6` address, and the prefix length MUST be a decimal integer from `0` to `128`, inclusive. A plain IPv6 address without a prefix length is not accepted.
15+
16+
Examples of valid values include `2001:db8::/32` and `::1/128`.
17+
{% endcapture %}
18+
19+
{% include format-entry.md summary=summary %}

0 commit comments

Comments
 (0)