PtokaX forum

Stuff => Links => Topic started by: Ullner on 15 January, 2013, 19:40:23

Title: NMDC project
Post by: Ullner on 15 January, 2013, 19:40:23
Not so long ago, I started the NMDC project (http://nmdc.sourceforge.net/) at SourceForge as a resource for NMDC documentation (http://nmdc.sourceforge.net/NMDC.html) out on the web.

Multiple forums and/or wikis on the web (including the Ptokax wiki) contain lots of information but wasn't entirely complete or was fragmented over multiple pages etc.

The versioning of the documentation doesn't reflect a "NMDC version", but rather the version of the document itself. The idea is that the document should also contain information about how specific implementations did something (if they deviated etc) if it is useful.

The idea with the project is also to provide some basic source code (right now it's only the key/lock calculations).

If you think that there is some command or other information that is incorrect or should be included, just let me know. I'll be checking here from time to time, but otherwise you can find post at the 'forum' link or in the development hub.
Title: Re: NMDC project
Post by: PPK on 15 January, 2013, 23:13:29
Incorrect... where i should start ;D When version 1.0 was acceptable, then 1.1 is disaster :o

QuoteIf protocol delimiters should be displayable (dollar signs etc), the HTML equivalents should be used.
Wrong, that is not NMDC. That is DC++. Original NMDC software escape with  /%DCNxxx%/ where xxx is decimal number for ASCII character code. Without that knowledge is not possible to generate correct $Key :-X

Quote4.2.10. $ADCGET
It is not part of NMDC, it is extension. Info about that is missing.

Quote4.2.12. $ADCSND
Same as previous, no info that it is extension and what support it is using.

Quote4.2.26. $MyINFO
Info about flag is wrong. Flag in original NMDC uses bits for statuses. Newer clients use unused bits to show support for protocol extensions. Documentation is in PtokaX wiki http://wiki.ptokax.org/doku.php?id=dcprotocol:hub_client:myinfo

Quote4.2.28. $UserIP
Quote4.2.29. $UserIP
Both extensions. For both is documentation wrong. First one don't support multiple nicks/ips, only second one.

Quote$BotINFO
Again extension, without info and what support it is using.

Quote4.2.33. $HubINFO
Same as previous.

Quote4.2.35. $HubTopic
Same as previous.

Quote4.2.39. $BotList
Same as previous.

Quote4.2.47. $Supports
Again extension. Common bug is extra space after last support.

Quote4.2.48. Capabilities
And again extension ;D

Quote4.2.49. IN
Again ...

Quote4.2.50. MCTo
Again ..

Quote4.2.51. $NickChange
Again ..

Quote4.2.52. $ClientNick
Again ..

Quote4.2.53. FeaturedNetworks
Again ..

Quote4.2.54. $Z
Again ..

Quote4.2.55. $GetZBlock
Again ..

Quote4.2.56. $UGetBlock
Again. Default NMDC encoding is not 1252, but encoding of os where it is running (in my case 1250). DC++ violate XmlBZList because this command was removed in DC++ 0.696.

Quote4.2.57. $UGetZBlock
Again extension.

Quote4.2.58. $GetTestZBlock
Again.

Quote4.2.60. $ClientID
Again.

Quote4.2.61. $GetCID
Again.

Quote4.2.62. $UserCommand
Again.

That is only few things that i'm noticed. I'm not readed whole document  ::)
Title: Re: NMDC project
Post by: Ullner on 16 January, 2013, 23:27:20
QuoteIncorrect... where i should start ;D When version 1.0 was acceptable, then 1.1 is disaster :o
I'm not sure what you're referring to, the versioning is simply a way to differentiate the document itself. It's not, as I wrote earlier, a way to indicate a version on the NMDC protocol itself.

QuoteWrong, that is not NMDC. That is DC++. Original NMDC software escape with  /%DCNxxx%/ where xxx is decimal number for ASCII character code. Without that knowledge is not possible to generate correct $Key :-X
Did NMDC do that type of escaping even outside of the Key/Lock? I'll change the note if NMDC indeed did use something else for other messages.

QuoteExtensions...
I have moved the mentioned commands to a new section, "Extensions (commands)". I have added a 'Add X to the $Supports to indicate support for this' for each item that didn't previously had it; please review and see it's supposed to be something else, other than what the command name is. For the items that are ambigious (mostly that there are multiple commands that use the same concept or depend on each other), I haven't written anything. Should the key and lock management be an extension? I mean, it wasn't in the original version of the protocol but something that came in later versions.

QuoteADCSND and ADCGet
what should be sent in the $Supports?

QuoteInfo about flag is wrong. Flag in original NMDC uses bits for statuses. Newer clients use unused bits to show support for protocol extensions. Documentation is in PtokaX wiki http://wiki.ptokax.org/doku.php?id=dcprotocol:hub_client:myinfo
I have changed this and noted different implementations. In that link, you reference IP64, TLS and TLS1. Do you have any documentation of those?

QuoteCommon bug is extra space after last support.
I have added a note about this; in what version did DC++ start doing this?

QuoteFor both is documentation wrong. First one don't support multiple nicks/ips, only second one.
I used the Teamfair wiki (http://web.archive.org/web/20090312025059/http://www.teamfair.info/wiki/index.php?title=%24UserIP) for this. Do you mean that $UserIP2 is required to have multiple nicks/IPs?

QuoteDefault NMDC encoding is not 1252, but encoding of os where it is running (in my case 1250).
Corrected.

QuoteDC++ violate XmlBZList because this command was removed in DC++ 0.696.
How do you mean violate? What does it do (in)correctly? Any suggestions on what to add to the documentation to make it clear?

I have uploaded a new version, 1.2, please have a look. (http://nmdc.sf.net/NMDC.html)
Title: Re: NMDC project
Post by: PPK on 17 January, 2013, 00:31:31
Quote from: Ullner on 16 January, 2013, 23:27:20
I'm not sure what you're referring to, the versioning is simply a way to differentiate the document itself. It's not, as I wrote earlier, a way to indicate a version on the NMDC protocol itself.
I know, what i mean was that 1.0 don't have too much incorrect things.
Quote from: Ullner on 16 January, 2013, 23:27:20
Did NMDC do that type of escaping even outside of the Key/Lock? I'll change the note if NMDC indeed did use something else for other messages.
I don't really know. Afaik not in version 1. I remeber that long time ago i'm added support for that CZDC++ because it was used by DCTC and VerliBot (both added it before dc++ introduced html escapes).
Quote from: Ullner on 16 January, 2013, 23:27:20
Should the key and lock management be an extension? I mean, it wasn't in the original version of the protocol but something that came in later versions.
Depend on what you count as original version. For me it is NMDC hub 1.0.25 and NMDC client 1.0 Preview Build 9.1. Lock/Key is in both of them.
Quote from: Ullner on 16 January, 2013, 23:27:20
what should be sent in the $Supports?
In supports is ADCGet ::)
Quote from: Ullner on 16 January, 2013, 23:27:20
I have changed this and noted different implementations.
It is always not correct.
Flag is one byte, we can work with that as uint8_t.
Wrong way how to work with that is:

uint8_t Flag;
if(Flag == 1) // normal status
if(Flag == 2 || Flag == 3) // away
if(Flag == 4 || Flag == 5) // server

That is not how it is working in original NMDC. It is based on Bits, not value of whole byte.
Correct way is:

uint8_t Flag;
if(Flag & 0x2) // second bit is enabled -> away
if(Flag & 0x4) // third bit is enabled -> server
if(Flag & 0x8) // 4 bit is enabled -> fireball
if(Flag & 0x40) // 7 bit is enabled -> IPv4
if(Flag & 0x80) // 8 bit is enabled -> IPv6

Quote from: Ullner on 16 January, 2013, 23:27:20
In that link, you reference IP64, TLS and TLS1. Do you have any documentation of those?
IP64 is in PtokaX Wiki http://wiki.ptokax.org/doku.php?id=dcprotocol:hub_client:ipv6:ip64 with it's sister IPv4 http://wiki.ptokax.org/doku.php?id=dcprotocol:hub_client:ipv6:ipv4
TLS is documented on strongdc++ forum http://strongdc.sourceforge.net/forum/viewtopic.php?f=11&t=5528 (http://strongdc.sourceforge.net/forum/viewtopic.php?f=11&t=5528). BigMuscle used my idea that was posted long time ago on nighthawk forum and first implemented in flowlib http://www.czdc.org/flowlib-TLS-PPK.png and added TLS to supports so ho claim it as his extension ;D
TLS1 don't have public documentation, it is not implemented in any public software yet.
Quote from: Ullner on 16 January, 2013, 23:27:20
I have added a note about this; in what version did DC++ start doing this?
In 0.17 for client connections and in 0.300 for hub connection. It is dc++ extension, it is documented without space in Extensions.txt file that is distributed with dc++ source. But implemented with space.
Quote from: Ullner on 16 January, 2013, 23:27:20
I used the Teamfair wiki (http://web.archive.org/web/20090312025059/http://www.teamfair.info/wiki/index.php?title=%24UserIP) for this. Do you mean that $UserIP2 is required to have multiple nicks/IPs?
In UserIP version 1 (don't have anything in supports) client sending request $UserIP nick| and hub reply with $UserIP nick ip|, it is behave as getinfo -> myinfo in original nmdc. In UserIP version 2 (UserIP2 in supports) is no request and hub can send userip with single user $UserIP nick ip| or multiple users $UserIP nick1 ip1$$nick2 ip2$$|, this is like nicklist in original nmdc.
Quote from: Ullner on 16 January, 2013, 23:27:20
How do you mean violate? What does it do (in)correctly? Any suggestions on what to add to the documentation to make it clear?
Document state (and it was like this documented in original Extensions.txt what is distributed with dc++ source) "$UGetBlock must be implemented if XmlBZList is advertised". In DC++ was $UGetBlock supported from 0.307 to 0.695 and in 0.696 it was removed. XmlBZList is supported from 0.307 and in Extensions.txt was info related to $UGetBlock changed with 0.696.

And now what i'm noticed in version 1.2  :P
Quote
4.2.32. $BotList
It is listed in normal commands, but it is extension.

Quote
4.3.25. $MultiConnectToMe
4.3.26. $MultiSearch
That is not extension but it is in original protocol, it was part of original hub linking.
Title: Re: NMDC project
Post by: PPK on 17 January, 2013, 01:48:43
Flag in NMDC 1.0.
User PePeKa have enabled bits 1, 2, 4, 7, 8 (away, fireball, ipv4, ipv6 and first bit is nothing). Integer value of flag is 203, but it is shown in NMDC 1.0 correctly as fireball away :)
User PPK_DC1 have enabled bits 1 and 7 (ipv4 and nothing), integer value of flag is 65. And it is correctly shown as user without special status ;D

(http://www.czdc.org/dc1-flag-bits.png)
Title: Re: NMDC project
Post by: PPK on 17 January, 2013, 22:43:35
UserIP version 1 original documentation http://web.archive.org/web/20030807125211/http://dc.ade.se/dcext/
UserIP version 2 documentation in old DC++ wiki (see parts from sedulus, fusbar and arnetheduck) http://web.archive.org/web/20040810023755/http://dcplusplus.sourceforge.net/wiki/index.php/UserIP%20command
Title: Re: NMDC project
Post by: Ullner on 19 January, 2013, 23:56:53
All items mentioned are in the current SVN, rev 18 (http://nmdc.svn.sourceforge.net/viewvc/nmdc/trunk/NMDC.txt?revision=18&view=markup).