Problems compiling? Don't understand the source code? Don't know how to code your feature? Post here.
Moderator: Moderators
-
jippekaka
- Posts: 6
- Joined: 2004-03-14 22:45
Post
by jippekaka » 2004-08-06 20:48
Hi, I am not so in to this c++ and such stuff, so I cant get this done without any help.
I would like to compile a DC++ client that gets the extern IP automatic, instead of doing this manually. Is this is a simple thing to do?

Dunno, for me it looks like a 4-5 lines of code or something like that.
I would appriciate any help, if anyone could help me.
-
TheParanoidOne
- Forum Moderator
- Posts: 1420
- Joined: 2003-04-22 19:37
Post
by TheParanoidOne » 2004-08-06 21:02
jippekaka wrote:Dunno, for me it looks like a 4-5 lines of code or something like that.
What gives you that impression?
-
jippekaka
- Posts: 6
- Joined: 2004-03-14 22:45
Post
by jippekaka » 2004-08-06 22:09
TheParanoidOne wrote:jippekaka wrote:Dunno, for me it looks like a 4-5 lines of code or something like that.
What gives you that impression?
Prove me wrong then...
-
TheParanoidOne
- Forum Moderator
- Posts: 1420
- Joined: 2003-04-22 19:37
Post
by TheParanoidOne » 2004-08-06 22:25
jippekaka wrote:TheParanoidOne wrote:jippekaka wrote:Dunno, for me it looks like a 4-5 lines of code or something like that.
What gives you that impression?
Prove me wrong then...
Huh? What are you talking about? I don't know how many lines of code it would be. I'm just wondering what makes you think it would be 4-5 lines.
-
Gasman1015
- Posts: 184
- Joined: 2003-05-26 16:29
- Location: UK
Post
by Gasman1015 » 2004-08-06 22:31
jippekaka wrote:TheParanoidOne wrote:jippekaka wrote:Dunno, for me it looks like a 4-5 lines of code or something like that.
What gives you that impression?
Prove me wrong then...
233 lines would just about do it.
edit: oops, my mistake, its 243.
Always remember you're unique, just like everyone else.
-
Twink
- Posts: 436
- Joined: 2003-04-01 04:31
- Location: New Zealand
Post
by Twink » 2004-08-07 04:47
i thought dc++ already did this as long as the hubs supported userip2??
-
GargoyleMT
- DC++ Contributor
- Posts: 3212
- Joined: 2003-01-08 02:46
- Location: .pa.us
Post
by GargoyleMT » 2004-08-07 14:28
Twink wrote:i thought dc++ already did this as long as the hubs supported userip2??
Sure, but it sounds like this user wants to get an ip from an external webpage.
The specifications for the project are weak.
-
GargoyleMT
- DC++ Contributor
- Posts: 3212
- Joined: 2003-01-08 02:46
- Location: .pa.us
Post
by GargoyleMT » 2004-08-07 14:29
jippekaka wrote:Dunno, for me it looks like a 4-5 lines of code or something like that.
It is zero lines of code. Use a dynamic hostname.
-
jippekaka
- Posts: 6
- Joined: 2004-03-14 22:45
Post
by jippekaka » 2004-08-07 16:39
Well, i meant getting extern IP that updates automatic in "active mode"-settings
-
GargoyleMT
- DC++ Contributor
- Posts: 3212
- Joined: 2003-01-08 02:46
- Location: .pa.us
Post
by GargoyleMT » 2004-08-07 17:15
GargoyleMT wrote:It is zero lines of code. Use a dynamic hostname.
Still applies. =)
I have a patch for this, but it's fugly - it's from 0.306.
-
Sedulus
- Forum Moderator
- Posts: 687
- Joined: 2003-01-04 14:32
Post
by Sedulus » 2004-08-07 17:38
Twink wrote:i thought dc++ already did this as long as the hubs supported userip2??
a simple grep revealed to me that this is not the case,
BCDC++ has it though (in NmdcHub.cpp)
-
mgillespie
- Posts: 21
- Joined: 2004-08-08 14:12
Post
by mgillespie » 2004-08-12 17:52
This would be the last piece of the puzzle for true automatic configuration, and would complement my UPnP patch nicely....
Just think, run it up, and it just works... Even behind a NAT... (as long as the NAT support UPNP)
-
GargoyleMT
- DC++ Contributor
- Posts: 3212
- Joined: 2003-01-08 02:46
- Location: .pa.us
Post
by GargoyleMT » 2004-08-13 00:28
mgillespie wrote:This would be the last piece of the puzzle for true automatic configuration, and would complement my UPnP patch nicely....
I had assumed that UPnP would let you get the external IP, so no hack to get the IP from a webpage would be needed.
-
mgillespie
- Posts: 21
- Joined: 2004-08-08 14:12
Post
by mgillespie » 2004-08-13 19:11
Just checked MSDN, it looks like it can....
Will get a 1st test release built, and then try to add the functionality to discover the external IP address....
-
mgillespie
- Posts: 21
- Joined: 2004-08-08 14:12
Post
by mgillespie » 2004-08-13 19:13
I think what I will do, if UPnP is enabled, disable the Acive IP textbox and determine the IP automagically. This sounds like a plan....
-
GargoyleMT
- DC++ Contributor
- Posts: 3212
- Joined: 2003-01-08 02:46
- Location: .pa.us
Post
by GargoyleMT » 2004-08-14 14:26
Yeah, or add another checkbox to the General Page, for UPnP support (on by default, disabled on non-xp or non-detected systems). I guess there may be a situation or two where someone wouldn't want it on. A double-NAT, I suppose. I also suppose that could be detected.
-
mgillespie
- Posts: 21
- Joined: 2004-08-08 14:12
Post
by mgillespie » 2004-08-14 18:50
Alrighty... I'm on a roll...
I got the external IP detection from the UPnP interface, the code it working fine. I just need to do some UI tweaks to integrate it all in...
With these changes, it should just work straight out of the box in Active Mode on a UPnP enabled system...

