Forum on hiatus

The forums are on hiatus for now. Anyone visiting the site has noticed its lackluster (understatement) response time. Although the response time is largely due to attacks targeting dcpp.net or the machine it is hosted on, some of the legitimately generated load is from the forum. I’ve taken it down to be kinder to our host (recall my old post). I’d like to apologize to the end users looking to get support who are inconvenienced by this action. If you’re one of them, please make sure you check out the FAQs.

Once upon a time there was a notification

Once upon a time there was a notification and it caused hubs to be ‘flooded’ by DC++…

When you are changing your slots, or share, or… anything that is contained in a $MyINFO, DC++ will send a new $MyINFO, indicating a change of your client information.

This notification means that every hub you are on will receive an arbitrary amount of data. If people are sending this information only once in a while, like every hour or so, the hub will no problem with the bandwidth being used.

Mostly, this isn’t a problem. Joining/parting of hubs is done seldom on a regular basis. Slot changes follow in the same scheme since there isn’t much point in constantly changing your slots, unless you need to obey hub rules about hub/slot count, which is rather bound to joining and parting a hub. The automatic refresh in DC++ will (as default) kick in every hour, so that obey rather nicely with our “like every hour so” scheme. Plus, how often do you sit and press ‘Ctrl+E’ to refresh the share?

However, as someone may note by now, my assertions of the refresh timing are just that; Assertions. Meaning that (1) the “auto refresh” value is configurable and (2) someone might want to refresh their share often when a friend is after some specific set of files.

When a refresh is initiated in DC++, DC++ will go through the folders that are shared and see if some file is added or removed and then act upon it. Then DC++ will, if anything in the share changed, notify the hubs by sending a notification, as I said above.

If we apply this to our hourly notification, this isn’t a problem. However, if we apply it to a low value for “auto refresh” and/or a frequent manual refresh triggering, we got ourselves a problem.

Like, if you have automatic refresh set to ‘2’, DC++ will refresh the share every two minutes, and assuming that you have a constantly changing share, DC++ will send a notification every two minutes to every hub. Many hub owners probably say now “hell no. I’m going to complain!”. Well, don’t. You see, it used to be like that. And may I assure you, there were complaints.

Instead, a new scheme for notifications in DC++ was written, explicitly focusing on the share.

This new scheme meant that DC++ will keep track of when it sent the last notification. Since DC++ keep track of when the last notification was sent, it can choose to not send a $MyINFO if the last one was too close to the current one. This time can be found in the creation of $MyINFO in DC++, and it is 15 minutes (give or take a few seconds, depending on some internal function stuff).

In essence, this is how DC++ decide if it should send a notification;
myinfo = everything about $MyINFO that DC++ is to send out, except the share
myinfo_share = the share info
if the last myinfo is different from the current myinfo; send the $MyINFO, or
if the last myinfo_share is different from the current myinfo_share and it has elapsed 15 minutes; send the $MyINFO
Note that this means that the 15 minute barrier does not apply if eg the slots change.

Also, note that this type of ‘cleverness’ by DC++, concerning the share, does not apply to ADC hubs; Only NMDC are affected by this.

Before someone comment “so does this mean that people can’t see my newly added files, if I refresh more often than 15 minutes apart?” No, it does not. This have no effect on your file list generation. It is only the notification for hubs (in other words, the hub window’s user list).

Don’t forget that you can make topic suggestions for blog posts in our “Blog Topic Suggestion Box!”

DC++ like Visual Studio with a Service Pack

When work on 0.699 begun, it was noted that it will require Visual Studio 2005 (or ‘8’) to be able to be compiled. When the DC++ version was complete, service pack one for Visual Studio had been released, and it is now a requirement for DC++’s entire feature set. DC++ will still be able to be compiled without the SP, but you will most likely encounter some warnings and weird crashes if you aren’t.

Don’t forget that you can make topic suggestions for blog posts in our “Blog Topic Suggestion Box!”

Debug ADC!

If you’re wondering about how raw ADC messages look like in action, you should definitely enable AdcDebug.

