[API 0.372] fix just_address_answers in example

To match its description in section 4
This commit is contained in:
Willem Toorop 2014-01-14 14:55:59 +01:00
parent 4866a4314a
commit 929ada950b
5 changed files with 14 additions and 4 deletions

View File

@ -96,7 +96,7 @@ int main()
/* Set up the getdns call */
struct getdns_dict * this_addr_to_look_up = getdns_dict_create();
// TODO: check the return value above
struct getdns_bindata this_type = { 5, (void *)"IPv4" };
struct getdns_bindata this_type = { 4, (void *)"IPv4" };
getdns_return_t this_ret = getdns_dict_set_bindata(this_addr_to_look_up, "address_type", &this_type);
UNUSED_PARAM(this_ret);
struct getdns_bindata this_ipv4_addr = { 4, (void *)"\x08\x08\x08\x08" };

Binary file not shown.

BIN
spec/getdns-0.372.tgz Normal file

Binary file not shown.

View File

@ -1,4 +1,4 @@
/* Created at 2013-12-11-23-50-41*/
/* Created at 2013-12-12-00-12-53*/
#ifndef GETDNS_H
#define GETDNS_H

View File

@ -952,7 +952,17 @@ look something like this:</p>
<pre>
{ # This is the response object
"replies_full": [ &lt;bindata of the first response&gt;, &lt;bindata of the second response&gt; ],
"just_address_answers": [ &lt;bindata of 0x0a0b0c01&gt;, &lt;bindata of 0x33445566334455663344556633445566&gt; ],
"just_address_answers":
[
{
"address_type": &lt;bindata of "IPv4"&gt;,
"address_data": &lt;bindata of 0x0a0b0c01&gt;,
},
{
"address_type": &lt;bindata of "IPv6"&gt;,
"address_data": &lt;bindata of 0x33445566334455663344556633445566&gt;
}
],
"canonical_name": &lt;bindata of "www.example.com"&gt;,
"answer_type": GETDNS_NAMETYPE_DNS,
"intermediate_aliases": [],
@ -2198,7 +2208,7 @@ The response dicts inherit the custom memory management functions and the value
<h1>9. The Generated Files</h1>
<p>There is <a href="getdns-0.371.tgz">a tarball</a> that includes the .h files,
<p>There is <a href="getdns-0.372.tgz">a tarball</a> that includes the .h files,
the examples, and so on. The examples all make, even though there is no API implementation, based
on a pseudo-implementation in the tarball; see make-examples-PLATFORM.sh. Note that this currently builds fine
on the Macintosh and Ubuntu; help is definitely appreciated on making the build process