RouterBooter monitors your ADSL router through it's web interface (examines the routing table) to determine whether the connection is still active - if not, the router is rebooted to attempt to reconnect. I have a Samsung E300 router, but it should work with any web-based router (LinkSys, etc.), since it works by looking for some text present in a URL, and then calling another URL with parameters to do the rebooting (which every router with a web interface I've ever seen has)
Two Python scripts are supplied - one to do the actual rebooting and one to do the testing. This means you can call the reboot script from other programs through the shell very easily, and the test program is designed to be called from a cron job at periodic intervals to save resources.
I also have a version of this program written in C using the gnome http-libs - I abandoned it as the lower resource requirements weren't worth the inflexibility (compared to Python). This Python version only requires 1Mb of RAM for 1 second whilst it's running anyway.