- Use getnameinfo() for both of AF_INET and AF_INET6 in routename().
- Add missing "static".