multiaddr
multiaddr copied to clipboard
Adding specification of more protocols
This pull request adds specifications of more protocols than only dnsaddr
.
I think this pull request should be merged when I have added more, but now it is already possible to see the changes and talk about improvements.
I think that adding the basis using this pull request is fine. We can add more information for a specific protocol using other pull requests.
@mxinden Also, can you tell me what the binary format of dns
, dns4
, dns6
and dnsaddr
is? Is it already defined? If not, I would suggest the FQDN format with a length-byte for every label.
Also, I have made some other pull requests on this and on other repositories. Hope someone can take a look at those too.
@mxinden Also, can you tell me what the binary format of
dns
,dns4
,dns6
anddnsaddr
is? Is it already defined? If not, I would suggest the FQDN format with a length-byte for every label.
Hope I understand your question correctly @ben221199. As far as I know it is just the utf-8 byte representation.
https://github.com/multiformats/rust-multiaddr/blob/911b18a51fafdee44a445dc491192f85430fbbbf/src/protocol.rs#L393-L416
w.write_all(encode::usize(bytes.len(), &mut encode::usize_buffer()))?;
This code above will prefix the data with an unsigned byte, yes.
Are the implementations in this organization authoritive at the moment, or is it still possible to alter the binary format at this time?
Okay, I think I added enough protocols for now. I think that, except for maybe some slight changes, this pull request can be merged.
Are the implementations in this organization authoritive at the moment, or is it still possible to alter the binary format at this time?
They are used in many production systems, thus I would say yes.
Above suggestions are applied.