NIC detection, ipaddr dectection, input validation

A big check-in. Seems to work for me, but will need a lot of testing.