[getdns-api] api review - section 2.4 and 2.5

Goyal, Neel ngoyal at verisign.com
Wed Jan 29 14:30:14 MST 2014


This is commentary on sections 2.4 and 2.5 in reference to Bob Steagall’s review of the getdns API - http://www.vpnc.org/pipermail/getdns-api/2014-January/000229.html

Section 2.4 talks about the current convert functions.  I think it was a misunderstanding since the return value is actually allocated instead of modified in place.  That discussion should probably move to the Distinguish strings from wire format in conversion functions discussion as well.

Section 2.5 introduces a few additional functions:

char* getdns_convert_dns_name_to_fqdn_2
(
 char const* src_name,
 size_t src_len,
 char* dst_name,
 size_t dst_len
);

char* getdns_convert_fqdn_to_dns_name_2
(
 char const* src_name,
 size_t src_len,
 char* dst_name,
 size_t dst_len
);

char* getdns_convert_ulabel_to_alabel_2
(
 char const* src_ulabel,
 size_t src_len,
 char* dst_alabel,
 size_t dst_len
);

char* getdns_convert_alabel_to_ulabel_2
(
 char const* src_alabel,
 size_t src_len,
 char* dst_ulabel,
 size_t dst_len
);

Note that the size of the source array is provided in the examples above. While one could make an
argument against including this extra parameter, it does have the advantages of allowing for early
parameter validation and permitting the use of embedded substrings as source arguments.

I am not sure these need to be included initially.  The big benefit to me is the ability to convert substrings - is that something we think the users might need?  If we were to include these, then I think we should tweak the signatures to distinguish between wire format and string and also return getdns_return_t.

“This message (including any attachments) is intended only for the use of the individual or entity to which it is addressed, and may contain information that is non-public, proprietary, privileged, confidential and exempt from disclosure under applicable law or may be constituted as attorney work product. If you are not the intended recipient, you are hereby notified that any use, dissemination, distribution, or copying of this communication is strictly prohibited. If you have received this message in error, notify sender immediately and delete this message immediately.”
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.vpnc.org/pipermail/getdns-api/attachments/20140129/b54df274/attachment.html>


More information about the getdns-api mailing list