Implement getdns_convert_dns_name_to_fqdn

This commit is contained in:
Willem Toorop 2013-12-19 15:54:13 +01:00
parent 740ad82822
commit 0b2d467420
1 changed files with 10 additions and 2 deletions

View File

@ -36,6 +36,7 @@
#include <locale.h>
#include <stringprep.h>
#include <idna.h>
#include <ldns/ldns.h>
/* stuff to make it compile pedantically */
#define UNUSED_PARAM(x) ((void)(x))
@ -43,8 +44,15 @@
char *
getdns_convert_dns_name_to_fqdn(char *name_from_dns_response)
{
UNUSED_PARAM(name_from_dns_response);
return NULL;
char *str;
ldns_rdf *rdf = ldns_rdf_new_frm_data( LDNS_RDF_TYPE_DNAME
, strlen(name_from_dns_response)+1
, name_from_dns_response
);
if (!rdf) return NULL;
str = ldns_rdf2str(rdf);
ldns_rdf_free(rdf);
return str;
}
char *