-
mgillespie
- Posts: 21
- Joined: 2004-08-08 14:12
Post
by mgillespie » 2004-08-14 23:38
OK, got the detection working via the UPnP interface,
If DC++ has the UPnP option enabled, and it can find a sensible looking interface address, it will populate the IP address itself and set the connection to Active, otherwise it will leave it alone.
On my system, it's working a treat.... I still need to decide if I want to disable the IP textbox and connection type settings, if I have automagically set them (thoughts anyone??)
Have updated my UPnP test binary with the latest code to include this.. Have also updated the PDF docs.
-
GargoyleMT
- DC++ Contributor
- Posts: 3212
- Joined: 2003-01-08 02:46
- Location: .pa.us
Post
by GargoyleMT » 2004-08-15 15:12
mgillespie wrote:With these changes, it should just work straight out of the box in Active Mode on a UPnP enabled system...

This sounds wonderful. (Just look at Help/Support - this is the #1 topic there.)
mgillespie wrote:Have updated my UPnP test binary with the latest code to include this.. Have also updated the PDF docs.
I'll give it a try.
-
mgillespie
- Posts: 21
- Joined: 2004-08-08 14:12
Post
by mgillespie » 2004-08-20 11:54
I'll give it a try.
Did you have any luck with it?
-
GargoyleMT
- DC++ Contributor
- Posts: 3212
- Joined: 2003-01-08 02:46
- Location: .pa.us
Post
by GargoyleMT » 2004-08-20 15:20
mgillespie wrote:Did you have any luck with it?
No, but I did update to SP2 in hopes that any UPnP support I didn't initially enable would magically work. I haven't checked into your mod since that update.
-
mgillespie
- Posts: 21
- Joined: 2004-08-08 14:12
Post
by mgillespie » 2004-08-21 19:50
By the sounds of it, UPnP is not enabled XP side.
Try opening Add/Remove Programs, Add/Remove Windows Components, "Neworking Services", Details, "UPnP User Interface", make sure it's installed.
-
Toodles
- Posts: 4
- Joined: 2004-07-30 19:12
Post
by Toodles » 2004-09-11 06:17
inet_address points to your external ip so it could actually be found in 1 line of code... not 243 or w/e. i would think....
-
mgillespie
- Posts: 21
- Joined: 2004-08-08 14:12
Post
by mgillespie » 2004-09-11 09:04
Not sure what you mean? Can you explain...
The external IP address we are referring to, is for NAT routers, where you have to use the NAT router address as your external address, NOT your internal LAN address (which is easy to find using 1 line of code).
If anyone is having problems getting UPnP working, I have a test program that interrogates all your LAN interfaces, and tells you if Windows thinks they are UPnP enabled:
Get it here:
http://www.mgillespie.plus.com/UPnPTest.exe
Before DC++ UPnP will work, you need to get atleast 1 interface reporting that it's UPnP capable.
XPSP2 fixes some UPnP issues, so any problems, it's worth getting that.
Users browsing this forum: Google [Bot] and 0 guests