1ldns(3)                    Library Functions Manual                    ldns(3)
2
3
4

NAME

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
14
15

SYNOPSIS

17       #include <stdint.h>
18       #include <stdbool.h>
19
20       #include <ldns/ldns.h>
21
22        ldns_pkt_id();
23
24       bool ldns_pkt_qr(const ldns_pkt *p);
25
26       bool ldns_pkt_aa(const ldns_pkt *p);
27
28       bool ldns_pkt_tc(const ldns_pkt *p);
29
30       bool ldns_pkt_rd(const ldns_pkt *p);
31
32       bool ldns_pkt_cd(const ldns_pkt *p);
33
34       bool ldns_pkt_ra(const ldns_pkt *p);
35
36       bool ldns_pkt_ad(const ldns_pkt *p);
37
38       ldns_pkt_opcode ldns_pkt_get_opcode(const ldns_pkt *p);
39
40       ldns_pkt_rcode ldns_pkt_get_rcode(const ldns_pkt *p);
41
42       uint16_t ldns_pkt_qdcount(const ldns_pkt *p);
43
44       uint16_t ldns_pkt_ancount(const ldns_pkt *p);
45
46       uint16_t ldns_pkt_nscount(const ldns_pkt *p);
47
48       uint16_t ldns_pkt_arcount(const ldns_pkt *p);
49
50       ldns_rdf* ldns_pkt_answerfrom(const ldns_pkt *p);
51
52       uint32_t ldns_pkt_querytime(const ldns_pkt *p);
53
54       size_t ldns_pkt_size(const ldns_pkt *p);
55
56       ldns_rr* ldns_pkt_tsig(const ldns_pkt *p);
57
58       ldns_rr_list* ldns_pkt_question(const ldns_pkt *p);
59
60       ldns_rr_list* ldns_pkt_answer(const ldns_pkt *p);
61
62       ldns_rr_list* ldns_pkt_authority(const ldns_pkt *p);
63
64       ldns_rr_list* ldns_pkt_additional(const ldns_pkt *p);
65
66       ldns_rr_list*     ldns_pkt_get_section_clone(const     ldns_pkt     *p,
67       ldns_pkt_section s);
68
69       ldns_rr_list*   ldns_pkt_rr_list_by_name(ldns_pkt   *p,   ldns_rdf  *r,
70       ldns_pkt_section s);
71
72       ldns_rr_list* ldns_pkt_rr_list_by_type(const ldns_pkt *p,  ldns_rr_type
73       t, ldns_pkt_section s);
74
75       ldns_rr_list* ldns_pkt_rr_list_by_name_and_type(const ldns_pkt *packet,
76       const ldns_rdf *ownername, ldns_rr_type type, ldns_pkt_section sec);
77

DESCRIPTION

79       ldns_pkt_id()
80
81       ldns_pkt_qr() Read the packet's qr bit
82              p: the packet
83              Returns value of the bit
84
85       ldns_pkt_aa() Read the packet's aa bit
86              p: the packet
87              Returns value of the bit
88
89       ldns_pkt_tc() Read the packet's tc bit
90              p: the packet
91              Returns value of the bit
92
93       ldns_pkt_rd() Read the packet's rd bit
94              p: the packet
95              Returns value of the bit
96
97       ldns_pkt_cd() Read the packet's cd bit
98              p: the packet
99              Returns value of the bit
100
101       ldns_pkt_ra() Read the packet's ra bit
102              p: the packet
103              Returns value of the bit
104
105       ldns_pkt_ad() Read the packet's ad bit
106              p: the packet
107              Returns value of the bit
108
109       ldns_pkt_get_opcode() Read the packet's code
110              p: the packet
111              Returns the opcode
112
113       ldns_pkt_get_rcode() Return the packet's respons code
114              p: the packet
115              Returns the respons code
116
117       ldns_pkt_qdcount() Return the packet's qd count
118              p: the packet
119              Returns the qd count
120
121       ldns_pkt_ancount() Return the packet's an count
122              p: the packet
123              Returns the an count
124
125       ldns_pkt_nscount() Return the packet's ns count
126              p: the packet
127              Returns the ns count
128
129       ldns_pkt_arcount() Return the packet's ar count
130              p: the packet
131              Returns the ar count
132
133       ldns_pkt_answerfrom() Return the packet's answerfrom
134              p: packet
135              Returns the name of the server
136
137       ldns_pkt_querytime() Return the packet's querytime
138              p: the packet
139              Returns the querytime
140
141       ldns_pkt_size() Return the packet's size in bytes
142              p: the packet
143              Returns the size
144
145       ldns_pkt_tsig() Return the packet's tsig pseudo rr's
146              p: the packet
147              Returns the tsig rr
148
149       ldns_pkt_question() Return the packet's question section
150              p: the packet
151              Returns the section
152
153       ldns_pkt_answer() Return the packet's answer section
154              p: the packet
155              Returns the section
156
157       ldns_pkt_authority() Return the packet's authority section
158              p: the packet
159              Returns the section
160
161       ldns_pkt_additional() Return the packet's additional section
162              p: the packet
163              Returns the section
164
165       ldns_pkt_get_section_clone() return all the rr_list's  in  the  packet.
166              Clone the lists, instead of returning pointers.
167              p: the packet to look in
168              s: what section(s) to return
169              Returns ldns_rr_list with the rr's or NULL if none were found
170
171       ldns_pkt_rr_list_by_name()  return all the rr with a specific name from
172              a packet. Optionally specify from which section in the packet
173              p: the packet
174              r: the name
175              s: the packet's section
176              Returns a list with the rr's or NULL if none were found
177
178       ldns_pkt_rr_list_by_type() return all the rr with a specific type  from
179              a packet. Optionally specify from which section in the packet
180              p: the packet
181              t: the type
182              s: the packet's section
183              Returns a list with the rr's or NULL if none were found
184
185       ldns_pkt_rr_list_by_name_and_type()  return  all the rr with a specific
186              type and type from a packet. Optionally specify from which  sec‐
187              tion in the packet
188              packet: the packet
189              ownername: the name
190              type: the type
191              sec: the packet's section
192              Returns a list with the rr's or NULL if none were found
193

AUTHOR

195       The  ldns  team  at  NLnet Labs. Which consists out of Jelte Jansen and
196       Miek Gieben.
197
198

REPORTING BUGS

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

SEE ALSO

212       ldns_pkt .  And perldoc Net::DNS, RFC1034,  RFC1035,  RFC4033,  RFC4034
213       and RFC4035.
214

REMARKS

216       This manpage was automaticly generated from the ldns source code by use
217       of Doxygen and some perl.
218
219
220
221                                  30 May 2006                          ldns(3)
Impressum