htons() might be a macro, do not prefix it with ::.