getdns_context creation/destruction functions
Functions | |
getdns_return_t | getdns_context_create (getdns_context **context, int set_from_os) |
getdns_return_t | getdns_context_create_with_memory_functions (getdns_context **context, int set_from_os, void *(*malloc)(size_t), void *(*realloc)(void *, size_t), void(*free)(void *)) |
getdns_return_t | getdns_context_create_with_extended_memory_functions (getdns_context **context, int set_from_os, void *userarg, void *(*malloc)(void *userarg, size_t), void *(*realloc)(void *userarg, void *, size_t), void(*free)(void *userarg, void *)) |
void | getdns_context_destroy (getdns_context *context) |
Detailed Description
Function Documentation
getdns_return_t getdns_context_create | ( | getdns_context ** | context, |
int | set_from_os | ||
) |
creates a new getdns context with default settings. If used multi-threaded, user must define appropriate OpenSSL callback locking functions (e.g. CRYPTO_THREADID_set_call) depending on the library version used.
- Parameters
-
context context that can be used immediately with other API calls set_from_os set to 1 to initialize the context with os defaults the second bit set (2) prevents OpenSSL library initialization.
- Returns
- GETDNS_RETURN_GOOD on success
getdns_return_t getdns_context_create_with_memory_functions | ( | getdns_context ** | context, |
int | set_from_os, | ||
void *(*)(size_t) | malloc, | ||
void *(*)(void *, size_t) | realloc, | ||
void(*)(void *) | free | ||
) |
creates a new getdns context with default settings using custom memory functions. If used multi-threaded, user must define appropriate OpenSSL callback locking functions (e.g. CRYPTO_THREADID_set_call) depending on the library version used.
- Parameters
-
context context that can be used immediately with other API calls set_from_os set to 1 to initialize the context with os defaults the second bit set (2) prevents OpenSSL library initialization. malloc custom malloc function realloc custom realloc function free custom free function
- Returns
- GETDNS_RETURN_GOOD on success
getdns_return_t getdns_context_create_with_extended_memory_functions | ( | getdns_context ** | context, |
int | set_from_os, | ||
void * | userarg, | ||
void *(*)(void *userarg, size_t) | malloc, | ||
void *(*)(void *userarg, void *, size_t) | realloc, | ||
void(*)(void *userarg, void *) | free | ||
) |
creates a new getdns context with default settings using extended custom memory functions. If used multi-threaded, user must define appropriate OpenSSL callback locking functions (e.g. CRYPTO_THREADID_set_call) depending on the library version used.
- Parameters
-
context context that can be used immediately with other API calls set_from_os set to 1 to initialize the context with os defaults the second bit set (2) prevents OpenSSL library initialization. userarg parameter passed to the custom malloc, realloc and free functions malloc custom malloc function realloc custom realloc function free custom free function
- Returns
- GETDNS_RETURN_GOOD on success
void getdns_context_destroy | ( | getdns_context * | context | ) |