Skip to content
Snippets Groups Projects
Commit 7f4259c8 authored by Hugo Trentesaux's avatar Hugo Trentesaux Committed by Éloïs
Browse files

[feat] change fields order in endpoint v2

parent 69222b2a
No related branches found
No related tags found
1 merge request!8WIP: WS2P v2
...@@ -297,17 +297,17 @@ WS2Pv1 used endpoints version v1. So, in WS2Pv2 we improve to endpoints version ...@@ -297,17 +297,17 @@ WS2Pv1 used endpoints version v1. So, in WS2Pv2 we improve to endpoints version
### Endpoint binary format ### Endpoint binary format
| data name | size in bytes | data type | | data name | size in bytes | data type |
|:----------------:|--------------:|--------------:| | :--------------: | ------------: | ------------: |
| endpoint_version | 4 | u32 |
| api_name | ? | String | | api_name | ? | String |
| api_version | 2 | u16 | | api_version | 2 | u16 |
| nf_size | 8 | u64 | | nf_size | 8 | u64 |
| network_features | nf_size | specific | | network_features | nf_size | specific |
| af_size | 8 | u64 | | af_size | 8 | u64 |
| api_features | af_size | specific | | api_features | af_size | specific |
| endpoint_version | 4 | u32 |
| host | ? | Opt(String) |
| ip_v4 | 4 | Opt([u8; 4]) | | ip_v4 | 4 | Opt([u8; 4]) |
| ip_v6 | 16 | Opt([u16; 8]) | | ip_v6 | 16 | Opt([u16; 8]) |
| host | ? | Opt(String) |
| port | 2 | u16 | | port | 2 | u16 |
| path | ? | Opt(String) | | path | ? | Opt(String) |
...@@ -377,21 +377,23 @@ Example: ...@@ -377,21 +377,23 @@ Example:
Same endpoint in binary format : Same endpoint in binary format :
| data name | size in bytes | data type | value | | data name | size in bytes | data type | value |
|:----------------:|--------------:|--------------:|---------------------| | :--------------: | ------------: | ------------: | --------------------------------------------- |
| api_name | ? | String | 0x0000_0004 ++ "ws2p" encoded in utf8 | | api_name | ? | String | 0x0000_0004 ++ "ws2p" encoded in utf8 |
| api_version | 2 | u16 | 0x0002 | | api_version | 2 | u16 | 0x0002 |
| nf_size | 8 | u64 | 0x0000_0001 | | nf_size | 8 | u64 | 0x0000_0001 |
| network_features | nf_size | specific | 0x04 | | network_features | nf_size | specific | 0x04 |
| af_size | 8 | u64 | 0x0000_0001 | | af_size | 8 | u64 | 0x0000_0001 |
| api_features | af_size | specific | 0x07 | | api_features | af_size | specific | 0x07 |
| endpoint_version | 4 | u32 | 0x0002 |
| host | ? | Opt(String) | 0x0000_0004 ++ "g1.durs.info" encoded in utf8 |
| ip_v4 | 4 | Opt([u8; 4]) | 0x00 | | ip_v4 | 4 | Opt([u8; 4]) | 0x00 |
| ip_v6 | 16 | Opt([u16; 8]) | 0x00 | | ip_v6 | 16 | Opt([u16; 8]) | 0x00 |
| host | ? | Opt(String) | 0x0000_0004 ++ "g1.durs.info" encoded in utf8 |
| port | 2 | u16 | 0x01BB | | port | 2 | u16 | 0x01BB |
| path | ? | Opt(String) | 0x01 ++ 0x0000_0004 ++ "ws2p" encoded in utf8 | | path | ? | Opt(String) | 0x01 ++ 0x0000_0004 ++ "ws2p" encoded in utf8 |
## Peer card ## Peer card
Signed document declaring all the endpoints of a peer. Signed document declaring all the endpoints of a peer.
### Peer card binary format ### Peer card binary format
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment