miniupnp.tuxfamily.org Forum Index miniupnp.tuxfamily.org
The forum about miniupnp and libnatpmp
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

Binding to a specific network interface

 
Post new topic   Reply to topic    miniupnp.tuxfamily.org Forum Index -> miniupnpc Compilation/Installation
View previous topic :: View next topic  
Author Message
poy



Joined: 12 Dec 2010
Posts: 5

PostPosted: Fri Apr 08, 2011 5:00 pm    Post subject: Binding to a specific network interface Reply with quote

hi,

in DC++, we have been using MiniUPnP for several months, and it has been working very well so far! (there is a praiseful post at the bottom of https://bugs.launchpad.net/dcplusplus/+bug/230973 which would certainly be deserved for MiniUPnP as well.)

there is a setting in DC++ called "bind address", which can be filled with the IP of one of the network cards connected to the computer. the setting is then used instead of INADDR_ANY in socket bind calls.

i would like to know whether this setting could be useful to apply to UPnP (and to NAT-PMP too since we have just added libnatpmp as well).

here is a case where such a network selection setting could solve a user problem: https://bugs.launchpad.net/dcplusplus/+bug/748623
i have tried to use the "multicastif" param of the "upnpDiscover" function to specify the bind address setting, but that doesn't seem to take.

is it useful for UPnP / NAT-PMP to select the network device to bind to? if so, is there a way to force such a setting with MiniUPnP / libnatpmp?

thanks for any pointers.
Back to top
View user's profile Send private message
miniupnp
Site Admin


Joined: 14 Apr 2007
Posts: 1477

PostPosted: Mon Apr 11, 2011 1:59 pm    Post subject: Reply with quote

yep, the multicastif parameter of upnpDiscover() should make it...
The multicast packets will be sent using this interface, and that should allow you to discover the UPnP device.
Once the discovery process is done, all communication with the UPnP device is done via HTTP so no need to specify which interface to use, the TCP/IP stack will route the packet correctly Smile

Have you more details on the setup where this is not working ?
_________________
Main miniUPnP author.
http://miniupnp.tuxfamily.org/
Back to top
View user's profile Send private message Visit poster's website
poy



Joined: 12 Dec 2010
Posts: 5

PostPosted: Mon Apr 11, 2011 7:49 pm    Post subject: Reply with quote

my bad, i was using the wrong IP when calling UPNP_AddPortMapping!

thanks for a great lib! Smile
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    miniupnp.tuxfamily.org Forum Index -> miniupnpc Compilation/Installation All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group
Protected by Anti-Spam ACP
© 2007 Thomas Bernard, author of MiniUPNP.