Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Adding specification of more protocols #137

Open
wants to merge 15 commits into
base: master
Choose a base branch
from
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -112,9 +112,9 @@ and [protocols/](protocols/) for specifications of the currently supported proto

TODO: most of these are way underspecified

- /ip4, /ip6
- [/ip4](protocols/IP4.md), [/ip6](protocols/IP6.md)
- /ipcidr
- /dns4, /dns6
- [/dns](protocols/DNS.md), [/dns4](protocols/DNS4.md), [/dns6](protocols/DNS6.md)
- [/dnsaddr](protocols/DNSADDR.md)
- /tcp
- /udp
Expand Down
21 changes: 21 additions & 0 deletions protocols/DNS.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
# `dns`

`dns` is a protocol that defines which domain name should be used.

## Representation Format

### Human-readable

The human-readable format of the `dns` protocol uses the well-known textual representation:

example.com

TODO: Consider also supporting with trailing dot.

### Binary

TODO: Consider binary format. Is it a string prefixed by an unsigned varint or should the FQDN encoding be used, where every label is prefixed and the last label has zero length?

## Binary Size

Unknown
21 changes: 21 additions & 0 deletions protocols/DNS4.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
# `dns4`

`dns4` is a protocol that defines which domain name should be used, but only by resolving it to a IPv4 address.
ben221199 marked this conversation as resolved.
Show resolved Hide resolved

## Representation Format

### Human-readable

The human-readable format of the `dns4` protocol uses the well-known textual representation:

example.com

TODO: Consider also supporting with trailing dot.

### Binary

TODO: Consider binary format. Is it a string prefixed by an unsigned varint or should the FQDN encoding be used, where every label is prefixed and the last label has zero length?

## Binary Size

Unknown
21 changes: 21 additions & 0 deletions protocols/DNS6.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
# `dns6`

`dns6` is a protocol that defines which domain name should be used, but only by resolving it to a IPv6 address.

## Representation Format

### Human-readable

The human-readable format of the `dns6` protocol uses the well-known textual representation:

example.com

TODO: Consider also supporting with trailing dot.

### Binary

TODO: Consider binary format. Is it a string prefixed by an unsigned varint or should the FQDN encoding be used, where every label is prefixed and the last label has zero length?

## Binary Size

Unknown
23 changes: 23 additions & 0 deletions protocols/IP4.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
# `ip4`

`ip4` is a protocol that defines which IPv4 address should be used.

## Representation Format

### Human-readable

The human-readable format of the `ip4` protocol uses the quad-dotted format:

127.0.9.1

TODO: Consider also supporting decimal format.

### Binary

The binary format of the `ip4` protocol uses the well-known binary format of 32 bits:

0x7F 0x00 0x00 0x01

## Binary Size

32 bits (Implicit)
23 changes: 23 additions & 0 deletions protocols/IP6.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
# `ip6`

`ip6` is a protocol that defines which IPv6 address should be used.

## Representation Format

### Human-readable

The human-readable format of the `ip6` protocol uses the colon-seperated format:

2604:1380:4602:5c00::3

TODO: Consider also supporting decimal format and/or format that encloses the IP address with `[` and `]`.

### Binary

The binary format of the `ip6` protocol uses the well-known binary format of 128 bits:

0x26 0x04 0x13 0x80 0x46 0x02 0x5c 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x03

## Binary Size

128 bits (Implicit)