getdns_dict_set(3)
β¨ getdns_dict_set(3) β the glow-up edition β¨
okay bestie, welcome to getdns_dict_set(3) π
this is the manual page for a whole little family of functions in the getdns library, and they all do basically the same iconic thing: they set a value by name in a getdns dict. periodt.
π NAME π
getdns_dict_set, getdns_dict_set_bindata, getdns_dict_set_dict, getdns_dict_set_int, getdns_dict_set_list β set a value by name in a getdns dict. that's the whole assignment, and they ate π
π LIBRARY π
DNS Resolver library (libgetdns, -lgetdns) π¦
so like, link with -lgetdns and you're in. no cap.
β¨ SYNOPSIS β¨
#include <getdns.h>
getdns_return_t
getdns_dict_set_bindata (getdns_dict *this_dict,
char *name,
getdns_bindata *child_bindata)
getdns_return_t
getdns_dict_set_dict (getdns_dict *this_dict,
char *name,
getdns_dict *child_dict)
getdns_return_t
getdns_dict_set_int (getdns_dict *this_dict,
char *name,
uint32_t child_uint32_t)
getdns_return_t
getdns_dict_set_list (getdns_dict *this_dict,
char *name,
getdns_list *child_list)
literally four functions, one job, zero drama πΈ and yes you #include <getdns.h> first, always, that's the vibe check.
π DESCRIPTION π
the getdns_dict type is used to manage name/value pairs in which the names are strings and the data types of the values are heterogeneous and include:
getdns_bindatagetdns_dictgetdns_listuint32_t
so yeah, the values are a whole mixed bag β it's giving "no two entries are the same type and that's the point" π
this_dictβ the dictionary in which to add/update the name/value pair. it's the main character here, the dict you're editing. πnameβ the name whose associated value is to be set. and listen, this part matters: if the name exists in the dictionary, the value associated with that name is replaced. if the name does not exist in the dictionary, a new item is added to the dictionary. so it's set-or-insert, two moods, one call πchild_bindata,child_dict,child_list,child_uint32β value to assign the name. pick whichever one matches the type you're setting, obvi. π«Ά
ngl the four functions are basically the same function wearing four different outfits β one per value type. slay.
π₯ RETURN VALUES π₯
upon successful completion the functions return GETDNS_RETURN_GOOD β¨
otherwise, the following error values are returned:
GETDNS_RETURN_GENERIC_ERRORβ ifthis_dictis not a valid dictionary π like, if you handed it something that isn't actually a dict, that's the error you get back. check your dict, bestie.
πΈ EXAMPLES πΈ
TBD π (yes, the manpage really says TBD. iconic of it, honestly. we're all waiting.)
π SEE ALSO π
libgetdns(3)getdns_address(3)getdns_dict(3)getdns_dict_get(3)getdns_general(3)getdns_hostname(3)getdns_service(3)
go read those too, the whole friend group is worth your time π
and that's the page, bestie π this was getdns 1.7.3, dated December 2015 β yeah it's a vintage era of the lib but she still serves. mwah, go set some dict values, iykyk πβ¨π¦
π¦ 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