[Commotion-dev] DNS Update

Will Hawkins hawkinsw at opentechinstitute.org
Tue May 15 17:25:20 UTC 2012


Thanks for this Hans.

This setup is meant now only for Android, but it could be useful for
other platforms that do not readily support /etc/hosts-formatted files.
In all honesty I never considered a Java DNS implementation that could
simply run in a separate thread. That is something that I will
definitely look into.

As for the files themselves, these do go into the app-local data
directories. The installation definitely does not pollute the OS file
system beyond that. I'm sorry if there was confusion in my previous
email regarding that point.

Will

On 05/15/2012 12:09 PM, Hans-Christoph Steiner wrote:
> 
> Sounds good.  Is this setup meant to be only for Android or other platforms too?  I ask because it'll probably be easier to manage a pure Java DNS server as an Android Service than adding another C binary.
> 
> As for writing out a non-standard file like /etc/hosts-formatted, if you are writing a custom file, then it should go into the app's file hierarchy.  It is important to avoid touching the filesystem as much as possible.  This file could go into /data/data/net.szym.barnacle/app_bin or we could create ...../app_etc or something like that.
> 
> .hc
> 
> On May 14, 2012, at 4:22 PM, Will Hawkins wrote:
> 
>> Hello all!
>>
>> I just wanted to give everyone an update on what's going on here: I am
>> working on adding capability to the client to handle DNS entries
>> distributed in the mesh (via olsr nameservice plugin). Because Android's
>> /etc/hosts file is on the readonly file system, simply telling olsrd to
>> write out an /etc/hosts file (like it would normally do on a *nix host)
>> does not work.
>>
>> So, I cross-compiled a small (300k) DNS server that the app invokes when
>> the user connects to the mesh. This server answers queries by first
>> looking for an answer in an /etc/hosts-formatted file. If there are no
>> matches, the DNS server forwards the request.
>>
>> In my testing it works fairly well. I am still integrating it into the
>> build but I wanted to give everyone an update.
>>
>> Talk to you all soon!
>> Will
>> _______________________________________________
>> Commotion-dev mailing list
>> Commotion-dev at lists.chambana.net
>> http://lists.chambana.net/mailman/listinfo/commotion-dev
>>
> 
> 



More information about the Commotion-dev mailing list