ADC DCTM and INF fields

Technical discussion about the NMDC and <a href="http://dcpp.net/ADC.html">ADC</A> protocol. The NMDC protocol is documented in the <a href="http://dcpp.net/wiki/">Wiki</a>, so feel free to refer to it.

Moderator: Moderators

Locked
konfucius
Posts: 1
Joined: 2005-11-22 18:45

ADC DCTM and INF fields

Post by konfucius » 2005-11-22 19:41

Hi,

Im new to the ADC protocol and is tinkering with a client for it. I have some question about the protocol. This is the packet dump from connecting to an ADC hub (adc://Xa3r0.no-ip.org:8090) with DC++ 0.674

Code: Select all

>HSUP LBHGTMCTBLO3K +BAS0
<ISUP O2GYXJEJAABFQ +BASE +UCMD
>BINF LBHGTMCTBLO3K NI[10Mbit]kablammo SL2 SS141070519836 SF8124 HN0 HR0 HO0 VE++\s0.674 I40.0.0.0 U431999
<IINF O2GYXJEJAABFQ NIDCNet-X DEDCNet-X\sADC\sHub\sVersion\s0.115 VEDCNet-X\s0.115 OP1 HU1
<BMSG O2GYXJEJAABFQ DCNet-X\sADC\sHub\sVersion\s0.115
<BINF GN4ILZB2C3HR2 I481.227.3.213 U420622 SS10764223551 SF1763 VE++\s0.674 SL3 NIGAIS HN0 HR6 HO21
>DCTM LBHGTMCTBLO3K GN4ILZB2C3HR2 ADC/0.9 31999 3777279679


The last line is generated when Im connecting to another user. What is the number on the end of the DCTM message? Is this the token or is DC++ not currently using it?

Second question

Code: Select all

<CSUP GN4ILZB2C3HR2 +BASE
>CSUP LBHGTMCTBLO3K +BASE
<CINF LBHGTMCTBLO3K CILBHGTMCTBLO3K
<CINF GN4ILZB2C3HR2 CIGN4ILZB2C3HR2 TO
>CGET LBHGTMCTBLO3K file files.xml.bz2 0 -1
<CSND GN4ILZB2C3HR2 file files.xml.bz2 0 72792


This is the tcp stream from a direct connection. The CINF messages seems to have a CI-field and I couldnt find it in the specs. Also the CSUP sends a +BASE in contrast to +BAS0 in the hub communication. Is DC++ simply using the old dc protocol for client - client communication?

-erik

GargoyleMT
DC++ Contributor
Posts: 3212
Joined: 2003-01-07 21:46
Location: .pa.us

Re: ADC DCTM and INF fields

Post by GargoyleMT » 2005-11-23 09:06

konfucius wrote:Is this the token or is DC++ not currently using it?

It is the token, but it's not in the same format as the current specification wants.

Code: Select all

send(AdcCommand(AdcCommand::CMD_CTM, user.getUser()->getCID()).addParam(CLIENT_PROTOCOL).addParam(Util::toString(SETTING(TCP_PORT))).addParam(token));


konfucius wrote:This is the tcp stream from a direct connection. The CINF messages seems to have a CI-field and I couldn't find it in the specs. Also the CSUP sends a +BASE in contrast to +BAS0 in the hub communication. Is DC++ simply using the old dc protocol for client - client communication?

No. +BAS0 is sent because there needs to be a way to distinguish ADC 1.0 clients from clients that were made in the testing phase. And CI is another thing that's not in the spec, for whatever reason:

Code: Select all

   void inf(bool withToken) { 
      AdcCommand c(AdcCommand::CMD_INF);
      c.addParam("CI", SETTING(CLIENT_ID));
      if(withToken) {
         c.addParam("TO", getToken());
      }
      send(c);
   }


We're generally on the DCDev public hub if you want a more spirited discussion about ADC.

Locked