DHCP related bits and minor fixes

DHCP format and some functions to deal with..
And fixes of stupid things I messed up :-P