hostname implementation

Still in doubt if I'm using Rust correctly.

Also, I need some help to figure out how we can get the hostname max size from the OS. Apparently Mac and Linux would do it a little bit different. I sticked with the default of my mac though.