/* posix */ #include #include #include /* bsd extensions */ #include #include #include #include "priv.h" /* * return ndb attribute type of an ip name */ int _sock_ipattr(char *name) { struct in6_addr ia6; if(inet_pton(AF_INET6, name, &ia6) == 1) return Tip; if(strchr(name, '.') != nil) return Tdom; return Tsys; }