dhcpd compiled statically using bionic attached (gave many errors during compile but works in initial tests)
dhcpd.conf also in attached zip (you will have to edit it for your settings)
dhcpd is looking for dhcpd.conf in /etc/dhcpd.conf (annoying, but you could probably just stick it in /system/etc/dhcpd.conf and symlink until the next reboot).
it is also looking for /var/state/dhcp/dhcpd.leases which can just be a zero length file to start (yes, you will have to symlink to that dir too... sorry).
Many thanks to fnord for compiling this. If it seems to work, I'll ask him to do a build pointing to a more sensible location for the dhcpd.conf and dhcpd.leases files and maybe we can even fix up the init.d script for starting and stopping the daemon.
I haven't had time to actually test a full conf to see if it's properly handing out addresses... far too early in the morning and I'm going to go get some sleep.
I built a copy of dnsmasq, which has a dhcp server built in, and should be a bit more light-weight than dhcpd. I modified the paths so that no changes outside /data/local are needed.
I put together a zip with a fully working configuration and all the binaries required to enable adhoc with NAT/dhcp/dns, and a shell script to run everything.
To use, just put adhoc.sh, dnsmasq, and iptables in /data/local/bin, chmod 755, and put tiwlan.ini and dnsmasq.conf in /data/local. Disable wifi in the gui, and run /data/local/bin/adhoc.sh to start.
Now we just need to figure out how to get a secure connection going.
|Thread Tools||Search this Thread|