Typedefs | |
typedef void(* | getdns_callback_t) (getdns_context *context, getdns_callback_type_t callback_type, getdns_dict *response, void *userarg, getdns_transaction_t transaction_id) |
Functions | |
getdns_return_t | getdns_general (getdns_context *context, const char *name, uint16_t request_type, const getdns_dict *extensions, void *userarg, getdns_transaction_t *transaction_id, getdns_callback_t callbackfn) |
getdns_return_t | getdns_address (getdns_context *context, const char *name, const getdns_dict *extensions, void *userarg, getdns_transaction_t *transaction_id, getdns_callback_t callbackfn) |
getdns_return_t | getdns_hostname (getdns_context *context, const getdns_dict *address, const getdns_dict *extensions, void *userarg, getdns_transaction_t *transaction_id, getdns_callback_t callbackfn) |
getdns_return_t | getdns_service (getdns_context *context, const char *name, const getdns_dict *extensions, void *userarg, getdns_transaction_t *transaction_id, getdns_callback_t callbackfn) |
getdns_return_t | getdns_cancel_callback (getdns_context *context, getdns_transaction_t transaction_id) |
Detailed Description
Typedef Documentation
◆ getdns_callback_t
typedef void(* getdns_callback_t) (getdns_context *context, getdns_callback_type_t callback_type, getdns_dict *response, void *userarg, getdns_transaction_t transaction_id) |
The type of the callback function that must be registered when scheduling asynchronous requests. The registered function will be called from the eventloop with the following parameters.
- See also
- Callback types and texts
- Parameters
-
context The DNS context that was used in the calling function callback_type Supplies the reason for the callback. This will be one of: - GETDNS_CALLBACK_COMPLETE The response has the requested data in it
- GETDNS_CALLBACK_CANCEL The calling program cancelled the callback; response is NULL
- GETDNS_CALLBACK_TIMEOUT The requested action timed out; response is filled in with empty structures or will contain additional information about the timeout when used in combination with the return_call_reporting extension.
- GETDNS_CALLBACK_ERROR The requested action had an error; response is NULL.
response A response object with the response data. The application is responsible for cleaning up the response object with getdns_dict_destroy. userarg Identical to the userarg passed to the calling function. transaction_id The transaction identifier that was assigned by the calling function.
Function Documentation
◆ getdns_general()
getdns_return_t getdns_general | ( | getdns_context * | context, |
const char * | name, | ||
uint16_t | request_type, | ||
const getdns_dict * | extensions, | ||
void * | userarg, | ||
getdns_transaction_t * | transaction_id, | ||
getdns_callback_t | callbackfn | ||
) |
retrieve general DNS data
- See also
- RR Types
- getdns_general_sync
- Parameters
-
context pointer to a previously created context to be used for this call name the ASCII based domain name to lookup request_type RR type for the query, e.g. GETDNS_RR_TYPE_NS extensions dict data structures, NULL to use no extensions userarg void* returned to the callback untouched [out] transaction_id id used to identify the callback, NULL is ignored callbackfn callback function defined by the application
- Returns
- GETDNS_RETURN_GOOD on success
◆ getdns_address()
getdns_return_t getdns_address | ( | getdns_context * | context, |
const char * | name, | ||
const getdns_dict * | extensions, | ||
void * | userarg, | ||
getdns_transaction_t * | transaction_id, | ||
getdns_callback_t | callbackfn | ||
) |
retrieve address assigned to a DNS name
- See also
- getdns_address_sync
- Parameters
-
context pointer to a previously created context to be used for this call name the ASCII based domain name to lookup extensions dict data structures, NULL to use no extensions userarg void* returned to the callback untouched [out] transaction_id id used to identify the callback, NULL is ignored callbackfn callback function defined by the application
- Returns
- GETDNS_RETURN_GOOD on success
◆ getdns_hostname()
getdns_return_t getdns_hostname | ( | getdns_context * | context, |
const getdns_dict * | address, | ||
const getdns_dict * | extensions, | ||
void * | userarg, | ||
getdns_transaction_t * | transaction_id, | ||
getdns_callback_t | callbackfn | ||
) |
retrieve hostname assigned to an IP address
- See also
- getdns_hostname_sync
- Parameters
-
context pointer to a previously created context to be used for this call address the address to look up extensions dict data structures, NULL to use no extensions userarg void* returned to the callback untouched [out] transaction_id id used to identify the callback, NULL is ignored callbackfn callback function defined by the application
- Returns
- GETDNS_RETURN_GOOD on success
◆ getdns_service()
getdns_return_t getdns_service | ( | getdns_context * | context, |
const char * | name, | ||
const getdns_dict * | extensions, | ||
void * | userarg, | ||
getdns_transaction_t * | transaction_id, | ||
getdns_callback_t | callbackfn | ||
) |
retrieve a service assigned to a DNS name
- See also
- getdns_service_sync
- Parameters
-
context pointer to a previously created context to be used for this call name the ASCII based domain name to lookup extensions dict data structures, NULL to use no extensions userarg void* returned to the callback untouched [out] transaction_id id used to identify the callback, NULL is ignored callbackfn callback function defined by the application
- Returns
- GETDNS_RETURN_GOOD on success
◆ getdns_cancel_callback()
getdns_return_t getdns_cancel_callback | ( | getdns_context * | context, |
getdns_transaction_t | transaction_id | ||
) |
Cancel an outstanding asynchronous request. The callback registered with the request will be called with the getdns_callback_type_t set to GETDNS_CALLBACK_CANCEL and the response set to NULL.