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

[Feature Request] rfc6052 support #72

Open
ewpratten opened this issue Dec 2, 2023 · 2 comments
Open

[Feature Request] rfc6052 support #72

ewpratten opened this issue Dec 2, 2023 · 2 comments
Labels
waiting-response Maintainers are waiting on response from community or contributor.

Comments

@ewpratten
Copy link

It would be nice to have support for rfc6052 addresses, which follow a pretty weird format.

Two commands (rfc6052-pack and rfc6052-extract) would be handy.

Heres an at-a-glance view of how this addressing scheme works:

+--+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+
|PL| 0-------------32--40--48--56--64--72--80--88--96--104---------|
+--+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+
|32|     prefix    |v4(32)         | u | suffix                    |
+--+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+
|40|     prefix        |v4(24)     | u |(8)| suffix                |
+--+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+
|48|     prefix            |v4(16) | u | (16)  | suffix            |
+--+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+
|56|     prefix                |(8)| u |  v4(24)   | suffix        |
+--+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+
|64|     prefix                    | u |   v4(32)      | suffix    |
+--+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+
|96|     prefix                                    |    v4(32)     |
+--+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+

Example syntax could be:

$ cidr rfc6052-pack <prefix>/<mask> <ipv4> [<suffix>]
$ cidr rfc6052-extract <address>/<mask>

The first command would return an IPv6 address, and the second would return an IPv6 prefix, an IPv4 address, and an optional suffix. (or just error, if its invalid)

@github-actions github-actions bot added the needs-triage Waiting for first response or review from a maintainer label Dec 2, 2023
@ewpratten
Copy link
Author

I realize that this is the wrong language, but I do have an implementation of this hiding away here if you are curious: https://github.com/ewpratten/protomask/tree/ewpratten/reorg2/libs/rfc6052/src

@bschaatsbergen
Copy link
Owner

Hello @ewpratten, I appreciate you bringing up this issue. Personally, I'm not well-acquainted with rfc6052, and I plan to dedicate some time to thoroughly understand it. In the meantime, could you share a few use cases and elaborate on why you believe integrating rfc6052 would add value to cidr? Additionally, does rfc6052 take into account both IPv4 and IPv6 (the intention behind cidr is to be agnostic to both IPv4 and IPv6, offering features that naturally support both) ? I'll also be doing my research on this topic. Thanks again!

@bschaatsbergen bschaatsbergen added waiting-response Maintainers are waiting on response from community or contributor. and removed needs-triage Waiting for first response or review from a maintainer labels Dec 4, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
waiting-response Maintainers are waiting on response from community or contributor.
Projects
None yet
Development

No branches or pull requests

2 participants