GETDNS_CONTEXT_SET_CONTEXT_UPDATE_CALLBACK(3)
β¨ getdns_context_set_context_update_callback β bestie, you get told when the context changes β¨
okay so this is a page from the DNS Resolver library manual, specifically getdns_context_set_context_update_callback(3) β the "hey bestie, something moved" hotline for your getdns context. π
πΈ NAME πΈ
getdns_context_set_context_update_callback β get informed on getdns context updates π
π LIBRARY π
DNS Resolver library (libgetdns, -lgetdns) π«Ά
β¨ SYNOPSIS β¨
#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)
π DESCRIPTION π
So here's the tea β: stuff about your context can change behind your back β think system files that affect the context like /etc/resolv.conf etc. β and when that happens, getdns calls the callback function you passed in as cbfun. That's it. That's the whole vibe. You get notified, no cap. π₯
contextβ a previously initialized context. Like, you gotta have made it already, bestie, we're not conjuring it out of thin air π§cbfunβ the callback function that gets invoked when the specified context changes. And if this argument isNULL, then updates to the context will not invoke a callback. So passingNULLis the "do not disturb" mode of this whole situation. π
β RETURN VALUES β
When everything goes right, each of these functions returns GETDNS_RETURN_GOOD β slay, we love a clean return. π
Otherwise, these error values come back at you:
GETDNS_RETURN_GENERIC_ERRORβ memory allocation failed, or some other untoward thing happened π like genuinely not the momentGETDNS_RETURN_BAD_CONTEXTβ if the context pointer is invalid π that pointer is not giving what it's supposed to give
π¦ EXAMPLES π¦
TBD β yes bestie, the examples are literally "to be determined". The authors left us on read. π
π SEE ALSO π
libgetdns(3)getdns_context_create(3)getdns_context_set(3)getdns_context_set_context_update_callback(3)
and that's the whole page, periodt. π This little love letter came to you from getdns 1.7.3, dated December 2 β shoutout to the getdns girlies for keeping the docs cute. π mwah, go initialize your context responsibly. πβ¨
π¦ where this page comes from
- alpine 3.24: getdns-doc 1.7.3-r0 Β· BSD-3-Clause
- arch rolling: getdns 1.7.3-2 Β· BSD
- epel 10: getdns-devel 1.7.3-9.el10_2 Β· BSD-3-Clause
- epel 9: getdns-devel 1.7.3-1.el9 Β· BSD-3-Clause
- fedora 43: getdns-devel 1.7.3-9.fc43 Β· BSD-3-Clause
- fedora 43: getdns-devel 1.7.3-9.fc43 Β· BSD-3-Clause
- fedora 44: getdns-devel 1.7.3-10.fc44 Β· BSD-3-Clause
- fedora 44: getdns-devel 1.7.3-10.fc44 Β· BSD-3-Clause
- nixpkgs unstable: getdns 1.7.3
- ubuntu resolute: libgetdns-dev 1.7.3-3 Β· BSD-3-Clause
- ubuntu stonking: libgetdns-dev 1.7.3-5build1 Β· BSD-3-Clause
- Copyright (c) 2013, NLnet Labs, Verisign, Inc
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms