[olsr-dev] some Qs about exending the dyn_gw plugin
Jens Nachtigall
(spam-protected)
Fri Nov 5 18:12:44 CET 2004
Dear all,
I would like to extend the dyn_gw plugin in the following way:
By default it works as now (i.e. no ping).
If in the config file any IP address(es) is/are given, these will be
pinged before adding the detected 0.0.0.0/0 to the HNA4 set in order to
validate the internet connection.
Non-Internet-GW/nets are not considered. If one wants to include these,
one has to explicitly add them on the command-line or in the config, as
it is done without the plugin. This is because, adding support for
automatically detecting non-internet-nets leads to further problems,
e.g. the question if it is NAT'ed or not. Also, the inclusion of
non-internet-gw, which are actually not pingable/reachable is not a
problem for others, as is the announcement of internet-gw as HNA4)
@sven-ola: Do you agree with this scheme? I am asking, because I am
primarily doing this because I hope it will be useful for the freifunk
firmware.)
My questions are now:
1st
I've seen the new config file scheme:
LoadPlugin "olsrd_dyn_gw.so.0.1"
{
PlParam "key4" "value3"
# Might be possible to set options here in
# future versions
}
This would mean one IP per line, right? e.g.
LoadPlugin "olsrd_dyn_gw.so.0.1"
{
PlParam "IP_1" "141.1.1.1"
PlParam "IP_2" "141.6.6.6"
# Might be possible to set options here in
# future versions
}
and not
LoadPlugin "olsrd_dyn_gw.so.0.1"
{
PlParam "IPs" "141.1.1.1" "141.6.6.6"
# Might be possible to set options here in
# future versions
}
???
2nd
How can these values in the config be accessed, without rereading the
config files? (I could not find an obvious enough name in
olsr_plugin_io.h)
3rd
Currently I use system(2) [e.g. system("ping -c 1 -q IP")] to do the
ping, which is suboptimal since the ping would be done with olsrd's
prevelidges (i.e. root) and afaics it also blocks olsrd while the ping
the going on. Anybody knowing a better approach or syscall,
respectively?
Best,
Jens
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: not available
URL: <http://lists.olsr.org/pipermail/olsr-dev/attachments/20041105/4f266ede/attachment.sig>
More information about the Olsr-dev
mailing list