Man page - getdns_service(3)
Packages contas this manual
- getdns_dict_get(3)
- getdns_list_set_int(3)
- getdns_display_ip_address(3)
- getdns_list_set_dict(3)
- getdns_dict_get_names(3)
- getdns_context(3)
- getdns_list_set(3)
- getdns_convert_fqdn_to_dns_name(3)
- getdns_dict_get_list(3)
- getdns_dict_create_with_extended_memory_functions(3)
- getdns_list(3)
- getdns_dict_create_with_memory_functions(3)
- getdns_context_get_api_information(3)
- getdns_context_set_dns_transport(3)
- getdns_context_set_context_update_callback(3)
- getdns_dict_set_int(3)
- getdns_context_set_dnssec_allowed_skew(3)
- getdns_list_create(3)
- getdns_pretty_print_dict(3)
- getdns_list_create_with_memory_functions(3)
- getdns_context_create(3)
- getdns_validate_dnssec(3)
- getdns_address(3)
- getdns_context_create_with_extended_memory_functions(3)
- getdns_list_set_list(3)
- getdns_context_set_namespaces(3)
- getdns_dict_get_bindata(3)
- getdns_list_get_int(3)
- getdns_context_set_resolution_type(3)
- getdns_list_get_data_type(3)
- getdns_list_set_bindata(3)
- getdns_context_destroy(3)
- getdns_list_get_length(3)
- getdns_dict_set_dict(3)
- getdns_dict_set_bindata(3)
- getdns_general_sync(3)
- getdns_list_get_list(3)
- getdns_context_set_limit_outstanding_queries(3)
- getdns_list_get_bindata(3)
- getdns_address_sync(3)
- getdns_dict_set_list(3)
- getdns_context_set_timeout(3)
- getdns_dict_create(3)
- getdns_context_set(3)
- libgetdns(3)
- getdns_dict_get_data_type(3)
- getdns_service(3)
- getdns_list_get_dict(3)
- getdns_list_destroy(3)
- getdns_convert_dns_name_to_fqdn(3)
- getdns_dict_get_dict(3)
- getdns_hostname_sync(3)
- getdns_convert(3)
- getdns_context_set_dns_root_servers(3)
- getdns_general(3)
- getdns_list_create_with_extended_memory_functions(3)
- getdns_root_trust_anchor(3)
- getdns_context_create_with_memory_functions(3)
- getdns_list_get(3)
- getdns_cancel_callback(3)
- getdns_context_set_dnssec_trust_anchors(3)
- getdns_context_set_suffix(3)
- getdns_dict_destroy(3)
- getdns_dict_get_int(3)
- getdns_context_set_append_name(3)
- getdns_context_set_follow_redirects(3)
- getdns_dict_set(3)
- getdns_dict(3)
- getdns_hostname(3)
- getdns_service_sync(3)
apt-get install libgetdns-dev
Manual
| getdns_service(3) | getdns | getdns_service(3) |
NAME
getdns_service, getdns_service_sync -- getdns lookup of a service
LIBRARY
DNS Resolver library (libgetdns, -lgetdns)
SYNOPSIS
#include <getdns.h>
getdns_return_t
getdns_service (getdns_context *context,
getdns_dict *extensions,
void *userarg,
getdns_transaction_t *transaction_id,
getdns_callback_t callbackfn)
getdns_return_t
getdns_service_sync (getdns_context *context,
getdns_dict *extensions,
getdns_dict **response)
DESCRIPTION
The getdns_service (3) and getdns_service_sync functions provide public entry points into the getdns API library to retrieve the SRV information given a name.
context A pointer to the previously created DNS context that is to be used with this DNS request. see getdns_context (3)
name the service name to resolve
extensions extensions for this request, NULL if no extensions, see libgetdns (3) for a detailed description of extensions
userarg returned to the callback function untouched, can be NULL
transaction_id populated by the API and used to identify the callback (for example to getdns_cancel_callback), can be NULL, set to 0 if the function fails
callbackfn non-NULL pointer to a callback function defined by the application, typically used to process the response. Only the asynchronous signature accepts a callback function, the synchronous signature does not include a callback. See libgetdns (3) for a more detailed discussion of callback functions.
response A getdns_dict type is returned in response and always contains at least three names: replies_full (a list containing the DNS response as binary data), replies_tree (a list containing the parsed DNS response data) and status (an int). The storage associated with this must be freed by a call to getdns_free_sync_request_memory (3).
RETURN VALUES
Upon successful completion the functions return GETDNS_RETURN_GOOD , otherwise the following error values are returned:
GETDNS_RETURN_BAD_CONTEXT if the context pointer is invalid or the context has internal deficiencies
GETDNS_RETURN_BAD_DOMAIN_NAME if the domain name passed to the function is invalid
GETDNS_RETURN_EXTENSION_MISFORMAT if the data type specified in one or more of the extensions does not match the specifications
GETDNS_RETURN_GENERIC_ERROR if some problem was encountered in the function not addressed by one of the more specific return codes
GETDNS_RETURN_INVALID PARAMETER if one or more parameters has an invalid value
GETDNS_RETURN_MEMORY_ERROR if unable to allocate the memory required
GETDNS_RETURN_NO_SUCH_EXTENSION if one or more of the strings specified in the extensions are not valid
The values of status included in the response parameter are:
GETDNS_RESPSTATUS_GOOD if at least one response was returned
GETDNS_RESPSTATUS_NO_NAME if queries for the name yielded all negative responses
GETDNS_RESPSTATUS_ALL_TIMEOUT if all queries for the name timed out
GETDNS_RESPSTATUS_NO_SECURE_ANSWERS if only secure replies accepted (per context) and at least one response was received but no DNS responses were secure through DNSSEC
For a more detailed explanation of the response object see libgetdns (3)
EXAMPLES
TBD
FILES
/etc/hosts
/etc/resolv.conf
SEE ALSO
libgetdns(3), getdns_context(3), getdns_free_sync_request_memory(3), getdns_general(3), getdns_hostname(3), getdns_address(3),
| December 2015 | getdns 1.6.0 |