View previous topic :: View next topic |
Author |
Message |
ramytabet
Joined: 14 May 2007 Posts: 12
|
Posted: Tue Jun 05, 2007 11:32 am Post subject: Fast Port Mapping possible? |
|
|
Hi there,
I have noticed in the code and in the given sample that you need
to initiate a discovery process (using upnpDiscover) in order to fill
the devlist variable then send a request to the IGD for port
mapping. As the discovery is a lengthy process, do u think it would be
possible to send a port mapping request to the IGD without discovering
the upnp IGD first? This would be very much useful for bittorrent p2p
applications where knowing the external listen port (if upnp mapping
succeed ) before contacting the tracker is vital.
Thank you for your time. |
|
Back to top |
|
|
miniupnp Site Admin
Joined: 14 Apr 2007 Posts: 1589
|
Posted: Tue Jun 05, 2007 11:49 am Post subject: Re: Fast Port Mapping possible? |
|
|
ramytabet wrote: | Hi there,
I have noticed in the code and in the given sample that you need
to initiate a discovery process (using upnpDiscover) in order to fill
the devlist variable then send a request to the IGD for port
mapping. As the discovery is a lengthy process, do u think it would be
possible to send a port mapping request to the IGD without discovering
the upnp IGD first? This would be very much useful for bittorrent p2p
applications where knowing the external listen port (if upnp mapping
succeed ) before contacting the tracker is vital.
Thank you for your time. |
The discovery process is mandatory in order to get the url where request are to be sent to the UPnP IGD. You would have to know this data in advance in order to bypass the discovery process. _________________ Main miniUPnP author.
https://miniupnp.tuxfamily.org/ |
|
Back to top |
|
|
miniupnp Site Admin
Joined: 14 Apr 2007 Posts: 1589
|
|
Back to top |
|
|
hanifkhan
Joined: 20 Dec 2014 Posts: 1 Location: Pakistan
|
Posted: Sat Dec 20, 2014 5:48 am Post subject: |
|
|
As the discovery is a lengthy process, do u think it would be
possible to send a port mapping request to the IGD without discovering
the upnp IGD first? This would be very much useful for bittorrent p2p
applications where knowing the external listen port (if upnp mapping
succeed ) before contacting the tracker is vital.
____________________
Are you worried about NS0-156 brain dumps dumps exam testking.us - LX0-101 brain dumps preparation? We offer up-to-dated hood practice questions and www.holycross.edu
Last edited by hanifkhan on Tue Jan 06, 2015 12:39 pm; edited 1 time in total |
|
Back to top |
|
|
miniupnp Site Admin
Joined: 14 Apr 2007 Posts: 1589
|
Posted: Sat Dec 20, 2014 9:05 am Post subject: |
|
|
hanifkhan wrote: | As the discovery is a lengthy process, do u think it would be
possible to send a port mapping request to the IGD without discovering
the upnp IGD first? This would be very much useful for bittorrent p2p
applications where knowing the external listen port (if upnp mapping
succeed ) before contacting the tracker is vital. |
of course you can skip the discovery process if you already know the Root description URL of the device to use.
With the miniUPnPc library, just use the UPNP_GetIGDFromUrl() function.
Code: |
int
UPNP_GetIGDFromUrl(const char * rootdescurl,
struct UPNPUrls * urls,
struct IGDdatas * data,
char * lanaddr, int lanaddrlen);
|
use the -u argument of upnpc command line utility _________________ Main miniUPnP author.
https://miniupnp.tuxfamily.org/ |
|
Back to top |
|
|
|