Sha256: bec67ef0ebf9534994f87668f6538e625f7e76fc5d1d9c3482acac885c4385be

Contents?: true

Size: 1.85 KB

Versions: 234

Compression:

Stored size: 1.85 KB

Contents

/* Copyright 1998 by the Massachusetts Institute of Technology.
 *
 * Permission to use, copy, modify, and distribute this
 * software and its documentation for any purpose and without
 * fee is hereby granted, provided that the above copyright
 * notice appear in all copies and that both that copyright
 * notice and this permission notice appear in supporting
 * documentation, and that the name of M.I.T. not be used in
 * advertising or publicity pertaining to distribution of the
 * software without specific, written prior permission.
 * M.I.T. makes no representations about the suitability of
 * this software for any purpose.  It is provided "as is"
 * without express or implied warranty.
 */

#include "ares_setup.h"
#include <assert.h>
#include "ares.h"

const char *ares_strerror(int code)
{
  /* Return a string literal from a table. */
  const char *errtext[] = {
    "Successful completion",
    "DNS server returned answer with no data",
    "DNS server claims query was misformatted",
    "DNS server returned general failure",
    "Domain name not found",
    "DNS server does not implement requested operation",
    "DNS server refused query",
    "Misformatted DNS query",
    "Misformatted domain name",
    "Unsupported address family",
    "Misformatted DNS reply",
    "Could not contact DNS servers",
    "Timeout while contacting DNS servers",
    "End of file",
    "Error reading file",
    "Out of memory",
    "Channel is being destroyed",
    "Misformatted string",
    "Illegal flags specified",
    "Given hostname is not numeric",
    "Illegal hints flags specified",
    "c-ares library initialization not yet performed",
    "Error loading iphlpapi.dll",
    "Could not find GetNetworkParams function",
    "DNS query cancelled"
  };

  if(code >= 0 && code < (int)(sizeof(errtext) / sizeof(*errtext)))
    return errtext[code];
  else
    return "unknown";
}

Version data entries

234 entries across 233 versions & 11 rubygems

Version Path
grpc-1.71.0 third_party/cares/cares/src/lib/ares_strerror.c
grpc-1.70.1 third_party/cares/cares/src/lib/ares_strerror.c
grpc-1.69.0 third_party/cares/cares/src/lib/ares_strerror.c
grpc-1.69.0.pre1 third_party/cares/cares/src/lib/ares_strerror.c
grpc-1.68.1 third_party/cares/cares/src/lib/ares_strerror.c
grpc-1.67.0 third_party/cares/cares/src/lib/ares_strerror.c
grpc-1.67.0.pre1 third_party/cares/cares/src/lib/ares_strerror.c
grpc-1.66.0 third_party/cares/cares/src/lib/ares_strerror.c
grpc-1.66.0.pre5 third_party/cares/cares/src/lib/ares_strerror.c
grpc-1.66.0.pre3 third_party/cares/cares/src/lib/ares_strerror.c
grpc-1.58.3 third_party/cares/cares/src/lib/ares_strerror.c
grpc-1.59.5 third_party/cares/cares/src/lib/ares_strerror.c
grpc-1.60.2 third_party/cares/cares/src/lib/ares_strerror.c
grpc-1.61.3 third_party/cares/cares/src/lib/ares_strerror.c
grpc-1.62.3 third_party/cares/cares/src/lib/ares_strerror.c
grpc-1.63.2 third_party/cares/cares/src/lib/ares_strerror.c
grpc-1.64.3 third_party/cares/cares/src/lib/ares_strerror.c
grpc-1.65.2 third_party/cares/cares/src/lib/ares_strerror.c
grpc-1.65.1 third_party/cares/cares/src/lib/ares_strerror.c
grpc-1.65.0 third_party/cares/cares/src/lib/ares_strerror.c