17 #ifdef HAVE_SYS_SOCKET_H 18 #include <sys/socket.h> 20 #ifdef HAVE_ARPA_INET_H 21 #include <arpa/inet.h> 31 #ifdef HAVE_SYS_PARAM_H 32 #include <sys/param.h> 43 *r = htons((uint16_t)strtol((
char *)shortstr, &end, 10));
69 memset(&tm, 0,
sizeof(tm));
71 if (strlen(time) == 14 &&
72 sscanf(time,
"%4d%2d%2d%2d%2d%2d", &tm.tm_year, &tm.tm_mon, &tm.tm_mday, &tm.tm_hour, &tm.tm_min, &tm.tm_sec) == 6
77 if (tm.tm_year < 70) {
80 if (tm.tm_mon < 0 || tm.tm_mon > 11) {
83 if (tm.tm_mday < 1 || tm.tm_mday > 31) {
87 if (tm.tm_hour < 0 || tm.tm_hour > 23) {
91 if (tm.tm_min < 0 || tm.tm_min > 59) {
95 if (tm.tm_sec < 0 || tm.tm_sec > 59) {
100 memcpy(r, &l,
sizeof(uint32_t));
107 l = htonl((uint32_t)strtol((
char*)time, &end, 10));
112 memcpy(r, &l,
sizeof(uint32_t));
138 salt_length_str = (int)strlen(salt_str);
139 if (salt_length_str == 1 && salt_str[0] ==
'-') {
141 }
else if (salt_length_str % 2 != 0) {
144 if (salt_length_str > 512) {
152 for (c = 0; c < salt_length_str; c += 2) {
153 if (isxdigit((
int) salt_str[c]) && isxdigit((
int) salt_str[c+1])) {
161 salt_length = (uint8_t) (salt_length_str / 2);
168 data[0] = salt_length;
169 memcpy(&data[1], salt, salt_length);
189 p = (uint32_t) htonl(p);
208 l = htonl((uint32_t)strtol((
char*)longstr, &end, 10));
209 else l = htonl((uint32_t)strtoul((
char*)longstr, &end, 10));
215 if (errno == ERANGE) {
219 memcpy(r, &l,
sizeof(uint32_t));
236 *r = (uint8_t)strtol((
char*)bytestr, &end, 10);
261 parse_escape(uint8_t *ch_p,
const char** str_p)
265 if ((*str_p)[0] && isdigit((
unsigned char)(*str_p)[0]) &&
266 (*str_p)[1] && isdigit((
unsigned char)(*str_p)[1]) &&
267 (*str_p)[2] && isdigit((
unsigned char)(*str_p)[2])) {
269 val = (uint16_t)(((*str_p)[0] -
'0') * 100 +
270 ((*str_p)[1] -
'0') * 10 +
271 ((*str_p)[2] -
'0'));
276 *ch_p = (uint8_t)val;
280 }
else if ((*str_p)[0] && !isdigit((
unsigned char)(*str_p)[0])) {
282 *ch_p = (uint8_t)*(*str_p)++;
291 parse_char(uint8_t *ch_p,
const char** str_p)
295 case '\0':
return false;
297 case '\\': *str_p += 1;
298 return parse_escape(ch_p, str_p);
300 default: *ch_p = (uint8_t)*(*str_p)++;
316 uint8_t *q, *pq, label_len;
320 len = strlen((
char*)str);
330 if (1 == len && *str ==
'.') {
346 for (s = str; *s; s++, q++) {
356 if (label_len == 0) {
359 len += label_len + 1;
367 if (! parse_escape(q, &s)) {
387 if (label_len == 0) {
390 len += label_len + 1;
404 if (inet_pton(AF_INET, (
char*)str, &address) != 1) {
418 if (inet_pton(AF_INET6, (
char*)str, address) != 1) {
430 uint8_t *data, *dp, ch = 0;
434 dp = data =
LDNS_XMALLOC(uint8_t, strlen(str) > 255 ? 256 : (strlen(str) + 1));
440 while (parse_char(&ch, &str)) {
441 if (dp - data >= 255) {
451 length = (size_t)(dp - data);
453 data[0] = (uint8_t)length;
474 const char *my_str = str;
481 uint8_t afdlength = 0;
490 if (strlen(my_str) < 2
491 || strchr(my_str,
':') == NULL
492 || strchr(my_str,
'/') == NULL
493 || strchr(my_str,
':') > strchr(my_str,
'/')) {
497 if (my_str[0] ==
'!') {
504 family = (uint16_t) atoi(my_str);
506 my_str = strchr(my_str,
':') + 1;
509 ip_str_len = (size_t) (strchr(my_str,
'/') - my_str);
512 strncpy(my_ip_str, my_str, ip_str_len + 1);
513 my_ip_str[ip_str_len] =
'\0';
522 if (inet_pton(AF_INET, my_ip_str, afdpart) == 0) {
527 for (i = 0; i < 4; i++) {
528 if (afdpart[i] != 0) {
532 }
else if (family == 2) {
539 if (inet_pton(AF_INET6, my_ip_str, afdpart) == 0) {
544 for (i = 0; i < 16; i++) {
545 if (afdpart[i] != 0) {
555 my_str = strchr(my_str,
'/') + 1;
556 prefix = (uint8_t) atoi(my_str);
564 ldns_write_uint16(data, family);
569 data[3] = data[3] | 0x80;
572 memcpy(data + 4, afdpart, afdlength);
588 if ((*str ==
'-' || *str ==
'0') && str[1] ==
'\0') {
593 buffer =
LDNS_XMALLOC(uint8_t, ldns_b64_ntop_calculate_size(strlen(str)));
599 ldns_b64_ntop_calculate_size(strlen(str)));
618 size_t slen = strlen(str);
619 size_t len = ldns_b32_pton_calculate_size(slen);
630 ldns_b32_ntop_calculate_size(slen));
663 if (isspace((
int) *str)) {
666 for (i = 16; i >= 1; i -= 15) {
667 while (*str && isspace((
int) *str)) { str++; }
669 if (isxdigit((
int) *str)) {
682 (
size_t) (t - t_orig),
692 const char *delimiters =
"\n\t ";
697 size_t type_count = 0;
718 if(type_count >=
sizeof(type_list)) {
724 type_list[type_count] = cur_type;
772 ldns_write_uint16(idd, (uint16_t) lt->
id);
841 return ldns_str2rdf_mnemonic4int8(
842 ldns_tlsa_certificate_usages, rd, str);
848 return ldns_str2rdf_mnemonic4int8(ldns_tlsa_selectors, rd, str);
854 return ldns_str2rdf_mnemonic4int8(ldns_tlsa_matching_types, rd, str);
877 loc_parse_cm(
char* my_str,
char** endstr, uint8_t* m, uint8_t* e)
881 uint32_t meters = 0, cm = 0, val;
882 while (isblank((
unsigned char)*my_str)) {
885 meters = (uint32_t)strtol(my_str, &my_str, 10);
886 if (*my_str ==
'.') {
888 cm = (uint32_t)strtol(my_str, &my_str, 10);
905 if (*my_str ==
'm' || *my_str ==
'M') {
915 uint32_t latitude = 0;
916 uint32_t longitude = 0;
917 uint32_t altitude = 0;
920 uint32_t equator = (uint32_t) ldns_power(2, 31);
924 uint8_t size_b = 1, size_e = 2;
925 uint8_t horiz_pre_b = 1, horiz_pre_e = 6;
926 uint8_t vert_pre_b = 1, vert_pre_e = 3;
932 char *my_str = (
char *) str;
935 if (isdigit((
int) *my_str)) {
936 h = (uint32_t) strtol(my_str, &my_str, 10);
941 while (isblank((
int) *my_str)) {
945 if (isdigit((
int) *my_str)) {
946 m = (uint32_t) strtol(my_str, &my_str, 10);
947 }
else if (*my_str ==
'N' || *my_str ==
'S') {
953 while (isblank((
int) *my_str)) {
957 if (isdigit((
int) *my_str)) {
958 s = strtod(my_str, &my_str);
961 while (isblank((
int) *my_str)) {
965 if (*my_str ==
'N') {
967 }
else if (*my_str ==
'S') {
979 latitude = (uint32_t) s;
980 latitude += 1000 * 60 * m;
981 latitude += 1000 * 60 * 60 * h;
983 latitude = equator + latitude;
985 latitude = equator - latitude;
987 while (isblank((
unsigned char)*my_str)) {
991 if (isdigit((
int) *my_str)) {
992 h = (uint32_t) strtol(my_str, &my_str, 10);
997 while (isblank((
int) *my_str)) {
1001 if (isdigit((
int) *my_str)) {
1002 m = (uint32_t) strtol(my_str, &my_str, 10);
1003 }
else if (*my_str ==
'E' || *my_str ==
'W') {
1009 while (isblank((
unsigned char)*my_str)) {
1013 if (isdigit((
int) *my_str)) {
1014 s = strtod(my_str, &my_str);
1018 while (isblank((
unsigned char)*my_str)) {
1022 if (*my_str ==
'E') {
1024 }
else if (*my_str ==
'W') {
1036 longitude = (uint32_t) s;
1037 longitude += 1000 * 60 * m;
1038 longitude += 1000 * 60 * 60 * h;
1041 longitude += equator;
1043 longitude = equator - longitude;
1046 altitude = (uint32_t)(strtod(my_str, &my_str)*100.0 +
1048 if (*my_str ==
'm' || *my_str ==
'M') {
1052 if (strlen(my_str) > 0) {
1053 if(!loc_parse_cm(my_str, &my_str, &size_b, &size_e))
1057 if (strlen(my_str) > 0) {
1058 if(!loc_parse_cm(my_str, &my_str, &horiz_pre_b, &horiz_pre_e))
1062 if (strlen(my_str) > 0) {
1063 if(!loc_parse_cm(my_str, &my_str, &vert_pre_b, &vert_pre_e))
1073 data[1] = ((size_b << 4) & 0xf0) | (size_e & 0x0f);
1074 data[2] = ((horiz_pre_b << 4) & 0xf0) | (horiz_pre_e & 0x0f);
1075 data[3] = ((vert_pre_b << 4) & 0xf0) | (vert_pre_e & 0x0f);
1076 ldns_write_uint32(data + 4, latitude);
1077 ldns_write_uint32(data + 8, longitude);
1078 ldns_write_uint32(data + 12, altitude);
1090 uint8_t *bitmap = NULL;
1094 struct protoent *proto = NULL;
1095 struct servent *serv = NULL;
1100 char *proto_str = NULL;
1101 char *lc_proto_str = NULL;
1105 if(strlen(str) == 0)
1121 proto_str = strdup(token);
1122 lc_proto_str = strdup(token);
1123 for (c = lc_proto_str; *c; c++) {
1124 *c = tolower((
unsigned char)*c);
1126 if (!proto_str || !lc_proto_str) {
1135 serv = getservbyname(token, proto_str);
1137 serv = getservbyname(token, lc_proto_str);
1139 if (!serv && (lc_token = strdup(token))) {
1140 for (c = lc_token; *c; c++) {
1141 *c = tolower((
unsigned char)*c);
1143 serv = getservbyname(lc_token, proto_str);
1145 serv = getservbyname(lc_token, lc_proto_str);
1150 serv_port = (int) ntohs((uint16_t) serv->s_port);
1152 serv_port = atoi(token);
1154 if (serv_port < 0 || serv_port > 65535) {
1162 if (serv_port / 8 >= bm_len) {
1163 uint8_t *b2 =
LDNS_XREALLOC(bitmap, uint8_t, (serv_port / 8) + 1);
1174 for (; bm_len <= serv_port / 8; bm_len++) {
1178 ldns_set_bit(bitmap + (serv_port / 8), 7 - (serv_port % 8),
true);
1182 if (!proto_str || !bitmap) {
1201 proto = getprotobyname(proto_str);
1203 proto = getprotobyname(lc_proto_str);
1206 data[0] = (uint8_t) proto->p_proto;
1207 }
else if (proto_str) {
1208 data[0] = (uint8_t) atoi(proto_str);
1210 memcpy(data + 1, bitmap, (
size_t) bm_len);
1220 #ifdef HAVE_ENDSERVENT 1223 #ifdef HAVE_ENDPROTOENT 1236 char* nsap_str = (
char*) str;
1239 if (str[0] !=
'0' || str[1] !=
'x') {
1243 for (i=0; i < len; i++) {
1244 if (nsap_str[i] ==
'.')
1255 char* atma_str = (
char*) str;
1260 for (i=0; i < len; i++) {
1261 if (atma_str[i] ==
'.')
1274 uint8_t precedence = 0;
1275 uint8_t gateway_type = 0;
1276 uint8_t algorithm = 0;
1277 char* gateway = NULL;
1278 char* publickey = NULL;
1282 int token_count = 0;
1283 int ipseckey_len = 0;
1288 if(strlen(str) == 0)
1302 switch (token_count) {
1304 precedence = (uint8_t)atoi(token);
1307 gateway_type = (uint8_t)atoi(token);
1310 algorithm = (uint8_t)atoi(token);
1313 gateway = strdup(token);
1314 if (!gateway || (gateway_type == 0 &&
1315 (token[0] !=
'.' || token[1] !=
'\0'))) {
1323 publickey = strdup(token);
1334 if (!gateway || !publickey) {
1344 if (gateway_type == 1) {
1346 }
else if (gateway_type == 2) {
1348 }
else if (gateway_type == 3) {
1350 }
else if (gateway_type > 3) {
1396 data[0] = precedence;
1397 data[1] = gateway_type;
1398 data[2] = algorithm;
1428 unsigned int a, b, c, d;
1432 if (sscanf(str,
"%4x:%4x:%4x:%4x%n", &a, &b, &c, &d, &l) != 4 ||
1433 l != (
int)strlen(str) ||
1438 shorts[0] = htons(a);
1439 shorts[1] = htons(b);
1440 shorts[2] = htons(c);
1441 shorts[3] = htons(d);
1451 unsigned int a, b, c, d, e, f;
1455 if (sscanf(str,
"%2x-%2x-%2x-%2x-%2x-%2x%n",
1456 &a, &b, &c, &d, &e, &f, &l) != 6 ||
1457 l != (
int)strlen(str)) {
1474 unsigned int a, b, c, d, e, f, g, h;
1478 if (sscanf(str,
"%2x-%2x-%2x-%2x-%2x-%2x-%2x-%2x%n",
1479 &a, &b, &c, &d, &e, &f, &g, &h, &l) != 8 ||
1480 l != (
int)strlen(str)) {
1502 if (strlen(str) > 255) {
1505 for (ptr = str; *ptr; ptr++) {
1506 if (! isalnum((
unsigned char)*ptr)) {
1514 data[0] = strlen(str);
1515 memcpy(data + 1, str, strlen(str));
1528 uint8_t *data, *dp, ch = 0;
1538 while (parse_char(&ch, &str)) {
1549 if (!(length = (
size_t)(dp - data))) {
1572 const char *hit = str == NULL ? NULL : strchr(str,
' ');
1573 const char *pk = hit == NULL ? NULL : strchr(hit + 1,
' ');
1574 size_t hit_size = hit == NULL ? 0
1575 : pk == NULL ? strlen(hit + 1) : (size_t) (pk - hit) - 1;
1576 size_t pk_size = pk == NULL ? 0 : strlen(pk + 1);
1577 size_t hit_wire_size = (hit_size + 1) / 2;
1578 size_t pk_wire_size = ldns_b64_pton_calculate_size(pk_size);
1579 size_t rdf_size = 4 + hit_wire_size + pk_wire_size;
1582 int algorithm = str == NULL ? 0 : strtol(str, &endptr, 10);
1585 int hi, lo, written;
1587 if (hit_size == 0 || pk_size == 0 || (hit_size + 1) / 2 > 255
1589 || algorithm < 0 || algorithm > 255
1590 || (errno != 0 && algorithm == 0)
1591 || endptr == str ) {
1597 if ((data =
LDNS_XMALLOC(uint8_t, rdf_size)) == NULL) {
1628 data[0] = (uint8_t) hit_wire_size;
1629 data[1] = (uint8_t) algorithm;
1631 for (dp = data + 4; *hit && *hit !=
' '; dp++) {
1639 *dp = (uint8_t) hi << 4 | lo;
1650 pk_wire_size = (uint16_t) written;
1651 ldns_write_uint16(data + 2, pk_wire_size);
1652 rdf_size = 4 + hit_wire_size + pk_wire_size;
1680 uint8_t precedence = 0;
1681 uint8_t relay_type = 0;
1682 uint8_t discovery_optional = 0;
1687 int token_count = 0;
1688 int amtrelay_len = 0;
1692 if(strlen(str) == 0)
1706 switch (token_count) {
1708 precedence = (uint8_t)atoi(token);
1711 discovery_optional = (uint8_t)atoi(token);
1712 if (discovery_optional != 0 &&
1713 discovery_optional != 1) {
1721 relay_type = (uint8_t)atoi(token);
1724 relay = strdup(token);
1725 if (!relay || (relay_type == 0 &&
1726 (token[0] !=
'.' || token[1] !=
'\0'))) {
1741 if (!relay && relay_type > 0) {
1749 if (relay_type == 1) {
1751 }
else if (relay_type == 2) {
1753 }
else if (relay_type == 3) {
1755 }
else if (relay_type > 3) {
1783 data[0] = precedence;
1784 data[1] = relay_type;
1785 data[1] |= (discovery_optional << 7);
1792 , (uint16_t) amtrelay_len, data);
SHA-512 hash of selected content [RFC6234].
implementation of buffers to ease operations
ldns_status ldns_str2rdf_atma(ldns_rdf **rd, const char *str)
convert a str with a ATMA RR into wireformat
ldns_status ldns_str2rdf_str(ldns_rdf **rd, const char *str)
convert a string into wireformat (think txt record)
ldns_status ldns_str2rdf_nsec3_salt(ldns_rdf **rd, const char *salt_str)
Full certificate: the Certificate binary structure as defined in [RFC5280].
void ldns_set_bit(uint8_t *byte, int bit_nr, bool value)
ldns_status ldns_str2rdf_loc(ldns_rdf **rd, const char *str)
convert a string with a LOC RR into wireformat
ldns_status ldns_str2rdf_dname(ldns_rdf **d, const char *str)
convert a dname string into wireformat
time_t ldns_mktime_from_utc(const struct tm *tm)
Convert TM to seconds since epoch (midnight, January 1st, 1970).
ldns_status ldns_str2rdf_alg(ldns_rdf **rd, const char *str)
convert an algorithm value into wireformat
ldns_status ldns_str2rdf_matching_type(ldns_rdf **rd, const char *str)
convert a tlsa matching type value into wireformat
#define LDNS_XMALLOC(type, count)
size_t ldns_rdf_size(const ldns_rdf *rd)
returns the size of the rdf.
ldns_status ldns_str2rdf_aaaa(ldns_rdf **rd, const char *str)
convert the str with an AAAA record into wireformat
ldns_status ldns_str2rdf_b32_ext(ldns_rdf **rd, const char *str)
convert the string with the b32 ext hex data into wireformat
void ldns_buffer_free(ldns_buffer *buffer)
frees the buffer.
ldns_status ldns_str2rdf_nsec(ldns_rdf **rd, const char *str)
convert string with nsec into wireformat
ldns_status ldns_str2rdf_eui48(ldns_rdf **rd, const char *str)
convert 6 hex bytes separated by dashes into wireformat
ldns_status ldns_str2rdf_hip(ldns_rdf **rd, const char *str)
Convert a "<algorithm> <hit> <pk>" encoding of the value field as specified in Section 6.
Reserved for Private Use.
ssize_t ldns_bget_token(ldns_buffer *b, char *token, const char *delim, size_t limit)
returns a token/char from the buffer b.
ldns_rr_type ldns_get_rr_type_by_name(const char *name)
retrieves a rrtype by looking up its name.
SubjectPublicKeyInfo: DER-encoded binary structure as defined in [RFC5280].
ldns_status ldns_str2rdf_time(ldns_rdf **rd, const char *time)
convert a time string to a time value in wireformat
#define LDNS_XREALLOC(ptr, type, count)
A non-zero sequence of US-ASCII letters and numbers in lower case.
A <character-string> encoding of the value field as specified [RFC1035], Section 5....
void ldns_buffer_new_frm_data(ldns_buffer *buffer, const void *data, size_t size)
creates a buffer with the specified data.
void ldns_rdf_free(ldns_rdf *rd)
frees a rdf structure, leaving the data pointer intact.
#define INLINE
splint static inline workaround
Including this file will include all ldns files, and define some lookup tables.
ldns_rdf * ldns_native2rdf_int8(ldns_rdf_type type, uint8_t value)
returns the rdf containing the native uint8_t repr.
uint8_t * ldns_rdf_data(const ldns_rdf *rd)
returns the data of the rdf.
ldns_status ldns_str2rdf_apl(ldns_rdf **rd, const char *str)
convert str with the apl record into wireformat
ldns_status ldns_str2rdf_selector(ldns_rdf **rd, const char *str)
convert a tlsa selector value into wireformat
ldns_status ldns_str2rdf_service(ldns_rdf **rd __attribute__((unused)), const char *str __attribute__((unused)))
#define LDNS_MAX_DOMAINLEN
Maximum length of a complete dname.
draft-ietf-mboned-driad-amt-discovery
ldns_status ldns_str2rdf_hex(ldns_rdf **rd, const char *str)
convert a hex value into wireformat
uint16_t ldns_rdf2native_int16(const ldns_rdf *rd)
returns the native uint16_t representation from the rdf.
ldns_status ldns_str2rdf_long_str(ldns_rdf **rd, const char *str)
Convert a <character-string> encoding of the value field as specified [RFC1035], Section 5....
ldns_lookup_table ldns_algorithms[]
Taken from RFC 2535, section 7.
#define LDNS_MAX_LABELLEN
Maximum length of a dname label.
Reserved for Private Use.
ldns_status ldns_str2rdf_tag(ldns_rdf **rd, const char *str)
Convert a non-zero sequence of US-ASCII letters and numbers into wireformat.
ldns_status ldns_str2rdf_cert_alg(ldns_rdf **rd, const char *str)
convert an certificate algorithm value into wireformat
ldns_status ldns_str2rdf_int16(ldns_rdf **rd, const char *shortstr)
convert a string to a int16 in wireformat
ldns_status ldns_str2rdf_nsap(ldns_rdf **rd, const char *str)
convert a str with a NSAP RR into wireformat
Exact match on selected content.
ldns_status ldns_str2rdf_amtrelay(ldns_rdf **rd, const char *str)
Concert a"<precedence> <D-bit> <type> <relay>" encoding of the value field as specified in Section 4....
ldns_status ldns_str2rdf_wks(ldns_rdf **rd, const char *str)
convert string with a WKS RR into wireformat
ldns_status ldns_str2rdf_ipseckey(ldns_rdf **rd, const char *str)
convert a str with a IPSECKEY RR into wireformat
Reserved for Private Use.
uint32_t ldns_str2period(const char *nptr, const char **endptr)
converts a ttl value (like 5d2h) to a long.
enum ldns_enum_status ldns_status
ldns_rdf * ldns_rdf_new_frm_data(ldns_rdf_type type, size_t size, const void *data)
allocates a new rdf structure and fills it.
#define LDNS_MALLOC(type)
Memory management macros.
bool ldns_dname_str_absolute(const char *dname_str)
Checks whether the given dname string is absolute (i.e.
ldns_rdf * ldns_rdf_new(ldns_rdf_type type, size_t size, void *data)
allocates a new rdf structure and fills it.
A general purpose lookup table.
int ldns_b32_pton_extended_hex(const char *src, size_t src_sz, uint8_t *dst, size_t dst_sz)
ldns_status ldns_str2rdf_unknown(ldns_rdf **rd __attribute__((unused)), const char *str __attribute__((unused)))
ldns_status ldns_str2rdf_ilnp64(ldns_rdf **rd, const char *str)
convert 4 * 16bit hex separated by colons into wireformat
4 shorts represented as 4 * 16 bit hex numbers separated by colons.
Domain issued certificate.
ldns_status ldns_str2rdf_b64(ldns_rdf **rd, const char *str)
convert the string with the b64 data into wireformat
int ldns_hexdigit_to_int(char ch)
Returns the int value of the given (hex) digit.
Resource record data field.
ldns_status ldns_str2rdf_eui64(ldns_rdf **rd, const char *str)
convert 8 hex bytes separated by dashes into wireformat
Sevice certificate constraint.
ldns_lookup_table * ldns_lookup_by_name(ldns_lookup_table *table, const char *name)
Represents the Public Key Algorithm, HIT and Public Key fields for the HIP RR types.
ldns_rr_class ldns_get_rr_class_by_name(const char *name)
retrieves a class by looking up its name.
ldns_status ldns_str2rdf_a(ldns_rdf **rd, const char *str)
convert str with an A record into wireformat
ldns_lookup_table ldns_cert_algorithms[]
Taken from RFC 2538.
ldns_status ldns_str2rdf_period(ldns_rdf **rd, const char *period)
enum ldns_enum_rr_type ldns_rr_type
ldns_status ldns_str2rdf_certificate_usage(ldns_rdf **rd, const char *str)
convert a tlsa certificate usage value into wireformat
ldns_status ldns_str2rdf_int8(ldns_rdf **rd, const char *bytestr)
convert a byte into wireformat
ldns_rdf * ldns_dnssec_create_nsec_bitmap(ldns_rr_type rr_type_list[], size_t size, ldns_rr_type nsec_type)
Create the type bitmap for an NSEC(3) record.
SHA-256 hash of selected content [RFC6234].
ldns_status ldns_str2rdf_class(ldns_rdf **rd, const char *str)
convert string with a classname into wireformat
int ldns_b64_pton(char const *src, uint8_t *target, size_t targsize)
8 * 8 bit hex numbers separated by dashes.
6 * 8 bit hex numbers separated by dashes.
ldns_status ldns_str2rdf_int32(ldns_rdf **rd, const char *longstr)
convert a strings into a 4 byte int in wireformat
ldns_status ldns_str2rdf_type(ldns_rdf **rd, const char *str)
convert a rrtype into wireformat