getdns_context_set_context_update_callback(3)

getdns_context_set_context_update_callback3

Usage

#include <getdns.h>

getdns_return_t
getdns_context_set_context_update_callback (getdns_context ** context,

void (*cbfun)(getdns_context *context, getdns_context_code_t changed_item)

Library

DNS Resolver library (libgetdns, -lgetdns)

Overview

Changes to the context such as in response to system files that affect the contet (/etc/resolv.conf etc.) trigger a call to the callback function specified as cbfun

context a previously initialized context

cbfun callback function to invoked when the specified context changes. If this argument is NULL then updates to the context will not invoke a callback.

Return values

Upon successful completion each of these functions return GETDNS_RETURN_GOOD , otherwise the following error values are returned:

GETDNS_RETURN_GENERIC_ERROR memory allocation failed or some other untoward thing happened

GETDNS_RETURN_BAD_CONTEXT if the context pointer is invalid

Examples

TBD

Releases

6 releases since Debian 9 (Stretch); the text changed 3 times.

  1. 9
  2. 10
  3. 11–13
  4. Arch

From getdns 1.7.3-2 in Arch Linux 2026-11-01. Parsed by carta from the page's man source.