Since most users don’t need or would want to see an option that could do that, there is no graphical way of doing it. Instead, you must add the following line to DCPlusPlus.xml;

<AdcDebug type=”int”>1</AdcDebug>

… where the ‘1’ indicate that you do want to see raw ADC messages and ‘0’ would indicate that you don’t want to see them.

Be warned; If you enter a busy hub, DC++ will ‘flood’ you with text, possibly causing DC++ to freeze. If you intend to use the information, I suggest you enable logging and use the log file to go over the info.

Don’t forget that you can make topic suggestions for blog posts in our “Blog Topic Suggestion Box!”

Cache it!

Once in a while, there come a release which contain a little bit of everything. And 0.699 is such a release.

The new version mean a major difference for developers, as Todd mentioned.

A lot of people have flamed us for not including more hub lists (even though it takes, what, a minute [at most] to search the intarweb and replace them?), but there are now two more included lists. The hub list you download is now cached, which means that it’ll be stored on your computer and re-used next time you use public hubs (unless you explicitly tell DC++ to re-download it). This will mean that hub lists will take fewer hits and users of DC++ will always have a (or at least one) hub list as a backup.

Beyond caching the hub list, some other “security” things have been worked out. The most interesting is the fact that DC++ will now check if it ever was connected to a hub before it will auto connect to that hub.

If you were around the time when cologic (the BCDC++ author) added user’s IP in the transfer view (around .307, I think), I think you’ll love/hate him even more. The reason? Well, he has now added user’s IPs in the hub frame! Note that all hubs don’t automagically send everyone’s IP, so don’t assume it’s broken because it may be blank on the hubs you frequent.

And oh… If you are writing FAQs on each settings window in DC++, you’ll have to change some of them; There’s a new page; ‘Tabs’.

All in all, I suggest you download this new version.

Don’t forget that you can make topic suggestions for blog posts in our “Blog Topic Suggestion Box!”

Client Information And You: The Stats

Today, I’ll show you some stats on $MyINFO vs INF. Statistics are always hard to accurately create. Usually, they flat out lie or are over exaggerated. But I’ll do my best anyway…

The following is a structure over $MyINFO and INF. The $MyINFO example is what I gathered from the Wiki. The INF example is a direct copy of what is being sent when I took a fresh copy of DC++. Notice that I’ve used a minimum amount of information in both client informations.

ADC’s INF is first;
BINF M36B IDLI4ATHPD5P7NNWKI3RHMS5QFUXFCRKDTXXXCLHI NInick DEdesc SL1 SS0 SF0 EMemail HN1 HR0 HO0 VE++\s0.699 US5242 I41.1.1.1 U41 SUTCP4,UDP4\n
That is 143 characters, or 143 byte sent to each client in the hub. You may notice that the IP is there, and as well a UDP port. The third “word” (IDLI4A…) is (disregard the ID, since it’s the identifier) the CID. Now, you need to put on 42 characters to count on the instream for the hub (the PID is sent to the hub, it’s 39 characters, plus two for the identifier and one for separator [space]). This means that there’s 185 bytes in per user, and 143 out per user.

Let us take a look at NMDC’s $MyINFO;
$MyINFO $All nick desc $ $DSL1$email$0$|
That conclude to 69 characters, or bytes. Wow. That’s a major difference, isn’t it? (I don’t know enough about NMDC to accurately say if this is the same in the instream for the hub as the outstream. Sorry. And oh, I’m not entirely sure the $MyINFO examples are exactly correct. It doesn’t really matter. Read on.)

Alright, but let us now consider this: Users don’t just idle in the hub. They interact with the hub. They change share and slots. Let us now consider the case of when a client change slots from ‘1’ to ‘2’.

$MyINFO $All nick desc $ $DSL1$email$0$| — 69 byte
vs
BINF M36B SL2\n — 14 byte
Now we are getting a totally different picture.

Alright, after someone has logged in and sent a slot change;
NMDC: 138
ADC: 157 (199 – the first value is counting with 143, second with 185.)

