val_res_query(3)
π val_res_query(3) β Programmer's Manual energy, but make it make sense π
okay bestie, sit down, grab a strawberry π β this is val_res_query(3) from the Programmer's Manual, and it's genuinely one of the good ones. no cap.
β¨ NAME β¨
val_res_query(), val_res_search() β DNSSEC-validated resolution of DNS queries π‘οΈ
πΈ SYNOPSIS πΈ
#include <validator/validator.h>
int val_res_query(const val_context_t *ctx,
const char *dname,
int class,
int type,
unsigned char *answer,
int anslen,
val_status_t *val_status);
int val_res_search(val_context_t * ctx,
const char *dname,
int class_h,
int type,
unsigned char * answer,
int anslen,
val_status_t * val_status);
like look at her. iconic. π
π¦ DESCRIPTION π¦
So. The way that val_res_query() works is that it performs DNSSEC validation of DNS queries. It's the DNSSEC-aware glow-up of the legacy res_query(3) function β same vibe, but it actually checks the receipts. π₯
And val_res_search()? She performs an operation similar to val_res_query(). In addition, she uses the search paths specified within the /etc/resolv.conf file to create the fully qualified domain name. val_res_search() is the DNSSEC-aware substitute for the res_search(3) function. bestie duo fr fr. π«Ά
The ctx parameter is the validator context, and honestly? you can set it to NULL for default settings, she doesn't mind. More info about this field can be found in libval(3). β¨
The dname parameter specifies the domain name, class specifies the DNS class, and type specifies the DNS type. that's it, that's the trio. π
The validation status values for val_res_query() and val_res_search() functions are returned in their respective val_status fields. And because we love a support system:
p_val_status()returns a brief string description of the error code. π¬val_istrusted()determines if the status code indicates that the response can be trusted. π«‘val_isvalidated()determines if the status code indicates that the response was validated. β
(like, see libval(3) for further information β she has the lore.)
β RETURN VALUES β
val_res_query() and val_res_search() return the number of bytes received on success and -1 on failure.
so if you see -1, that's not a vibe, that's an error. no cap. π
π COPYRIGHT π
Copyright 2004-2013 SPARTA, Inc. All rights reserved. See the COPYING file included with the DNSSEC-Tools package for details. π
π AUTHORS π
Abhijit Hayatnagarkar, Suresh Krishnaswamy, Robert Story.
the literal founding mothers/fathers of this whole situation. respect. π«Ά
π SEE ALSO π
res_query(3)get_context(3),val_getaddrinfo(3),val_gethostbyname(3)libval(3)http://www.dnssec-tools.org
and that's the whole page, bestie. this manual page was living its perl v5.12.4 era and got dated 2013-03-08 β so if you're reading this, just know she's been serving DNSSEC knowledge since way back and she ate, periodt. πβ¨
π¦ where this page comes from
- arch rolling: dnssec-tools 2.2.3-16 Β· BSD
- fedora 43: dnssec-tools-libs-devel 2.2.3-30.fc43 Β· LicenseRef-Callaway-BSD
- fedora 43: dnssec-tools-libs-devel 2.2.3-30.fc43 Β· LicenseRef-Callaway-BSD
- fedora 44: dnssec-tools-libs-devel 2.2.3-32.fc44 Β· LicenseRef-Callaway-BSD
- fedora 44: dnssec-tools-libs-devel 2.2.3-32.fc44 Β· LicenseRef-Callaway-BSD
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms