[getdns-api] additional helper functions for bindata

Wiley, Glen gwiley at verisign.com
Tue Jan 7 21:35:34 CET 2014


We received feedback as a result of an internal hackathon that included:

I used src/example/example-hostname.c as my guide and was confused by this line for a short while:

struct getdns_bindata this_type = { 5, (void *)"IPv4" };

It took me a while to realize 5 was the length of "IPv4". Maybe there could be a helper function to populate a bindata. For example:

struct getdns_bindata this_type;
getdns_bindata_set(&this_type, "IPv4", sizeof("IPv4"));

or

getdns_bindata_set_from_str(&this_type, "IPv4");

What do folks think of adding one of these to the specification?
--
Glen Wiley
KK4SFV
Sr. Engineer
The Hive, Verisign, Inc.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://getdnsapi.net/pipermail/spec/attachments/20140107/b387f4dc/attachment.html>
-------------- next part --------------
_______________________________________________
getdns-api mailing list
getdns-api at vpnc.org


More information about the spec mailing list