Let us change our share from 0 files and 0 B share, to 1 byte and 1 file.

$MyINFO $All nick desc $ $DSL1$email$1$| — 69 byte
vs
BINF M36B SS1 SF1\n — 18 byte

And the score now is… NMDC is 207, and ADC is 175 (217). I hope you can see the picture. NMDC scale very linear, at a “constant” rate of 69 bytes. As you can see, ADC will use less bandwidth than NMDC after the (“or around there”) forth client information broadcast. (Consider eg that DC++ has a automatic refresh that is triggered every 60 minutes [default], and if the share change “rapidly”, ADC gain some bandwidth in comparison to NDMC after the forth hour.)

Don’t forget that you can make topic suggestions for blog posts in our “Blog Topic Suggestion Box!”

Client Information And You: The Information.

If you’ve been reading this blog, you probably have seen me mention that one of ADC’s strengths is its extensibility. And the client information, INF, is not an exception.

The INF consist of two parts, an identifier and its data. This is a major change in regards with $MyINFO; The INF doesn’t have a pre-defined structure on how things are to be sent, and one can just send information if he or she pleases. (Bear in mind that the hub might disconnect you if you do.)

The INF in ADC add a lot of information that $MyINFO doesn’t; Global client identification, more specific transfer information and UDP port are among the new information that can now be sent. Ah, and also, the hi-jacking of the description, for the tag, isn’t an issue anymore since there are specific identifiers designed for all of the parts in the tag.

Something that hub developers may like, is the fact that there is no requirement to forward any part of the INF. Every client is required to work without any field. (Though, nick might be advisable. ;) ) Also, the hub have the power to require certain INF identifiers (and act upon it if the client doesn’t provide them).

Something that is a nice feature for hub owners is that everything is sent in a incremental way. This means that you only send those parts that actually changed. Say, if only your share changed, there is really no need to advertise what your nick is (since it didn’t change).

Unfortunately, the initial INF is very large compared to $MyINFO. This is what DC++ sends (note that not all clients do/will behave this way); PID and CID combination (CID is the global client identifier, and PID is a verification the CID is correct), IP-address (if you’ve entered it in settings), UDP port (same as previous), amount of files you are sharing and how much it is in bytes, version of DC++ (“DC++ 0.698” eg), slots, e-mail, nick, description and how many hubs you are “normal”, registered and operator in. (There is a few more, but the list kept growing so I stopped.)

I’m sure all of you are now looking also at the draft, and noticing that the identifiers are only two characters. This is correct, and means that there is a restriction on how many different combinations there are. (I think the allowed characters are A-Z and 0-9, but I’m not sure. [I’m probably wrong, but it’s around that ball park.])

Alright, this concludes this edition of Client Information And You. Since I’m sure a lot are interested in some stats, I had next planned Client Information And You: The stats.

Don’t forget that you can make topic suggestions for blog posts in our “Blog Topic Suggestion Box!”

Client Information And You: My Information

It has undergone a few changes through the years, it has been through several heated discussions and a few have wondered about it day and night. No, I am not talking about Britney Spears’s belly. I am talking about NMDC’s $MyINFO.

The information you may find in $MyINFO is (the client’s) nick, description, connection type (and some more info on it), e-mail and share size.

This command is sent during login and will be completely re-broadcast if any of these parts change. As many may notice at this point is that this is quite annoying, stupid and pointless. If don’t get it, then consider the scenario where your share size change (constantly) while the other types of information remain intact. This will cause your client to send information about itself that people already know. Why should they want to see your nick or description again if only your share size changed? This is one of the short comings of NMDC’s $MyINFO.

One of the major changes made to $MyINFO (that some consider) is the “hijacking” of the description. This is the addition of the tag (that originally came from DC++, do to pressure from hub owners, requiring DC++ to notify how many hubs it was in [since the original NMDC client was only capable of connecting to one hub simultaneously]). Of course, this was more a client and hub implementation standard, rather than a protocol standard (there’s no definition of any of the NMDC commands, remember?).

