summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorWillem Toorop <willem@NLnetLabs.nl>2012-11-19 12:14:15 +0100
committerWillem Toorop <willem@NLnetLabs.nl>2012-11-19 12:14:15 +0100
commit80227502e0636b819412da0c368a1dfe58c79049 (patch)
tree8f2f4f635bf92936007fe820eab0a9051c032055
parentcf55cd782c6e03d6df32cfcb76d55dbb4acb56a8 (diff)
downloadldns-80227502e0636b819412da0c368a1dfe58c79049.tar.gz
rename 4_shorts to aaaa_short because that is what it will be named in nsd
-rw-r--r--error.c2
-rw-r--r--host2str.c6
-rw-r--r--ldns/error.h2
-rw-r--r--ldns/host2str.h4
-rw-r--r--ldns/rdata.h2
-rw-r--r--ldns/str2host.h2
-rw-r--r--rdata.c4
-rw-r--r--rr.c4
-rw-r--r--str2host.c6
-rw-r--r--wire2host.c2
10 files changed, 17 insertions, 17 deletions
diff --git a/error.c b/error.c
index 2ebc10e7..1a7b474c 100644
--- a/error.c
+++ b/error.c
@@ -125,7 +125,7 @@ ldns_lookup_table ldns_error_str[] = {
{ LDNS_STATUS_DANE_PKIX_NO_SELF_SIGNED_TRUST_ANCHOR,
"The validation path "
"did not end in a self-signed certificate" },
- { LDNS_STATUS_INVALID_4_SHORTS,
+ { LDNS_STATUS_INVALID_AAAA_SHORT,
"Conversion error, 4 colon seperated hex numbers expected" },
{ 0, NULL }
};
diff --git a/host2str.c b/host2str.c
index fd763f49..72b3b52c 100644
--- a/host2str.c
+++ b/host2str.c
@@ -1050,7 +1050,7 @@ ldns_rdf2buffer_str_tsig(ldns_buffer *output, const ldns_rdf *rdf)
}
ldns_status
-ldns_rdf2buffer_str_4_shorts(ldns_buffer *output, const ldns_rdf *rdf)
+ldns_rdf2buffer_str_aaaa_short(ldns_buffer *output, const ldns_rdf *rdf)
{
ldns_buffer_printf(output,"%.4x:%.4x:%.4d:%.4x",
ldns_read_uint16(ldns_rdf_data(rdf)),
@@ -1158,8 +1158,8 @@ ldns_rdf2buffer_str(ldns_buffer *buffer, const ldns_rdf *rdf)
case LDNS_RDF_TYPE_NSEC3_NEXT_OWNER:
res = ldns_rdf2buffer_str_b32_ext(buffer, rdf);
break;
- case LDNS_RDF_TYPE_4_SHORTS:
- res = ldns_rdf2buffer_str_4_shorts(buffer, rdf);
+ case LDNS_RDF_TYPE_AAAA_SHORT:
+ res = ldns_rdf2buffer_str_aaaa_short(buffer, rdf);
break;
}
} else {
diff --git a/ldns/error.h b/ldns/error.h
index 9d1ca946..e10fb7ed 100644
--- a/ldns/error.h
+++ b/ldns/error.h
@@ -119,7 +119,7 @@ enum ldns_enum_status {
LDNS_STATUS_DANE_PKIX_DID_NOT_VALIDATE,
LDNS_STATUS_DANE_PKIX_NO_SELF_SIGNED_TRUST_ANCHOR,
LDNS_STATUS_EXISTS_ERR,
- LDNS_STATUS_INVALID_4_SHORTS
+ LDNS_STATUS_INVALID_AAAA_SHORT
};
typedef enum ldns_enum_status ldns_status;
diff --git a/ldns/host2str.h b/ldns/host2str.h
index b3046c29..1f1a3099 100644
--- a/ldns/host2str.h
+++ b/ldns/host2str.h
@@ -519,13 +519,13 @@ ldns_status ldns_rdf2buffer_str_int32(ldns_buffer *output, const ldns_rdf *rdf);
ldns_status ldns_rdf2buffer_str_time(ldns_buffer *output, const ldns_rdf *rdf);
/**
- * Converts an LDNS_RDF_TYPE_4_SHORTS rdata element to 4 hexadecimal numbers
+ * Converts an LDNS_RDF_TYPE_AAAA_SHORT rdata element to 4 hexadecimal numbers
* seperated by colons and adds it to the output buffer
* \param[in] *rdf The rdata to convert
* \param[in] *output The buffer to add the data to
* \return LDNS_STATUS_OK on success, and error status on failure
*/
-ldns_status ldns_rdf2buffer_str_4_shorts(ldns_buffer *output,
+ldns_status ldns_rdf2buffer_str_aaaa_short(ldns_buffer *output,
const ldns_rdf *rdf);
/**
diff --git a/ldns/rdata.h b/ldns/rdata.h
index 2fa080de..8fb2efa9 100644
--- a/ldns/rdata.h
+++ b/ldns/rdata.h
@@ -107,7 +107,7 @@ enum ldns_enum_rdf_type
/** nsec3 base32 string (with length byte on wire */
LDNS_RDF_TYPE_NSEC3_NEXT_OWNER,
/** 4 shorts represented as 4 * 16 bit hex numbers seperated by colons */
- LDNS_RDF_TYPE_4_SHORTS
+ LDNS_RDF_TYPE_AAAA_SHORT
};
typedef enum ldns_enum_rdf_type ldns_rdf_type;
diff --git a/ldns/str2host.h b/ldns/str2host.h
index d62412ab..e9186972 100644
--- a/ldns/str2host.h
+++ b/ldns/str2host.h
@@ -250,7 +250,7 @@ ldns_status ldns_str2rdf_dname(ldns_rdf **rd, const char *str);
* \param[in] str the string to be converted
* \return ldns_status
*/
-ldns_status ldns_str2rdf_4_shorts(ldns_rdf **rd, const char *str);
+ldns_status ldns_str2rdf_aaaa_short(ldns_rdf **rd, const char *str);
#ifdef __cplusplus
}
diff --git a/rdata.c b/rdata.c
index 19b20793..cbc9a8d6 100644
--- a/rdata.c
+++ b/rdata.c
@@ -336,8 +336,8 @@ ldns_rdf_new_frm_str(ldns_rdf_type type, const char *str)
case LDNS_RDF_TYPE_NSEC3_NEXT_OWNER:
status = ldns_str2rdf_b32_ext(&rdf, str);
break;
- case LDNS_RDF_TYPE_4_SHORTS:
- status = ldns_str2rdf_4_shorts(&rdf, str);
+ case LDNS_RDF_TYPE_AAAA_SHORT:
+ status = ldns_str2rdf_aaaa_short(&rdf, str);
break;
case LDNS_RDF_TYPE_NONE:
default:
diff --git a/rr.c b/rr.c
index c533468d..dc31d959 100644
--- a/rr.c
+++ b/rr.c
@@ -1960,7 +1960,7 @@ static const ldns_rdf_type type_tlsa_wireformat[] = {
};
static const ldns_rdf_type type_nid_wireformat[] = {
LDNS_RDF_TYPE_INT16,
- LDNS_RDF_TYPE_4_SHORTS
+ LDNS_RDF_TYPE_AAAA_SHORT
};
static const ldns_rdf_type type_l32_wireformat[] = {
LDNS_RDF_TYPE_INT16,
@@ -1968,7 +1968,7 @@ static const ldns_rdf_type type_l32_wireformat[] = {
};
static const ldns_rdf_type type_l64_wireformat[] = {
LDNS_RDF_TYPE_INT16,
- LDNS_RDF_TYPE_4_SHORTS
+ LDNS_RDF_TYPE_AAAA_SHORT
};
static const ldns_rdf_type type_lp_wireformat[] = {
LDNS_RDF_TYPE_INT16,
diff --git a/str2host.c b/str2host.c
index bb097537..fcd23c29 100644
--- a/str2host.c
+++ b/str2host.c
@@ -1319,20 +1319,20 @@ ldns_str2rdf_ipseckey(ldns_rdf **rd, const char *str)
}
ldns_status
-ldns_str2rdf_4_shorts(ldns_rdf **rd, const char *str)
+ldns_str2rdf_aaaa_short(ldns_rdf **rd, const char *str)
{
unsigned int a, b, c, d;
uint16_t shorts[4];
if (sscanf(str, "%x:%x:%x:%x", &a, &b, &c, &d) == EOF) {
- return LDNS_STATUS_INVALID_4_SHORTS;
+ return LDNS_STATUS_INVALID_AAAA_SHORT;
} else {
shorts[0] = htons(shorts[0]);
shorts[1] = htons(shorts[1]);
shorts[2] = htons(shorts[2]);
shorts[3] = htons(shorts[3]);
*rd = ldns_rdf_new_frm_data(
- LDNS_RDF_TYPE_4_SHORTS, 4 * sizeof(uint16_t), &shorts);
+ LDNS_RDF_TYPE_AAAA_SHORT, 4 * sizeof(uint16_t), &shorts);
}
return *rd ? LDNS_STATUS_OK : LDNS_STATUS_MEM_ERR;
}
diff --git a/wire2host.c b/wire2host.c
index ef6e5c3b..8c38be5a 100644
--- a/wire2host.c
+++ b/wire2host.c
@@ -212,7 +212,7 @@ ldns_wire2rdf(ldns_rr *rr, const uint8_t *wire, size_t max, size_t *pos)
case LDNS_RDF_TYPE_TSIGTIME:
cur_rdf_length = LDNS_RDF_SIZE_6BYTES;
break;
- case LDNS_RDF_TYPE_4_SHORTS:
+ case LDNS_RDF_TYPE_AAAA_SHORT:
cur_rdf_length = LDNS_RDF_SIZE_8BYTES;
break;
case LDNS_RDF_TYPE_AAAA: