1val_get_rrset(3) Programmer's Manual val_get_rrset(3)
2
3
4
6 val_get_rrset() - get DNSSEC-validated resource record information
7
9 #include <validator/validator.h>
10
11 struct val_answer_chain {
12 val_status_t val_ans_status;
13 char *val_ans_name;
14 int val_ans_class;
15 int val_ans_type;
16 struct rr_rec *val_ans;
17 struct val_answer_chain *val_ans_next;
18 };
19
20 struct rr_rec {
21 size_t rr_length;
22 unsigned char *rr_data;
23 struct rr_rec *rr_next;
24 };
25
26 int val_get_rrset(val_context_t *ctx,
27 const char *name,
28 int class,
29 int type,
30 unsigned int flags,
31 struct val_answer_chain **answers);
32
33 void val_free_answer_chain(struct val_answer_chain *answers);
34
36 val_get_rrset() performs DNSSEC validation for the given DNS name,
37 class and type. It returns the DNSSEC validation status for the
38 resource record set, but does not return any authentication chain
39 details. If the authentication chain details are required, the
40 val_resolve_and_check() function must be used instead.
41
42 val_get_rrset() returns its results in the val_answer_chain structure.
43 The memory for this structure is allocated by val_get_rrset; the user
44 must release this memory after use using the val_free_answer_chain()
45 function.
46
47 The RRsets in the response are returned in the val_answer_chain
48 structure. The val_ans_name member contains the DNS name of the actual
49 resource record set returned. This value may differ from the value
50 passed as the name argument to val_get_rrset() if the resource record
51 was returned after following a CNAME or DNAME alias. val_ans_name and
52 val_ans_type contains the actual class and type for the returned
53 resource record. These values may differ from the values passed as
54 arguments to val_get_rrset() if the query type or class has the value
55 255 (ANY). The resource record set is returned in val_ansas a linked
56 list of rr_length and rr_data tuples, for data returned in each
57 resource record of the resource record set. val_ans may be NULL if the
58 name is non-existant.
59
60 val_ans_status gives the combined validation status value for the the
61 given RRset. val_istrusted() and val_isvalidated() can be used to
62 determine the trustworthiness of data and p_val_status() can be used to
63 display the status value to the user in ASCII format (See libval(3)
64 more for information).
65
66 The ctx parameter specifies the validation context, which can be set to
67 NULL for default values (see libval(3) and dnsval.conf for more details
68 on validation contexts and validation policy).
69
71 The val_get_rrset() function returns 0 on success and one of the error
72 codes defined in libval(3) on failure.
73
75 Copyright 2004-2013 SPARTA, Inc. All rights reserved. See the COPYING
76 file included with the DNSSEC-Tools package for details.
77
79 Suresh Krishnaswamy
80
82 val_getaddrinfo(3)
83
84 val_gethostbyname(3), val_res_query(3)
85
86 libval(3)
87
88 http://www.dnssec-tools.org
89
90
91
92perl v5.12.4 2013-03-08 val_get_rrset(3)