Use htons to convert to network order