Some decided, at some point, that instead of hijacking any other part of the description (or $MyINFO), that it would be best to provide (and get) client information through extensions. ClientID for “global identifier”, UserIp for getting users’ IP and so on.

What is great about $MyINFO, $ClientID and all of the other NMDC client informational commands? It is that they are relatively short and concise. They provide a nice deal for client developers, since they don’t require that you implement them all at once. They don’t rely on each other, so you can send one but don’t need to send the other.

Unfortunately, their problems are equally important to know. Like I said about $MyINFO, it (and other NMDC commands) has a problem with re-broadcasting of already established information. Also, none of the current commands are (easily?) extensible. That means that if you want to make a small change, you need to (1) change it in your client (duh!), (2) change it in today’s hub softs and, hopefully, (3) notify others by posting on eg the DC++ wiki.

This was everything from this edition of Client Information And You. Next up is Client Information And You: The Information.

Don’t forget that you can make topic suggestions for blog posts in our “Blog Topic Suggestion Box!”

Client Information And You

One of the important parts of NMDC and ADC, is the exchange of client information. In NMDC we have MyINFO and in ADC we have INF.

I had planned on discussing the upsides, downsides and everything in between about these exchanges. But instead of writing one massive post, I thought I would split them up in segments. So, I bring you Client Information And You, the series.

To start these series, I should explain what the actually do (beside the somewhat ambiguous “exchange of client information”).

So, what do I mean? I mean the exchange of client information. (Duh!)

This is the part of the protocol(s) where the client send specific information about itself to the hub (which then relay the information to the other clients).

This information ranges from nick, to client version to the amount of hubs the client is operator in.

These types of information reveal nothing of true importance, from a security stand point. And from a general point of view, they are simply informational, and only provide the information for the benefit of the network. Spoofing the information is extremely easy, although it require that you have some coding skills (or know someone who do).

Stay tuned for the next part in our series, Client Information And You: My Information.

Don’t forget that you can make topic suggestions for blog posts in our “Blog Topic Suggestion Box!”

Answer to pop quiz: Searching magically work

Since we had such a gigantic outcome of the last pop quiz, I thought I would wait posting the answer.

Riiiiiiiight.

Anyway… Let us get down to business. “Why was user B unable to find the file (especially when the switch was off) and why did it ‘magically’ work after 10 minutes?”

Well, I guess we need to clear up if the switch was on or off when he searched those 8-9 times. Of course, it was ON. This can be easily figured out by noticing that user A was able to search and thus meaning “user B” sent out a massive 8-9 searches at once.

So, does this give us more information as to why user B where unable to find the file, after the switch was OFF? First of all, you need to understand a crucial feature of DC++; If DC++ see a user that searches more than 5 searches in 7 seconds, it (DC++) will think of the searching as “search spam”.

Ok. We’ve all seen “search spam” in chat, and it’s pretty easy to figure out what it meant when we see it (though the exact triggering stats may be difficult to guess).

What most people don’t know is what happens after you see that “search spam” notice. What happens is that DC++ see and think: “search spam. huh, that client is trying to spam me with his searches. If he want to play that game, fine. I can play also”. This “playing” that DC++ does, means that DC++ automagically refuses to answer that client’s searches for the following 2 minutes!

So in the case of this problem, user B caused a “search spam” in the other user’s client and it refused to answer user B’s following searches. Since user B waited 10 minutes for the next search, the “search ban” had been lifted and the client was answering to user B’s searches.
And the side question, “Was AHUB a NMDC hub or a ADC hub, or does it not matter?” is most easily answered by looking in NmdcHub.cpp and AdcHub.cpp in the DC++ source. Well, since I don’t require you to do that, I’ll answer it. It was a NMDC hub, and simply because there is no such code for ADC hubs (in DC++). So you won’t see a “search ban”, and not even a “search spam” in ADC hubs.

The inspiring FAQ entry that I had in mind that mention this, is the How do I protect myself from search spam in DC++? article.

Don’t forget that you can make topic suggestions for blog posts in our “Blog Topic Suggestion Box!”

Design a site like this with WordPress.com
Get started