1
2getdns_service(3)                   getdns                   getdns_service(3)
3
4
5

NAME

7       getdns_service, getdns_service_sync -- getdns lookup of a service
8
9

LIBRARY

11       DNS Resolver library (libgetdns, -lgetdns)
12
13

SYNOPSIS

15       #include <getdns.h>
16
17       getdns_return_t
18       getdns_service (getdns_context *context,
19          const char *name,
20          getdns_dict *extensions,
21          void *userarg,
22          getdns_transaction_t *transaction_id,
23          getdns_callback_t callbackfn)
24
25       getdns_return_t
26       getdns_service_sync (getdns_context *context,
27          const char *name,
28          getdns_dict *extensions,
29          getdns_dict **response)
30
31

DESCRIPTION

33       The getdns_service (3) and getdns_service_sync functions provide public
34       entry points into the getdns API library to retrieve the  SRV  informa‐
35       tion given a name.
36
37
38       context  A  pointer to the previously created DNS context that is to be
39          used with this DNS request. see getdns_context (3)
40
41
42       name the service name to resolve
43
44
45       extensions extensions for this request,  NULL  if  no  extensions,  see
46          libgetdns (3) for a detailed description of extensions
47
48
49       userarg returned to the callback function untouched, can be NULL
50
51
52       transaction_id  populated  by the API and used to identify the callback
53          (for example to getdns_cancel_callback), can be NULL, set  to  0  if
54          the function fails
55
56
57       callbackfn  non-NULL  pointer to a callback function defined by the ap‐
58          plication, typically used to process the response.  Only  the  asyn‐
59          chronous signature accepts a callback function, the synchronous sig‐
60          nature does not include a callback.  See libgetdns (3)  for  a  more
61          detailed discussion of callback functions.
62
63
64       response A getdns_dict type is returned in response and always contains
65          at least three names: replies_full (a list containing  the  DNS  re‐
66          sponse  as  binary data), replies_tree (a list containing the parsed
67          DNS response data) and status (an int).  The storage associated with
68          this must be freed by a call to getdns_free_sync_request_memory (3).
69
70
71
72

RETURN VALUES

74       Upon  successful  completion  the functions return GETDNS_RETURN_GOOD ,
75       otherwise the following error values are returned:
76
77
78       GETDNS_RETURN_BAD_CONTEXT if the context pointer is invalid or the con‐
79       text has internal deficiencies
80
81       GETDNS_RETURN_BAD_DOMAIN_NAME if the domain name passed to the function
82       is invalid
83
84       GETDNS_RETURN_EXTENSION_MISFORMAT if the data type specified in one  or
85       more of the extensions does not match the specifications
86
87       GETDNS_RETURN_GENERIC_ERROR  if  some  problem  was  encountered in the
88       function not addressed by one of the more specific return codes
89
90       GETDNS_RETURN_INVALID PARAMETER if one or more parameters  has  an  in‐
91       valid value
92
93       GETDNS_RETURN_MEMORY_ERROR if unable to allocate the memory required
94
95       GETDNS_RETURN_NO_SUCH_EXTENSION if one or more of the strings specified
96       in the extensions are not valid
97
98       The values of status included in the response parameter are:
99
100
101       GETDNS_RESPSTATUS_GOOD if at least one response was returned
102
103       GETDNS_RESPSTATUS_NO_NAME if queries for the name yielded all  negative
104       responses
105
106       GETDNS_RESPSTATUS_ALL_TIMEOUT if all queries for the name timed out
107
108       GETDNS_RESPSTATUS_NO_SECURE_ANSWERS  if  only  secure  replies accepted
109       (per context) and at least one response was received  but  no  DNS  re‐
110       sponses were secure through DNSSEC
111
112
113       For  a  more  detailed explanation of the response object see libgetdns
114       (3)
115
116

EXAMPLES

118       TBD
119
120

FILES

122       /etc/hosts
123       /etc/resolv.conf
124
125

SEE ALSO

127       libgetdns(3),  getdns_context(3),   getdns_free_sync_request_memory(3),
128       getdns_general(3), getdns_hostname(3), getdns_address(3),
129
130
131
132
133getdns 1.7.3                     December 2015               getdns_service(3)
Impressum