Skip to content

Commit fa4b997

Browse files
committed
ADC 1.0.4 and ADC Extensions 1.0.9 have been released
1 parent f60582b commit fa4b997

2 files changed

Lines changed: 89 additions & 30 deletions

File tree

ADC-EXT.html

Lines changed: 68 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -736,7 +736,10 @@
736736
<body class="article">
737737
<div id="header">
738738
<h1>ADC Extensions</h1>
739-
<span id="author">1.0.9, UNRELEASED</span><br />
739+
<span id="author">DC++ Team</span><br />
740+
<span id="email"><code>&lt;<a href="mailto:dcplusplus-devel@lists.sourceforge.net">dcplusplus-devel@lists.sourceforge.net</a>&gt;</code></span><br />
741+
<span id="revnumber">version 1.0.9,</span>
742+
<span id="revdate">2025-05-07</span>
740743
<div id="toc">
741744
<div id="toctitle">Table of Contents</div>
742745
<noscript><p><b>JavaScript must be enabled in your browser to display the table of contents.</b></p></noscript>
@@ -755,17 +758,32 @@ <h2 id="_abstract">1. Abstract</h2>
755758
<h2 id="_version_history">2. Version history</h2>
756759
<div class="sectionbody">
757760
<div class="paragraph"><p>The latest draft of the next version of this document as well as intermediate
758-
and older versions can be downloaded from
759-
$URL: <a href="https://github.com/dc-protocols/adc/blob/main/ADC-EXT.txt">https://github.com/dc-protocols/adc/blob/main/ADC-EXT.txt</a> $.</p></div>
760-
<div class="paragraph"><p>This version corresponds to $Revision: 125 $.</p></div>
761+
and older versions can be downloaded from:
762+
<a href="https://github.com/dc-protocols/adc/blob/main/ADC-EXT.txt">https://github.com/dc-protocols/adc/blob/main/ADC-EXT.txt</a></p></div>
761763
</div>
762764
</div>
763765
<div class="sect1">
764-
<h2 id="_version_1_0_9_unreleased">3. Version 1.0.9, UNRELEASED</h2>
766+
<h2 id="_version_1_0_9_2025_05_07">3. Version 1.0.9, 2025-05-07</h2>
765767
<div class="sectionbody">
768+
<div class="paragraph"><p>DC++ Team &lt;<a href="mailto:dcplusplus-devel@lists.sourceforge.net">dcplusplus-devel@lists.sourceforge.net</a>&gt;</p></div>
766769
<div class="ulist"><ul>
767770
<li>
768771
<p>
772+
Added implementation notes to BLOM
773+
</p>
774+
</li>
775+
<li>
776+
<p>
777+
Added <em>CCPM</em> extension for client to client private messages
778+
</p>
779+
</li>
780+
<li>
781+
<p>
782+
Editorial updates
783+
</p>
784+
</li>
785+
<li>
786+
<p>
769787
Clarified HH field in PING to be an ADC URL
770788
</p>
771789
</li>
@@ -1020,15 +1038,15 @@ <h3 id="_tigr_tiger_tree_hash_support">4.1. TIGR - Tiger tree hash support</h3>
10201038
<h4 id="_general">4.1.1. General</h4>
10211039
<div class="paragraph"><p>This extension adds Tiger tree hash support to the base protocol. It is
10221040
intended to be used both for identifying files and for purposes such as CID
1023-
generation and password negotiation</p></div>
1041+
generation and password negotiation.</p></div>
10241042
</div>
10251043
<div class="sect3">
10261044
<h4 id="_tigr_for_shared_files">4.1.2. TIGR for shared files</h4>
10271045
<div class="paragraph"><p>All files shared by TIGR supporting clients must have been hashed using Merkle
10281046
Hash trees, as defined by
1029-
<a href="http://web.archive.org/web/20080316033726/http://www.open-content.net/specs/draft-jchapweske-thex-02.html">http://web.archive.org/web/20080316033726/http://www.open-content.net/specs/draft-jchapweske-thex-02.html</a>.
1047+
<a href="https://web.archive.org/web/20080316033726/http://www.open-content.net/specs/draft-jchapweske-thex-02.html">https://web.archive.org/web/20080316033726/http://www.open-content.net/specs/draft-jchapweske-thex-02.html</a>.
10301048
The Tiger
1031-
algorithm, as specified by <a href="http://www.cs.technion.ac.il/~biham/Reports/Tiger/">http://www.cs.technion.ac.il/~biham/Reports/Tiger/</a>,
1049+
algorithm, as specified by <a href="https://biham.cs.technion.ac.il/Reports/Tiger/">https://biham.cs.technion.ac.il/Reports/Tiger/</a>,
10321050
functions as the hash algorithm. A base segment size of 1024 bytes must be
10331051
used when generating the tree, but clients may then discard parts of the tree
10341052
as long as at least 7 levels are kept or a block granularity of 64 KiB is
@@ -1042,7 +1060,7 @@ <h4 id="_tigr_for_shared_files">4.1.2. TIGR for shared files</h4>
10421060
<div class="paragraph"><p>In the file list, each File element carries an additional attribute "TTH"
10431061
containing the base32-encoded value of the Tiger tree root.</p></div>
10441062
<div class="paragraph"><p>In the GET/GFI type, the full tree may be accessed using the "tthl" type.</p></div>
1045-
<div class="paragraph"><p>"tthl" transfers send the largest set of leaves available) as a binary stream
1063+
<div class="paragraph"><p>"tthl" transfers send the largest set of leaves available as a binary stream
10461064
of leaf data, right-to-left, with no spacing in between them. &lt;start_pos&gt;
10471065
must be set to 0 and &lt;bytes&gt; to -1 when requesting the data. &lt;bytes&gt; must
10481066
contain the total binary size of the leaf stream in SND; by dividing this
@@ -1098,7 +1116,7 @@ <h3 id="_bzip_file_list_compressed_with_bzip2">4.2. BZIP - File list compressed
10981116
<div class="sect2">
10991117
<h3 id="_zlib_compressed_communication">4.3. ZLIB - Compressed communication</h3>
11001118
<div class="paragraph"><p>There are two variants of zlib support, FULL and GET, and only one should be
1101-
used on a each communications channel set up.</p></div>
1119+
used on each communications channel set up.</p></div>
11021120
<div class="sect3">
11031121
<h4 id="_zlib_full">4.3.1. ZLIB-FULL</h4>
11041122
<div class="paragraph"><p>If, during SUP negotiation, a peer sends "ZLIF" in its support string, it must
@@ -1456,7 +1474,7 @@ <h4 id="_keywords">4.7.1. Keywords</h4>
14561474
</tr>
14571475
<tr>
14581476
<td align="left" valign="top"><p class="table">fileMN</p></td>
1459-
<td align="left" valign="top"><p class="table">Specify magnet link. <a href="http://en.wikipedia.org/wiki/Magnet_link">Magnet links</a> are used to reference files across networks and applications. Clients may ignore parameters it does not understand, but are free to pass on the parameters to other programs.</p></td>
1477+
<td align="left" valign="top"><p class="table">Specify magnet link. <a href="https://en.wikipedia.org/wiki/Magnet_link">Magnet links</a> are used to reference files across networks and applications. Clients may ignore parameters it does not understand, but are free to pass on the parameters to other programs.</p></td>
14601478
</tr>
14611479
</tbody>
14621480
</table>
@@ -1523,7 +1541,7 @@ <h4 id="_legend">4.8.1. Legend</h4>
15231541
</tr>
15241542
<tr>
15251543
<td align="left" valign="top"><p class="table">p</p></td>
1526-
<td align="left" valign="top"><p class="table">Propability of a false positive</p></td>
1544+
<td align="left" valign="top"><p class="table">Probability of a false positive</p></td>
15271545
</tr>
15281546
</tbody>
15291547
</table>
@@ -1618,13 +1636,18 @@ <h4 id="_sample_implementations">4.8.7. Sample implementations</h4>
16181636
<div class="sect4">
16191637
<h5 id="_tiger">Tiger</h5>
16201638
<div class="paragraph"><p>For TTH roots, b is 192 and a reasonable value for h is 24, giving a maximum k = 8 which means that m = 8 * n / ln 2 ≈ 11.5 * n. The required bandwidth then becomes 11.5 * n / 8 bytes, so approximately 1.44 bytes per file in the users share. For 20000 files, m should then be 230016 (taking into account the modulo 64 requirement), giving a p = 0.004, in other words ~99.6% of all searches that don&#8217;t match a users share would not be sent, saving valuable upload bandwidth for the hub. The client calculates i valid positions, if x is an array of bytes containing the hash of the file, on a little-endian machine, by doing pos = x[0+i*h/8] | (x[1+i*h/8] &lt;&lt; 8) | (x[2+i*h/8] &lt;&lt; 16) for i = [0;k). This is of course a special case where h % 8 = 0, the actual algorithm has to take into consideration values for h where the integer crosses byte boundaries.</p></div>
1621-
<div class="paragraph"><p>For test vectors, see the <a href="http://www.adcportal.com/wiki/index.php/Talk:BLOM">ADC wiki talk page</a>.</p></div>
1639+
<div class="paragraph"><p>For test vectors, see the <a href="https://adc.sourceforge.io/wiki/index.php/Talk:BLOM">ADC wiki talk page</a>.</p></div>
1640+
</div>
16221641
</div>
1642+
<div class="sect3">
1643+
<h4 id="_implementation_notes">4.8.8. Implementation notes</h4>
1644+
<div class="paragraph"><p>Clients do not signal each atomic user update of the share using the SF flag. Instead, they tend to send a cumulative result of multiple updates in a timely fashion. However, an unambiguous summary of the number of hash additions and removals may result in a lack of an update signal. Therefore, hubs are recommended to look for and process INFs containing the SS flag as well, since an incoming SS flag (especially when not accompanied by an SF) may also indicate an update in the hashes, one that occurs without a change in the total number of files shared.</p></div>
1645+
<div class="paragraph"><p>Clients shall strive to signal multiple share updates in an unambiguous manner, thus enabling hubs to request the most accurate and up-to-date version of the client&#8217;s bloom filter.</p></div>
16231646
</div>
16241647
</div>
16251648
<div class="sect2">
16261649
<h3 id="_natt_nat_traversal">4.9. NATT - NAT traversal</h3>
1627-
<div class="paragraph"><p>NAT traversal allow two passive clients to connect to each other. This specification is based on the TCP hole punching algorithm described in <span class="footnote" id="_footnote_Peer-to-Peer Communication Across Network Address Translators"><br />[B. Ford and P. Srisuresh and and D. Kegel. "Peer-to-Peer Communication Across Network Address Translators". In USENIX Technical Conference 2005 - pages 179–192. Online version: <a href="http://www.brynosaurus.com/pub/net/p2pnat/">http://www.brynosaurus.com/pub/net/p2pnat/</a>]<br /></span>.</p></div>
1650+
<div class="paragraph"><p>NAT traversal allow two passive clients to connect to each other. This specification is based on the TCP hole punching algorithm described in <span class="footnote" id="_footnote_Peer-to-Peer Communication Across Network Address Translators"><br />[B. Ford and P. Srisuresh and and D. Kegel. "Peer-to-Peer Communication Across Network Address Translators". In USENIX Technical Conference 2005 - pages 179–192. Online version: <a href="https://bford.info/pub/net/p2pnat/">https://bford.info/pub/net/p2pnat/</a>]<br /></span>.</p></div>
16281651
<div class="paragraph"><p>If a client does not support TCP4 or TCP6, it will send an RCM to the client it is trying to connect to. If the other client also doesn&#8217;t support TCP4 (or TCP6 correspondingly), NAT traversal may instead be used. Signal NATT in the INF&#8217;s SU field.</p></div>
16291652
<div class="paragraph"><p>Do note that the hub must forward I4 or I6 for respective clients' INF.</p></div>
16301653
<div class="paragraph"><p>An endpoint is the tuple of IP and port. The "private endpoint port" refers to the outbound port to the connected hub, as seen by the client. Each client must listen for incoming connections on this port. Note that this protocol extension uses only this port for the TCP hole punching, the use of the "public endpoint port" as specified in <span class="footnoteref"><br /><a href="#_footnote_Peer-to-Peer Communication Across Network Address Translators">[Peer-to-Peer Communication Across Network Address Translators]</a><br /></span> is not supported.</p></div>
@@ -1766,7 +1789,7 @@ <h4 id="_psr">4.12.1. PSR</h4>
17661789
<div class="sect2">
17671790
<h3 id="_lc_locale_specification">4.13. LC - Locale specification</h3>
17681791
<div class="paragraph"><p>This extension&#8217;s purpose is to notify the hub which user locale the client is using as well as the default locale for the hub. This allows hubs to customize text sent to clients, depending on language, left-to-right or right-to-left and more. If the hub does not directly support the client&#8217;s locale, it should attempt to fall back to the same language group (e.g. hub supports en-US but not en-AU, so falls back to en-US), and if this is not available, then fall back to the hub&#8217;s own locale.</p></div>
1769-
<div class="paragraph"><p><a href="http://tools.ietf.org/html/bcp47">BCP47</a> should be used as reference for locale structure.</p></div>
1792+
<div class="paragraph"><p><a href="https://www.rfc-editor.org/info/bcp47">BCP47</a> should be used as reference for locale structure.</p></div>
17701793
<div class="tableblock">
17711794
<table rules="all"
17721795
frame="border"
@@ -1959,7 +1982,7 @@ <h4 id="_decryption_notes">4.17.1. Decryption notes</h4>
19591982
</div>
19601983
<div class="sect2">
19611984
<h3 id="_type_typing_notification">4.18. TYPE - Typing notification</h3>
1962-
<div class="paragraph"><p>This extension adds a typing similar to Jabber&#8217;s <a href="http://www.xmpp.org/extensions/xep-0085.html">"Chat state notifications"</a>.</p></div>
1985+
<div class="paragraph"><p>This extension adds a typing similar to Jabber&#8217;s <a href="https://xmpp.org/extensions/xep-0085.html">"Chat state notifications"</a>.</p></div>
19631986
<div class="paragraph"><p>Signal TYPE in SUP and the INF&#8217;s SU field.</p></div>
19641987
<div class="sect3">
19651988
<h4 id="_tpn">4.18.1. TPN</h4>
@@ -2017,7 +2040,7 @@ <h4 id="_tpn">4.18.1. TPN</h4>
20172040
</div>
20182041
<div class="sect2">
20192042
<h3 id="_feed_rss_feeds">4.19. FEED - RSS feeds</h3>
2020-
<div class="paragraph"><p>The extension adds <a href="http://en.wikipedia.org/wiki/RSS">RSS feed</a> support.</p></div>
2043+
<div class="paragraph"><p>The extension adds <a href="https://en.wikipedia.org/wiki/RSS">RSS feed</a> support.</p></div>
20212044
<div class="paragraph"><p>Signal FEED in SUP and the INF&#8217;s SU field.</p></div>
20222045
<div class="sect3">
20232046
<h4 id="_rss">4.19.1. RSS</h4>
@@ -2684,13 +2707,40 @@ <h4 id="_examples_3">4.32.5. Examples</h4>
26842707
</div>
26852708
</div>
26862709
</div>
2710+
<div class="sect2">
2711+
<h3 id="_ccpm_client_to_client_private_messages">4.33. CCPM - Client to client private messages</h3>
2712+
<div class="paragraph"><p>This extension adds support for private messages in a client to client context. The extension adds support for the C-type for MSG, and uses the field "PM" in the (C-type) INF to signal that the connection should be used for private messages. Implementations supporting this extension must signal "CCPM" in the SU field of their hub-targeted INF.</p></div>
2713+
<div class="paragraph"><p>Implementations should differentiate between a C-C transfer connection and a C-C private message connection, so as to allow transfers and chat at the same time. The initiating client should issue a secondary CTM/RCM sequence to deal with the other connection. Implementations shall disallow GET (and other file transfer commands) in the private message connection.</p></div>
2714+
<div class="paragraph"><p>Implementations are strongly discouraged but may choose to allow private messages in unencrypted connections.</p></div>
2715+
<div class="paragraph"><p>Implementations may choose for which users that are allowed to send them private messages, so as to avoid spam (e.g., only trusted users, hub operators etc may initiate a C-C private message).</p></div>
2716+
<div class="paragraph"><p>Absence of the "PM" field from the (C-type) INF shall cause a disconnect of the connection (with an appropriate STA).</p></div>
2717+
<div class="paragraph"><p>Implementations may decide what to do when the hub connection is lost during a private message connection.</p></div>
2718+
<div class="paragraph"><p>Implementations should adhere to any requirements the DI field in the QUI command in BASE poses regarding non-file transfer connections. Further actions beyond that are up to implementations.</p></div>
2719+
<div class="paragraph"><p>The same port may, but needn&#8217;t be, reused for a file transfer connection and a private message connection. Concurrent connections may be rendered unfeasible with extensions such as NATT.</p></div>
2720+
<div class="paragraph"><p>The "PM" field of the MSG command should not be used in C-C private messages.</p></div>
2721+
<div class="tableblock">
2722+
<table rules="all"
2723+
frame="border"
2724+
cellspacing="0" cellpadding="4">
2725+
<col />
2726+
<col />
2727+
<tbody>
2728+
<tr>
2729+
<td align="left" valign="top"><p class="table">PM</p></td>
2730+
<td align="left" valign="top"><p class="table">Field in the CINF to denote that the connection should be used for private messages. The field&#8217;s value should be <em>1</em>.</p></td>
2731+
</tr>
2732+
</tbody>
2733+
</table>
2734+
</div>
2735+
</div>
26872736
</div>
26882737
</div>
26892738
</div>
26902739
<div id="footnotes"><hr /></div>
26912740
<div id="footer">
26922741
<div id="footer-text">
2693-
Last updated 2025-04-12 08:19:22 CEST
2742+
Version 1.0.9<br />
2743+
Last updated 2025-05-08 16:51:38 CEST
26942744
</div>
26952745
</div>
26962746
</body>

0 commit comments

Comments
 (0)