Created
November 28, 2017 02:15
-
-
Save GGist/714f4f6efd7523bfb28d79e5de145c34 to your computer and use it in GitHub Desktop.
Undocumented ut_holepunch Extension (https://github.com/arvidn/libtorrent/blob/c1ade2b75f8f7771509a19d427954c8c851c4931/src/bt_peer_connection.cpp#L1576)
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
+-------------------------------------------------------------------+ | |
| | | |
| 13/27 16/30 | | |
| ^ ^ ^ ^ | | |
| +--++ +--+ | | |
| 0 4 5 6 7 8 9 12 9 26 | | | | |
| +--------------------------------------------+--++ | | |
| |XXXX||X||X||X||X||XXXX OR XXXXXXXXXXXXXXXX||XXXX| | | |
| +^--^--^--^--^--^--^--^----^--------------^--^--^+ | | |
| +--+ | | | | |--| +--------------+ +--+ | | |
| | | | | | |-----+ | | | | |
| | | | | +-----+ | | | | | |
| | | | +------+ | +-+-------------+ | | | |
| +--+ +---+ +-+ | | | | | | |
| | | | | +-------+ | | | | |
| | | | | | | | | | |
| ++----+--------+-------+---------+----------+-----+-------+ | | |
| |Len||Ext_Msg||Ext_Id||Msg_Type||Addr_Type||Addr||Err_Code| | | |
| +---------------------------------------------------------+ | | |
| | | |
+-------------------------------------------------------------------+ | |
|Msg Type |ByteCode|Usage | | |
|Rendezvous | 0|Send connect message to the initiating | | |
| | |peer with address in this mesage + Send | | |
| | |connect message to the address in this mesage| | |
| | |with the address of the initiating peer | | |
|Connect | 1|Tell a peer to connect to the address | | |
|Failed | 2|A previous request failed for some reason | | |
+-------------------------------------------------------------------+ | |
|Addr Type |ByteCode|Usage | | |
|Ipv4 | 0|Address in the message is an ipv4 address | | |
|Ipv6 | 1|Address in the message is an ipv6 address | | |
+-------------------------------------------------------------------+ | |
|Err Code |ByteCode|Usage | | |
|NoSuchPeer | 1|??? | | |
|NotConnected| 2|We cant rendezvous the connection as we arent| | |
| | |connected to the peer | | |
|NoSupport | 3|Other peer doesnt support the extension | | |
| | |(if the peer that send the message doesnt | | |
| | |support the extension, dont respond) | | |
|NoSelf | 4|Our address was listed in the message | | |
+------------+------------------------------------------------------+ |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment