_nss_dns_getnetbyaddr_r (long net, int type, struct netent *result, char *buffer, size_t buflen, int *errnop)
_nss_dns_getnetbyaddr_r (uint32_t net, int type, struct netent *result, char *buffer, size_t buflen, int *errnop, int *herrnop)
_nss_dns_getnetbyaddr_r (long net, int type, struct netent *result,			 char *buffer, size_t buflen, int *errnop){  /* Return entry for network with NAME.  */  enum nss_status status;  querybuf net_buffer;  unsigned int net_bytes[4];  char qbuf[MAXDNAME];  int cnt, anslen;  u_int32_t net2;  /* No net address lookup for IPv6 yet.  */  if (type != AF_INET)    return NSS_STATUS_UNAVAIL;  if ((_res.options & RES_INIT) == 0 && __res_ninit (&_res) == -1)    return NSS_STATUS_UNAVAIL;    net2 = (u_int32_t) net;  for (cnt = 4; net2 != 0; net2 >>= 8)    net_bytes[--cnt] = net2 & 0xff;  switch (cnt)    {    case 3:      /* Class A network.  */      sprintf (qbuf, "0.0.0.%u.in-addr.arpa", net_bytes[3]);      break;    case 2:      /* Class B network.  */      sprintf (qbuf, "0.0.%u.%u.in-addr.arpa", net_bytes[3], net_bytes[2]);      break;    case 1:      /* Class C network.  */      sprintf (qbuf, "0.%u.%u.%u.in-addr.arpa", net_bytes[3], net_bytes[2],	       net_bytes[1]);      break;    case 0:      /* Class D - E network.  */      sprintf (qbuf, "%u.%u.%u.%u.in-addr.arpa", net_bytes[3], net_bytes[2],	       net_bytes[1], net_bytes[0]);      break;    }  anslen = res_nquery (&_res, qbuf, C_IN, T_PTR, (u_char *) &net_buffer,		       sizeof (querybuf));  if (anslen < 0)    {      /* Nothing found.  */      *errnop = errno;      return (errno == ECONNREFUSED	      || errno == EPFNOSUPPORT	      || errno == EAFNOSUPPORT)	? NSS_STATUS_UNAVAIL : NSS_STATUS_NOTFOUND;    }  status = getanswer_r (&net_buffer, anslen, result, buffer, buflen, BYADDR);  if (status == NSS_STATUS_SUCCESS)    {      /* Strip trailing zeros.  */      unsigned int u_net = net;	/* Maybe net should be unsigned?  */      while ((u_net & 0xff) == 0 && u_net != 0)	u_net >>= 8;      result->n_net = u_net;    }  return status;}