Module: ADNS

Defined in:
ext/adns/mod_adns.c,
ext/adns/mod_adns.c

Overview

ADNS module provides bindings to GNU adns resolver library.

Defined Under Namespace

Modules: IF, QF, RR, Status Classes: Error, LocalError, NotReadyError, PermanentError, Query, QueryError, RemoteError, State

Class Method Summary collapse

Class Method Details

.status_to_s(status) ⇒ String

Convert adns status code to string representation.

Returns:

  • (String)


89
90
91
92
93
94
95
96
97
98
# File 'ext/adns/mod_adns.c', line 89

static VALUE mADNS__status_to_s(VALUE self, VALUE a1)
{
  adns_status status;
  const char *s;
    
  CHECK_TYPE(a1, T_FIXNUM);
    status = FIX2INT(a1);
  s = adns_strerror(status);
  return CSTR2STR(s);
}

.status_to_ss(status) ⇒ String

Convert adns status code to short abbreviation string representation.

Returns:

  • (String)


105
106
107
108
109
110
111
112
113
114
# File 'ext/adns/mod_adns.c', line 105

static VALUE mADNS__status_to_ss(VALUE self, VALUE a1)
{
  adns_status status;
  const char *s;
    
  CHECK_TYPE(a1, T_FIXNUM);
    status = FIX2INT(a1);
  s = adns_errabbrev(status);
  return CSTR2STR(s);
}