The MiniUPnP project is a library and a daemon. The library is aimed to enable applications to use the capabilities of a UPnP Internet Gateway Device present on the network to forward ports. The daemon adds the UPnP Internet Gateway Device functionality to a NAT gateway running OpenBSD/NetBSD/FreeBSD/Solaris with PF/IPF or Linux 2.4.x/2.6.x with netfilter. One of its most interesting features is to enforce some permissions to allow or deny redirections, bringing some security to UPnP. Newer versions also support the NAT-PMP protocol from Apple.
NAT-PMP (NAT Port Mapping protocol) provides a way to do NAT traversal. It is implemented in Apple products (Airport extreme). libnatpmp is an attempt to make a portable and fully compliant implementation of the protocol for the client side. It is based on non-blocking sockets, and all calls of the API are asynchronous. It is therefore very easy to integrate the NAT-PMP code into any event driven code.