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 

About the macro NAT-PMP and ENABLE_NATPMP

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



Joined: 22 Mar 2012
Posts: 17

PostPosted: Tue Jul 10, 2012 3:00 am    Post subject: About the macro NAT-PMP and ENABLE_NATPMP Reply with quote

Hello:
In the file of miniupnpd.conf ,it includes:
Code:
# enable NAT-PMP support (default is no)
#enable_natpmp=yes

In the file of config.h ,it includes:
/* Comment the following line to disable NAT-PMP operations */
Code:
#define ENABLE_NATPMP


My question is:
Do they have the same functions?
If I want to realize the feature about Port Mapping, do they all need uncomment?
Thanks.
Back to top
View user's profile Send private message
miniupnp
Site Admin


Joined: 14 Apr 2007
Posts: 1477

PostPosted: Tue Jul 10, 2012 10:13 am    Post subject: Reply with quote

config.h defines what is compiled or not into the binary.
disabling features helps keep binary weight low Smile
miniupnpd.conf options are runtime options.

So to have NAT-PMP support enabled, one need :
1) Compile with #define ENABLE_NATPMP in config.h
2) Enable option with enable_natpmp=yes in configuration
_________________
Main miniUPnP author.
http://miniupnp.tuxfamily.org/
Back to top
View user's profile Send private message Visit poster's website
A_380_2009



Joined: 22 Mar 2012
Posts: 17

PostPosted: Mon Jul 16, 2012 3:48 pm    Post subject: Reply with quote

Well,thank you for your reply.
BTW,would you please tell me that if I comment
Code:
#define ENABLE_NATPMP

and set
Code:
enable_natpmp=no

Does the upnp will realize the NAT port mapping feature?
I understand that the ENABLE_NATPMP and enable_natpmp was set for mac...
Am I right?
Thank you very much!
Back to top
View user's profile Send private message
miniupnp
Site Admin


Joined: 14 Apr 2007
Posts: 1477

PostPosted: Mon Jul 16, 2012 4:18 pm    Post subject: Reply with quote

if either ENABLE_NATPMP is undefinded (ie commented)
or configuration is
enable_natpmp=no, then NAT PMP will not be available.

NAT PMP was designed by apple and is integrated in Apple line of product, but its usage is not restricted to Macs.
Many software runing under MS Windows do support NAT PMP now.
_________________
Main miniUPnP author.
http://miniupnp.tuxfamily.org/
Back to top
View user's profile Send private message Visit poster's website
Display posts from previous:   
Post new topic   Reply to topic    miniupnp.tuxfamily.org Forum Index -> miniupnpd 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.