Commit 3bdf9d6a authored by Hugo Trentesaux's avatar Hugo Trentesaux

[feat] change fields order in endpoint v2

parent eba52a2a
......@@ -296,20 +296,20 @@ WS2Pv1 used endpoints version v1. So, in WS2Pv2 we improve to endpoints version
### Endpoint binary format
| data name | size in bytes | data type |
|:----------------:|--------------:|--------------:|
| endpoint_version | 4 | u32 |
| api_name | ? | String |
| api_version | 2 | u16 |
| nf_size | 8 | u64 |
| network_features | nf_size | specific |
| af_size | 8 | u64 |
| api_features | af_size | specific |
| ip_v4 | 4 | Opt([u8; 4]) |
| ip_v6 | 16 | Opt([u16; 8]) |
| host | ? | Opt(String) |
| port | 2 | u16 |
| path | ? | Opt(String) |
| data name | size in bytes | data type |
| :--------------: | ------------: | ------------: |
| api_name | ? | String |
| api_version | 2 | u16 |
| nf_size | 8 | u64 |
| network_features | nf_size | specific |
| af_size | 8 | u64 |
| api_features | af_size | specific |
| endpoint_version | 4 | u32 |
| host | ? | Opt(String) |
| ip_v4 | 4 | Opt([u8; 4]) |
| ip_v6 | 16 | Opt([u16; 8]) |
| port | 2 | u16 |
| path | ? | Opt(String) |
endpoint_version := value is `1`.
......@@ -376,22 +376,24 @@ Example:
Same endpoint in binary format :
| data name | size in bytes | data type | value |
|:----------------:|--------------:|--------------:|---------------------|
| api_name | ? | String | 0x0000_0004 ++ "ws2p" encoded in utf8 |
| api_version | 2 | u16 | 0x0002 |
| nf_size | 8 | u64 | 0x0000_0001 |
| network_features | nf_size | specific | 0x04 |
| af_size | 8 | u64 | 0x0000_0001 |
| api_features | af_size | specific | 0x07 |
| ip_v4 | 4 | Opt([u8; 4]) | 0x00 |
| ip_v6 | 16 | Opt([u16; 8]) | 0x00 |
| data name | size in bytes | data type | value |
| :--------------: | ------------: | ------------: | --------------------------------------------- |
| api_name | ? | String | 0x0000_0004 ++ "ws2p" encoded in utf8 |
| api_version | 2 | u16 | 0x0002 |
| nf_size | 8 | u64 | 0x0000_0001 |
| network_features | nf_size | specific | 0x04 |
| af_size | 8 | u64 | 0x0000_0001 |
| api_features | af_size | specific | 0x07 |
| endpoint_version | 4 | u32 | 0x0002 |
| host | ? | Opt(String) | 0x0000_0004 ++ "g1.durs.info" encoded in utf8 |
| port | 2 | u16 | 0x01BB |
| ip_v4 | 4 | Opt([u8; 4]) | 0x00 |
| ip_v6 | 16 | Opt([u16; 8]) | 0x00 |
| port | 2 | u16 | 0x01BB |
| path | ? | Opt(String) | 0x01 ++ 0x0000_0004 ++ "ws2p" encoded in utf8 |
## Peer card
Signed document declaring all the endpoints of a peer.
### Peer card binary format
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment