mirror of https://github.com/getdnsapi/getdns.git
[API 0.372] fix just_address_answers in example
To match its description in section 4
This commit is contained in:
parent
4866a4314a
commit
929ada950b
|
@ -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.
Binary file not shown.
|
@ -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
|
||||
|
||||
|
|
|
@ -952,7 +952,17 @@ look something like this:</p>
|
|||
<pre>
|
||||
{ # This is the response object
|
||||
"replies_full": [ <bindata of the first response>, <bindata of the second response> ],
|
||||
"just_address_answers": [ <bindata of 0x0a0b0c01>, <bindata of 0x33445566334455663344556633445566> ],
|
||||
"just_address_answers":
|
||||
[
|
||||
{
|
||||
"address_type": <bindata of "IPv4">,
|
||||
"address_data": <bindata of 0x0a0b0c01>,
|
||||
},
|
||||
{
|
||||
"address_type": <bindata of "IPv6">,
|
||||
"address_data": <bindata of 0x33445566334455663344556633445566>
|
||||
}
|
||||
],
|
||||
"canonical_name": <bindata of "www.example.com">,
|
||||
"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
|
||||
|
|
Loading…
Reference in New Issue