mirror of https://github.com/getdnsapi/getdns.git
Implement getdns_convert_dns_name_to_fqdn
This commit is contained in:
parent
740ad82822
commit
0b2d467420
|
@ -36,6 +36,7 @@
|
||||||
#include <locale.h>
|
#include <locale.h>
|
||||||
#include <stringprep.h>
|
#include <stringprep.h>
|
||||||
#include <idna.h>
|
#include <idna.h>
|
||||||
|
#include <ldns/ldns.h>
|
||||||
|
|
||||||
/* stuff to make it compile pedantically */
|
/* stuff to make it compile pedantically */
|
||||||
#define UNUSED_PARAM(x) ((void)(x))
|
#define UNUSED_PARAM(x) ((void)(x))
|
||||||
|
@ -43,8 +44,15 @@
|
||||||
char *
|
char *
|
||||||
getdns_convert_dns_name_to_fqdn(char *name_from_dns_response)
|
getdns_convert_dns_name_to_fqdn(char *name_from_dns_response)
|
||||||
{
|
{
|
||||||
UNUSED_PARAM(name_from_dns_response);
|
char *str;
|
||||||
return NULL;
|
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 *
|
char *
|
||||||
|
|
Loading…
Reference in New Issue