1ldns(3) Library Functions Manual ldns(3)
2
3
4
6 ldns_pkt_id, ldns_pkt_qr, ldns_pkt_aa, ldns_pkt_tc, ldns_pkt_rd,
7 ldns_pkt_cd, ldns_pkt_ra, ldns_pkt_ad, ldns_pkt_get_opcode,
8 ldns_pkt_get_rcode, ldns_pkt_qdcount, ldns_pkt_ancount,
9 ldns_pkt_nscount, ldns_pkt_arcount, ldns_pkt_answerfrom,
10 ldns_pkt_querytime, ldns_pkt_size, ldns_pkt_tsig, ldns_pkt_question,
11 ldns_pkt_answer, ldns_pkt_authority, ldns_pkt_additional,
12 ldns_pkt_get_section_clone, ldns_pkt_rr_list_by_name,
13 ldns_pkt_rr_list_by_type, ldns_pkt_rr_list_by_name_and_type - get
14 ldns_pkt attributes
15
16
18 #include <stdint.h>
19 #include <stdbool.h>
20
21 #include <ldns/ldns.h>
22
23 ldns_pkt_id();
24
25 bool ldns_pkt_qr(const ldns_pkt *p);
26
27 bool ldns_pkt_aa(const ldns_pkt *p);
28
29 bool ldns_pkt_tc(const ldns_pkt *p);
30
31 bool ldns_pkt_rd(const ldns_pkt *p);
32
33 bool ldns_pkt_cd(const ldns_pkt *p);
34
35 bool ldns_pkt_ra(const ldns_pkt *p);
36
37 bool ldns_pkt_ad(const ldns_pkt *p);
38
39 ldns_pkt_opcode ldns_pkt_get_opcode(const ldns_pkt *p);
40
41 ldns_pkt_rcode ldns_pkt_get_rcode(const ldns_pkt *p);
42
43 uint16_t ldns_pkt_qdcount(const ldns_pkt *p);
44
45 uint16_t ldns_pkt_ancount(const ldns_pkt *p);
46
47 uint16_t ldns_pkt_nscount(const ldns_pkt *p);
48
49 uint16_t ldns_pkt_arcount(const ldns_pkt *p);
50
51 ldns_rdf* ldns_pkt_answerfrom(const ldns_pkt *p);
52
53 uint32_t ldns_pkt_querytime(const ldns_pkt *p);
54
55 size_t ldns_pkt_size(const ldns_pkt *p);
56
57 ldns_rr* ldns_pkt_tsig(const ldns_pkt *p);
58
59 ldns_rr_list* ldns_pkt_question(const ldns_pkt *p);
60
61 ldns_rr_list* ldns_pkt_answer(const ldns_pkt *p);
62
63 ldns_rr_list* ldns_pkt_authority(const ldns_pkt *p);
64
65 ldns_rr_list* ldns_pkt_additional(const ldns_pkt *p);
66
67 ldns_rr_list* ldns_pkt_get_section_clone(const ldns_pkt *p,
68 ldns_pkt_section s);
69
70 ldns_rr_list* ldns_pkt_rr_list_by_name(const ldns_pkt *p, const
71 ldns_rdf *r, ldns_pkt_section s);
72
73 ldns_rr_list* ldns_pkt_rr_list_by_type(const ldns_pkt *p, ldns_rr_type
74 t, ldns_pkt_section s);
75
76 ldns_rr_list* ldns_pkt_rr_list_by_name_and_type(const ldns_pkt *packet,
77 const ldns_rdf *ownername, ldns_rr_type type, ldns_pkt_section sec);
78
80 ldns_pkt_id()
81
82 ldns_pkt_qr() Read the packet's qr bit
83 p: the packet
84 Returns value of the bit
85
86 ldns_pkt_aa() Read the packet's aa bit
87 p: the packet
88 Returns value of the bit
89
90 ldns_pkt_tc() Read the packet's tc bit
91 p: the packet
92 Returns value of the bit
93
94 ldns_pkt_rd() Read the packet's rd bit
95 p: the packet
96 Returns value of the bit
97
98 ldns_pkt_cd() Read the packet's cd bit
99 p: the packet
100 Returns value of the bit
101
102 ldns_pkt_ra() Read the packet's ra bit
103 p: the packet
104 Returns value of the bit
105
106 ldns_pkt_ad() Read the packet's ad bit
107 p: the packet
108 Returns value of the bit
109
110 ldns_pkt_get_opcode() Read the packet's code
111 p: the packet
112 Returns the opcode
113
114 ldns_pkt_get_rcode() Return the packet's response code
115 p: the packet
116 Returns the response code
117
118 ldns_pkt_qdcount() Return the packet's qd count
119 p: the packet
120 Returns the qd count
121
122 ldns_pkt_ancount() Return the packet's an count
123 p: the packet
124 Returns the an count
125
126 ldns_pkt_nscount() Return the packet's ns count
127 p: the packet
128 Returns the ns count
129
130 ldns_pkt_arcount() Return the packet's ar count
131 p: the packet
132 Returns the ar count
133
134 ldns_pkt_answerfrom() Return the packet's answerfrom
135 p: packet
136 Returns the name of the server
137
138 ldns_pkt_querytime() Return the packet's querytime
139 p: the packet
140 Returns the querytime
141
142 ldns_pkt_size() Return the packet's size in bytes
143 p: the packet
144 Returns the size
145
146 ldns_pkt_tsig() Return the packet's tsig pseudo rr's
147 p: the packet
148 Returns the tsig rr
149
150 ldns_pkt_question() Return the packet's question section
151 p: the packet
152 Returns the section
153
154 ldns_pkt_answer() Return the packet's answer section
155 p: the packet
156 Returns the section
157
158 ldns_pkt_authority() Return the packet's authority section
159 p: the packet
160 Returns the section
161
162 ldns_pkt_additional() Return the packet's additional section
163 p: the packet
164 Returns the section
165
166 ldns_pkt_get_section_clone() return all the rr_list's in the packet.
167 Clone the lists, instead of returning pointers.
168 p: the packet to look in
169 s: what section(s) to return
170 Returns ldns_rr_list with the rr's or NULL if none were found
171
172 ldns_pkt_rr_list_by_name() return all the rr with a specific name from
173 a packet. Optionally specify from which section in the packet
174 p: the packet
175 r: the name
176 s: the packet's section
177 Returns a list with the rr's or NULL if none were found
178
179 ldns_pkt_rr_list_by_type() return all the rr with a specific type from
180 a packet. Optionally specify from which section in the packet
181 p: the packet
182 t: the type
183 s: the packet's section
184 Returns a list with the rr's or NULL if none were found
185
186 ldns_pkt_rr_list_by_name_and_type() return all the rr with a specific
187 type and type from a packet. Optionally specify from which sec‐
188 tion in the packet
189 packet: the packet
190 ownername: the name
191 type: the type
192 sec: the packet's section
193 Returns a list with the rr's or NULL if none were found
194
196 The ldns team at NLnet Labs.
197
198
200 Please report bugs to ldns-team@nlnetlabs.nl or in our bugzilla at
201 http://www.nlnetlabs.nl/bugs/index.html
202
203
205 Copyright (c) 2004 - 2006 NLnet Labs.
206
207 Licensed under the BSD License. There is NO warranty; not even for MER‐
208 CHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
209
210
212 ldns_pkt. And perldoc Net::DNS, RFC1034, RFC1035, RFC4033, RFC4034
213 and RFC4035.
214
216 This manpage was automatically generated from the ldns source code.
217
218
219
220 30 May 2006 ldns(3)