首 页 网站运营 网络编程 网页制作 图象媒体 数据库 建站资源 网管专区 下载专区 最新资讯
IT学堂|红色黑客联盟
设为首页
加入收藏
联系站长
您所在的位置:首页>网管专区>网络组建>文章内容
IGD的另一個選擇 MiniUPnP
来源: 作者: 发布时间:2007-04-11

MiniUPnP Project HomePage

如果想要网关支持upnp,必须要安装upnpd的支持程序IGD, 您可以選擇使用MiniUPnP, 编译后大約 8x KBytes, 用linux-igd還需要libupnp, 加一加大約3百多K!

 

UPnP IGD client lightweight library and UPnP IGD daemon

The UPnP protocol is supported by most home adsl/cable routers and Microsoft Windows 2K/XP. The aim of the MiniUPnP project is to bring a free software solution to support the "Internet Gateway Device" part of the protocol. The MediaServer/MediaRenderer UPnP protocol is also becoming very popular but here we are talking about IGD.

The Linux SDK for UPnP devices (libupnp) seems too heavy for me. I want the simplest library possible, with the smallest footprint and no dependencies to other libraries such as XML parsers or HTTP implementations. All the code is pure ANSI C.
Compiled on a x86 PC, the miniupnp client library have less than 15KB code size. For instance, the upnpc sample program is around 20KB.
The miniupnp daemon is much smaller than any other IGD daemon and is ideal for using on low memory device for this reason.

The project is divided in two main parts :

  • miniupnpc, the client library, enabling applications to access the services provided by an UPnP "Internet Gateway Device" present on the network.
  • miniupnpd, a daemon providing these services to your network from a linux or BSD box being the gateway.

miniupnpd was first developped on OpenBSD 3.0+ with pf. You can see some of the work I have done to integrate with pf on this page.
As pf is also available under FreeBSD, guys at the pfSense project have ported miniupnpd to this system.
The daemon is now also available for linux 2.4.x and 2.6.x using netfilter. It is possible to make it run on router devices running OpenWRT.

For some reasons, it may be not the good solution for you to use the code from the MiniUPnP project directly.
As the code is small and simple to understand, it is a good base to take inspiration for your own UPnP implementation. The KTorrent UPnP plugin in C++ is a good example.

If you are wondering which home router is working with the miniupnp client, you can find the answer here. In fact, you are more likely to help me fill the list by sending me an email :)

Usefulness of the miniUPnP client library

The usage of the miniUPnP client library is useful whenever an application needs to listen for incoming connections.
Examples : 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 tranfert using MSN messenger. The MSN Messenger software uses the UPnP API of Windows XP to open port for incoming connection. To mimic the MS software, it is a good idea to use UPnP as well.

The Microsoft XBOX 360 game machine uses UPnP commands to enable the play with the XBOX Live service. It has been reported that miniupnpd is correctly working with it.

I have made a patch for XChat to show how the miniupnp client library can be used by an application.



[推荐] [返回顶部] [打印本页] [关闭窗口]
热点文章
·动态域名更新的实现方法
·site to site ipsec vpn
·hosspot设置说明
·设置ROUTEROS为透明桥接防火墙
·虚拟路由冗余协议 Virtual Router Red
·使用ROUTEROS建立PPPOE服务器
·如何在ROUTEOS中做IP转向
·ROS下实现数据镜像
·routeros和radius对接设置
·routeros端口映射内网无法访问自身公
相关文章
·PPPOE BRAS-1000接入系统安装使用说明
·使用HTun通过http代理服务器建立vpn连
·Zeroshell 集成radius服务器的全能Lin
·代理软件强中强----WinRoute
·CafeRadius 一款基于web用户认证的整
·Windows 2003路由设置
·限制rp-pppoe服务器每一个连接的带宽
·Windows 2003作路由局域网共享上
·PPPoE Server + FreeRADIUS + MySQL
·win下的hotspot web界面认证登录网络
文章检索
Google
相关文章
·PPPOE BRAS-1000接入系
·使用HTun通过http代理服
·Zeroshell 集成radius服
·代理软件强中强----WinR
·CafeRadius 一款基于web
·Windows 2003路由设置
·限制rp-pppoe服务器每一
·Windows 2003作路由局域
·PPPoE Server + FreeRAD
·win下的hotspot web界面
·DSMARK队列规定(DSMARK
·用m0n0做软件路由
·Linux下配置多ppp(oe)链
·重新编译monowall扩大mo
·在ipcop中添加openvpn模