Make the ip parsing portable. Fix Macro to detect network byte order