Thread View: borland.public.cppbuilder.internet.socket
8 messages
8 total messages
Started by rogo
Wed, 14 Nov 2007 06:55
Port forwarding - NAT
Author: rogo
Date: Wed, 14 Nov 2007 06:55
Date: Wed, 14 Nov 2007 06:55
15 lines
1528 bytes
1528 bytes
I am using my laptop via wifi/router and a pc directly connected to the router, both have server programs on them but i have to setup them both manually via the router admin to allow outside connections to access each server. I want to do this automatically and i am under the unserstanding that its called port forwarding. 1) Can someone tell me if iphlpapi can be used for port forarding. 2) Is it only using the Upnp Api that i can accomplish this or is there other ways. 3) What would be BCB version of MS's CString Thanks in advance. P.S. i have MS code using Upnp but the stdafx just wont let me compile
Re: Port forwarding - NAT
Author: rogo
Date: Wed, 14 Nov 2007 07:21
Date: Wed, 14 Nov 2007 07:21
3 lines
1000 bytes
1000 bytes
Oops Sorry... sorted the CString out #include <Cstring.h>
Re: Port forwarding - NAT
Author: Remy Lebeau (TeamB)
Date: Wed, 14 Nov 2007 17:34
Date: Wed, 14 Nov 2007 17:34
39 lines
1913 bytes
1913 bytes
"rogo" <gui@tesco.net> wrote in message
news:473a9bd8@newsgroups.borland.com...
> I want to do this automatically
To do that, the router needs to support uPNP and have it enabled. XP has an
API available for uPNP:
http://msdn2.microsoft.com/en-us/library/aa382303.aspx
> i am under the unserstanding that its called port forwarding.
Yes.
> Can someone tell me if iphlpapi can be used for port forarding.
No, it cannot.
> Is it only using the Upnp Api that i can accomplish this
Yes.
> is there other ways.
You could write code that mimics a web browser so it can log into the router
admin and process the pages the same way a user would. That would be the
long way to accomplish what you want, though.
> What would be BCB version of MS's CString
AnsiString
> i have MS code using Upnp but the stdafx just wont let me compile
You will need to convert the code to BCB's equivilents.
Gambit
Re: Port forwarding - NAT
Author: rogo
Date: Thu, 15 Nov 2007 06:09
Date: Thu, 15 Nov 2007 06:09
53 lines
2443 bytes
2443 bytes
Thanks Remy.. I have managed to get my app working with the Upnp Api and automatically doing the port forwarding, but as you said the "Support Upnp" has to be enabled in the router admin. Is there any way of enabling this option via another via another library etc or will this definately have to be done by the end user. Thanks again "Remy Lebeau (TeamB)" <no.spam@no.spam.com> wrote in message news:473b31d4@newsgroups.borland.com... > > "rogo" <gui@tesco.net> wrote in message > news:473a9bd8@newsgroups.borland.com... > >> I want to do this automatically > > To do that, the router needs to support uPNP and have it enabled. XP has > an API available for uPNP: > > http://msdn2.microsoft.com/en-us/library/aa382303.aspx > >> i am under the unserstanding that its called port forwarding. > > Yes. > >> Can someone tell me if iphlpapi can be used for port forarding. > > No, it cannot. > >> Is it only using the Upnp Api that i can accomplish this > > Yes. > >> is there other ways. > > You could write code that mimics a web browser so it can log into the > router admin and process the pages the same way a user would. That would > be the long way to accomplish what you want, though. > >> What would be BCB version of MS's CString > > AnsiString > >> i have MS code using Upnp but the stdafx just wont let me compile > > You will need to convert the code to BCB's equivilents. > > > Gambit >
Re: Port forwarding - NAT
Author: Remy Lebeau (TeamB)
Date: Thu, 15 Nov 2007 17:22
Date: Thu, 15 Nov 2007 17:22
17 lines
1450 bytes
1450 bytes
"rogo" <gui@tesco.net> wrote in message news:473be282$1@newsgroups.borland.com... > Is there any way of enabling this option via another library etc Only if the router exposes its own API for remote access that you can code for, such as a Telnet interface. Otherwise, you would have manually parse each HTML page, like I suggested earlier. That would be highly router-specific. > will this definately have to be done by the end user. Most likely, yes. Gambit
Re: Port forwarding - NAT
Author: rogo
Date: Fri, 16 Nov 2007 19:09
Date: Fri, 16 Nov 2007 19:09
1 lines
965 bytes
965 bytes
Thanks for all your help.
Re: Port forwarding - NAT
Author: rogo
Date: Tue, 20 Nov 2007 20:48
Date: Tue, 20 Nov 2007 20:48
5 lines
1396 bytes
1396 bytes
I have managed to sort out thee NAT upnp side of things, but i have seen in another app where the option for NAT Upnp port mapping is there, but also NAT PMP port mapping... any idea what the NAT PMP one is.? Thanks
Re: Port forwarding - NAT
Author: Remy Lebeau (TeamB)
Date: Tue, 20 Nov 2007 22:55
Date: Tue, 20 Nov 2007 22:55
14 lines
1429 bytes
1429 bytes
"rogo" <gui@tesco.net> wrote in message
news:47434817$1@newsgroups.borland.com...
> any idea what the NAT PMP one is.?
Google is your friend:
http://search.yahoo.com/search?p=NAT+PMP&fr=yfp-t-471&toggle=1&cop=mss&ei=UTF-8
http://en.wikipedia.org/wiki/NAT-PMP
Gambit
Thread Navigation
This is a paginated view of messages in the thread with full content displayed inline.
Messages are displayed in chronological order, with the original post highlighted in green.
Use pagination controls to navigate through all messages in large threads.
Back to All Threads