• R
    add support for ipv6 scope_id to getaddrinfo and getnameinfo · bdad2fef
    Rich Felker 提交于
    for all address types, a scope_id specified as a decimal value is
    accepted. for addresses with link-local scope, a string containing the
    interface name is also accepted.
    
    some changes are made to error handling to avoid unwanted fallbacks in
    the case where the scope_id is invalid: if an earlier name lookup
    backend fails with an error rather than simply "0 results", this
    failure now suppresses any later attempts with other backends.
    
    in getnameinfo, a light "itoa" type function is added for generating
    decimal scope_id results, and decimal port strings for services are
    also generated using this function now so as not to pull in the
    dependency on snprintf.
    
    in netdb.h, a definition for the NI_NUMERICSCOPE flag is added. this
    is required by POSIX (it was previously missing) and needed to allow
    callers to suppress interface-name lookups.
    bdad2fef
lookup_name.c 6.5 KB