val_get_rrset(3)
π val_get_rrset β get DNSSEC-validated resource record info π
okay bestie, welcome to the val_get_rrset(3) page from the Programmer's Manual π«Ά this one's your girl for pulling DNSSEC-validated RRset data, no cap.
β¨ SYNOPSIS β¨
#include <validator/validator.h>
struct val_answer_chain {
val_status_t val_ans_status;
char *val_ans_name;
int val_ans_class;
int val_ans_type;
struct rr_rec *val_ans;
struct val_answer_chain *val_ans_next;
};
struct rr_rec {
size_t rr_length;
unsigned char *rr_data;
struct rr_rec *rr_next;
};
int val_get_rrset(val_context_t *ctx,
const char *name,
int class,
int type,
unsigned int flags,
struct val_answer_chain **answers);
void val_free_answer_chain(struct val_answer_chain *answers);
like. look at those structs. they're giving linked-list main character energy π₯
πΈ DESCRIPTION πΈ
so val_get_rrset() does the DNSSEC validation for whatever DNS name, class and type you throw at it. it hands you back the DNSSEC validation status for the resource record set β but not the authentication chain details, bestie, it's literally not about that. if you do need the auth chain details, you have to use val_resolve_and_check() instead. that's just the rules π
val_get_rrset() drops its results into the val_answer_chain structure. and listen β the memory for that structure is allocated by val_get_rrset itself, so you have to free it after you're done, using the val_free_answer_chain() function. no forgetting, no leaking, we don't do that here π
the RRsets in the response come back inside the val_answer_chain structure. the val_ans_name member holds the DNS name of the actual resource record set that got returned. and plot twist: that value may differ from whatever you passed as the name argument to val_get_rrset() β that happens when the resource record came back after following a CNAME or DNAME alias π
val_ans_name and val_ans_type contain the actual class and type for the returned resource record. again, these values may differ from the values you passed as arguments to val_get_rrset() if the query type or class has the value 255 (ANY) π
the resource record set itself comes back in val_ans as a linked list of rr_length and rr_data tuples, one for the data returned in each resource record of the resource record set. oh and val_ans may be NULL if the name is non-existant. yes, exactly like that, non-existant, that's the vibe π
val_ans_status gives you the combined validation status value for the given RRset. you can use val_istrusted() and val_isvalidated() to figure out the trustworthiness of the data, and p_val_status() to show the status value to the user in ASCII format (peep libval(3) for more info on that) β
the ctx parameter is the validation context, and you can set it to NULL for default values β see libval(3) and dnsval.conf for the whole tea on validation contexts and validation policy π
π RETURN VALUES π
val_get_rrset() returns 0 on success, and one of the error codes defined in libval(3) on failure. periodt.
π COPYRIGHT π
Copyright 2004-2013 SPARTA, Inc. All rights reserved. See the COPYING file included with the DNSSEC-Tools package for details.
π¦ AUTHORS π¦
Suresh Krishnaswamy
π SEE ALSO π
and that's the whole page bestie, you ate it π β¨
this was val_get_rrset(3), from perl v5.12.4, dated 2013-03-08 πΈ go validate some records, ily π«Ά
π¦ 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