⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 readme_dyn_gw

📁 wifi 无线网络路由协议OLSR linux下C代码
💻
字号:
DYNAMIC INTERNET GATEWAY PLUGIN FOR olsr.org olsrdby Andreas T鴑nesen(andreto@olsr.org)addittions by Jens Nachitgall21.12.2004  bjoern Riemer- added universal hna checking  the plParams are parsed in spechial order, first the HNA parameter syntax: "net mask"  the following Ping parameter are only used for the previus HNA entry.  if there is no previus HNA entry then HNA "0.0.0.0 0.0.0.0" for internet GW is assumed30.11.2004  updates by Jens:- Upgraded to confirm with v2 plugin interface- removed IPC stuff- Removed much unnessecarry stuff- Added an optional validation based on the ping command, which caused  some internal restructuring, e.g. the dependency of a threading  library)- the config file accepts an "Interval", meaning how often the check is  doneHOW TO USEAdd an entry like this to your olsrd configuration file:LoadPlugin "olsrd_dyn_gw.so.0.4"{    # how often to look for a inet gw, in seconds    # defaults to 5 secs, if commented out    PlParam     "Interval"   "40"        # if one or more IPv4 addresses are given, do a ping on these in    # descending order to validate that there is not only an entry in    # routing table, but also a real internet connection. If any of    # these addresses could be pinged successfully, the test was    # succesful, i.e. if the ping on the 1st address was successful,the    # 2nd won't be pinged    PlParam     "Ping"       "141.1.1.1"    PlParam     "Ping"       "194.25.2.129"    PlParam	"HNA"	"192.168.80.0 255.255.255.0"    PlParam	"HNA"	"192.168.81.0 255.255.255.0"    PlParam	"Ping"	"192.168.81.12"}ABOUTPlugin is IPv4 only and it only runs on Linux with the libpthreadlibrary installed!This is a plugin that checks if the local node has a Internet-connection. A Internet-connetion is identified by a "default gw" with ahopcount of 0. That is a route to 0.0.0.0/0 with metric 0.  By defaultthe check is done every 5 secs. You can change the check interval byproviding an value for "Interval" in the plugin's section of olsrd.conf.If one or more IPv4 addresses are given as values for "Ping" in thesection or dyn_gw in olsrd.conf, then a test is done to validate ifthere is really an internet connection (and not just an entry in therouting table). If any of the arbitrary many given IPv4 addresses can bepinged, the validation was successful. The addresses are pinged in theorder given in the olsrd.conf (i.e. the first given address is pingedfirst, the the 2nd, and so on). For this to work a command like "ping -c 1 -q <PING-ADDRESS>" must be possible on the system olsrd runson. The validation is based on the return value of this ping command.Since OLSR uses hopcount/metric on all routes this plugin willnot respond to Internet gateways added by olsrd.When a Internet gateway is discovered - this node will startannouncing 0.0.0.0/0 connectivity by HNA messages flooded intothe OLSR network. If the route is removed the HNA messageswill not be transmitted. This check is totally dynamic andInternet connectivity might come and go.This plugin will work very good with a automatic network cabledetection daemon such as  netplug:http://freshmeat.net/projects/key-netplug/This plugin is a good example of using plugins for other stuffthan packet transmission.

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -