Attempting UPNP for DC++
Moderator: Moderators
-
- Posts: 21
- Joined: 2004-08-08 09:12
Attempting UPNP for DC++
I did email the DC++ author, but did not hear back..
I am looking at implementing UPnP capability for DC++ I was just checking nobody is already working on it before I start.. (well actually, I am already about 40% done)...
I also have 1 small question...
Does DC++ protocol only use 1 port (SearchManager::getInstance()->setPort(); )?
I am looking at implementing UPnP capability for DC++ I was just checking nobody is already working on it before I start.. (well actually, I am already about 40% done)...
I also have 1 small question...
Does DC++ protocol only use 1 port (SearchManager::getInstance()->setPort(); )?
-
- Forum Moderator
- Posts: 1420
- Joined: 2003-04-22 14:37
-
- DC++ Contributor
- Posts: 3212
- Joined: 2003-01-07 21:46
- Location: .pa.us
-
- Posts: 21
- Joined: 2004-08-08 09:12
-
- DC++ Contributor
- Posts: 3212
- Joined: 2003-01-07 21:46
- Location: .pa.us
If you're distributing programs derived from the DC++ source, you just need to obey the GPL.mgillespie wrote:I don't want to tread on toes, or upset people...
In particular, make sure you have 95/98/ME testers, as well as 2k and XP ones.
The code will likely need to make use of the existing OS detection code to avoid running the UPnP code (and loading the required DLL[s]) on platforms that don't support it, like anything older than XP.
-
- Posts: 21
- Joined: 2004-08-08 09:12
I believe it's only XP and newer that support UPnP anyway, so was planning on disabling the option on everything else.. I was going to leave the option in the advanced settings page, label it as (Windows XP or later required) and then do a OS check just prior to enabling the UPnP ports.
The code I have so far is pretty self contained, most of the UPnP stuff being in a single UPnP class (in a seperate UPNP.cpp), with only a few lines of code in the existing code and the addition of the preference to use it (defaulting to disabled). Am thinking from a patch acceptance point of view..
I'm hoping to have something working this week, depending upon time and other stuff I got on..
The code I have so far is pretty self contained, most of the UPnP stuff being in a single UPnP class (in a seperate UPNP.cpp), with only a few lines of code in the existing code and the addition of the preference to use it (defaulting to disabled). Am thinking from a patch acceptance point of view..
I'm hoping to have something working this week, depending upon time and other stuff I got on..
-
- DC++ Contributor
- Posts: 3212
- Joined: 2003-01-07 21:46
- Location: .pa.us
-
- Posts: 21
- Joined: 2004-08-08 09:12
Have got a test build with UPnP support..
http://www.mgillespie.plus.com/DCPlusPlus-UPNP.zip
Make sure you read the PDF file in the zip
any questions/comments/bitches etc, use the email at the botton of the PDF...
http://www.mgillespie.plus.com/DCPlusPlus-UPNP.zip
Make sure you read the PDF file in the zip
any questions/comments/bitches etc, use the email at the botton of the PDF...
I tested it on my XP box, but without any luck. The log file indicates that it failed to create port mappings and then failed to remove port mappings. The first time I enabled the advanced option DC++ crashed on exit generating the exception dialog. But since there is no .PDB included with that distribution, no exceptioninfo.txt was created.
Your binary did not crash ever again even after repeated opening and closing. However, each open and close wrote an error mapping ports to system.log
I tried it on my other XP box which has SP2 installed, but with the same results. The new firewall displays services differently, but it's still the same concept.
That brings me to the testing instructions. Isn't the pupose of using UPnP to automatically configure an external routing device (one which supports UPnP, anyway)? I do have a router which supports UPnP and it is enabled in settings, but I've never used any software which takes advantage of it. So, would you mind outlining exactly what this patch is meant to do? Sorry, I'm a bit lost.
Your binary did not crash ever again even after repeated opening and closing. However, each open and close wrote an error mapping ports to system.log
I tried it on my other XP box which has SP2 installed, but with the same results. The new firewall displays services differently, but it's still the same concept.
That brings me to the testing instructions. Isn't the pupose of using UPnP to automatically configure an external routing device (one which supports UPnP, anyway)? I do have a router which supports UPnP and it is enabled in settings, but I've never used any software which takes advantage of it. So, would you mind outlining exactly what this patch is meant to do? Sorry, I'm a bit lost.
-
- Posts: 21
- Joined: 2004-08-08 09:12
The testing instructions are purely that, confirmation that things are doing what they should, under nomal useage, you would not do them,,,
Do you have the UPnP settings dialog as shown in the PDF? By the sounds of it, you may have UPnP disabled on your router. or switched of in XP. I may need to tweak it to check for UPnP before attempting to create the connections...
The patch automatically creates UPNP port mappings, and removes them when the application closes.
As for the crash, I think I have found that problem. Basically, it was trying to remove ports that has not been created. the 1st time the option i switched on and the application was closed. Did it crash on closing??
I have updated the zipfile with a new binary that fixes this (obvious) mistake...
Do you have the UPnP settings dialog as shown in the PDF? By the sounds of it, you may have UPnP disabled on your router. or switched of in XP. I may need to tweak it to check for UPnP before attempting to create the connections...
The patch automatically creates UPNP port mappings, and removes them when the application closes.
As for the crash, I think I have found that problem. Basically, it was trying to remove ports that has not been created. the 1st time the option i switched on and the application was closed. Did it crash on closing??
I have updated the zipfile with a new binary that fixes this (obvious) mistake...
-
- Posts: 21
- Joined: 2004-08-08 09:12
-
- Posts: 21
- Joined: 2004-08-08 09:12
-
- Posts: 21
- Joined: 2004-08-08 09:12