Zonemaster-LDNS
view release on metacpan or search on metacpan
ldns/str2host.c view on Meta::CPAN
*rd = ldns_rdf_new_frm_data(
LDNS_RDF_TYPE_INT32, sizeof(uint32_t), r);
LDNS_FREE(r);
return *rd?LDNS_STATUS_OK:LDNS_STATUS_MEM_ERR;
}
}
#ifdef __BYTE_ORDER__
# if __BYTE_ORDER__ == __ORDER_BIG_ENDIAN__
# define htonll(x) (x)
# define ntohll(x) (x)
# else
# define htonll(x) (((uint64_t)htonl((x) & 0xFFFFFFFF) << 32) | htonl((x) >> 32))
# define ntohll(x) (((uint64_t)ntohl((x) & 0xFFFFFFFF) << 32) | ntohl((x) >> 32))
# endif
#else
# define htonll(x) ((1==htonl(1)) ? (x) : ((uint64_t)htonl((x) & 0xFFFFFFFF) << 32) | htonl((x) >> 32))
# define ntohll(x) ((1==ntohl(1)) ? (x) : ((uint64_t)ntohl((x) & 0xFFFFFFFF) << 32) | ntohl((x) >> 32))
#endif
ldns_status
ldns_str2rdf_ipn(ldns_rdf **rd, const char *ipnstr)
{
char *end;
uint8_t r[sizeof(uint64_t)];
char left[21], *right;
if(strlen(ipnstr) > 21)
( run in 1.649 second using v1.01-cache-2.11-cpan-800906f7e73 )