Cleaning...
Implemented hostname setter (bit ugly: copied code from libcutils)