MiniUPnP Client and Daemon is a lightweight library and daemon for UPnP IGD client and UPnP IGD.
The Linux SDK for UPnP devices (libupnp) is regarded as too heavy, necessitating the need for the simplest library possible with the smallest footprint and no dependencies on other libraries like XML parsers or HTTP. All the code is pure ANSI C. When compiled on an x86 PC, the miniupnp client library is less than 15KB, while the upnpc sample program is around 20KB.
The project comes in two main parts: the client library, which enables applications to access the services provided by an UPnP "Internet Gateway Device" on the network, and the miniupnpd daemon which provides these services to your network from a linux or bsd box being the gateway. As of now, the miniupnpd is developed on OpenBSD 3.0+ with pf, and some of the work done to integrate with pf can be seen on this page.
While it may not always be the ideal solution to use the code from the MiniUPnP project directly, it provides a good base to take inspiration from for a user's own UPnP implementation since the code is small and simple to understand. The KTorrent team UPnP plugin in C++ is an excellent example.
If you are interested in which home router works with the miniupnp client, that information is available here. In fact, users can help grow this list by sending the team an email.
The usefulness of the miniUPnP client library is also apparent whenever users need to listen for incoming connections. Examples of such usage include P2P applications, FTP clients for active mode, IRC (for DCC) or IM applications, network games, any server. The typical usage of UPnP capabilities of a router is a file transfer using MSN messenger. The MSN Messenger software uses the UPnP API of Windows XP to open a port for incoming connections. To mimic the MS software, it is a good idea to use UPnP as well.
Version 1.4: N/A