Author Topic: NMDC project  (Read 3399 times)

0 Members and 1 Guest are viewing this topic.

Offline Ullner

  • Newbie
  • *
  • Posts: 3
  • Karma: +0/-0
NMDC project
« on: 15 January, 2013, 19:40:23 »
Not so long ago, I started the NMDC project at SourceForge as a resource for NMDC documentation 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.

PtokaX forum

NMDC project
« on: 15 January, 2013, 19:40:23 »

Offline PPK

  • Administrator
  • Emperor
  • *****
  • Posts: 1 475
  • Karma: +209/-22
  • PtokaX developer
Re: NMDC project
« Reply #1 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

Quote
If 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

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

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

Quote
4.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

Quote
4.2.28. $UserIP
Quote
4.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.

Quote
4.2.33. $HubINFO
Same as previous.

Quote
4.2.35. $HubTopic
Same as previous.

Quote
4.2.39. $BotList
Same as previous.

Quote
4.2.47. $Supports
Again extension. Common bug is extra space after last support.

Quote
4.2.48. Capabilities
And again extension ;D

Quote
4.2.49. IN
Again ...

Quote
4.2.50. MCTo
Again ..

Quote
4.2.51. $NickChange
Again ..

Quote
4.2.52. $ClientNick
Again ..

Quote
4.2.53. FeaturedNetworks
Again ..

Quote
4.2.54. $Z
Again ..

Quote
4.2.55. $GetZBlock
Again ..

Quote
4.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.

Quote
4.2.57. $UGetZBlock
Again extension.

Quote
4.2.58. $GetTestZBlock
Again.

Quote
4.2.60. $ClientID
Again.

Quote
4.2.61. $GetCID
Again.

Quote
4.2.62. $UserCommand
Again.

That is only few things that i'm noticed. I'm not readed whole document  ::)
« Last Edit: 15 January, 2013, 23:21:41 by PPK »
"Most of you are familiar with the virtues of a programmer. There are three, of course: laziness, impatience, and hubris." - Larry Wall

Offline Ullner

  • Newbie
  • *
  • Posts: 3
  • Karma: +0/-0
Re: NMDC project
« Reply #2 on: 16 January, 2013, 23:27:20 »
Quote
Incorrect... 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.

Quote
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
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.

Quote
Extensions...
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.

Quote
ADCSND and ADCGet
what should be sent in the $Supports?

Quote
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
I have changed this and noted different implementations. In that link, you reference IP64, TLS and TLS1. Do you have any documentation of those?

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

Quote
For both is documentation wrong. First one don't support multiple nicks/ips, only second one.
I used the Teamfair wiki for this. Do you mean that $UserIP2 is required to have multiple nicks/IPs?

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

Quote
DC++ 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.

Offline PPK

  • Administrator
  • Emperor
  • *****
  • Posts: 1 475
  • Karma: +209/-22
  • PtokaX developer
Re: NMDC project
« Reply #3 on: 17 January, 2013, 00:31:31 »
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.
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).
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.
what should be sent in the $Supports?
In supports is ADCGet ::)
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:
Code: [Select]
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:
Code: [Select]
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
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. 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.
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.
I used the Teamfair wiki 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.
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.
« Last Edit: 17 January, 2013, 00:55:38 by PPK »
"Most of you are familiar with the virtues of a programmer. There are three, of course: laziness, impatience, and hubris." - Larry Wall

Offline PPK

  • Administrator
  • Emperor
  • *****
  • Posts: 1 475
  • Karma: +209/-22
  • PtokaX developer
Re: NMDC project
« Reply #4 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

"Most of you are familiar with the virtues of a programmer. There are three, of course: laziness, impatience, and hubris." - Larry Wall

Offline PPK

  • Administrator
  • Emperor
  • *****
  • Posts: 1 475
  • Karma: +209/-22
  • PtokaX developer
Re: NMDC project
« Reply #5 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
"Most of you are familiar with the virtues of a programmer. There are three, of course: laziness, impatience, and hubris." - Larry Wall

Offline Ullner

  • Newbie
  • *
  • Posts: 3
  • Karma: +0/-0
Re: NMDC project
« Reply #6 on: 19 January, 2013, 23:56:53 »
All items mentioned are in the current SVN, rev 18.

PtokaX forum

Re: NMDC project
« Reply #6 on: 19 January, 2013, 23:56:53 »