1ldns(3) Library Functions Manual ldns(3)
2
3
4
6 ldns_pkt_set_flags, ldns_pkt_set_id, ldns_pkt_set_qr, ldns_pkt_set_aa,
7 ldns_pkt_set_tc, ldns_pkt_set_rd, ldns_pkt_set_cd, ldns_pkt_set_ra,
8 ldns_pkt_set_ad, ldns_pkt_set_opcode, ldns_pkt_set_rcode,
9 ldns_pkt_set_qdcount, ldns_pkt_set_ancount, ldns_pkt_set_nscount,
10 ldns_pkt_set_arcount, ldns_pkt_set_answerfrom, ldns_pkt_set_querytime,
11 ldns_pkt_set_size, ldns_pkt_set_section_count, ldns_pkt_set_tsig - set
12 ldns_pkt attributes
13
14
16 #include <stdint.h>
17 #include <stdbool.h>
18
19 #include <ldns/ldns.h>
20
21 bool ldns_pkt_set_flags(ldns_pkt *pkt, uint16_t flags);
22
23 void ldns_pkt_set_id(ldns_pkt *p, uint16_t id);
24
25 void ldns_pkt_set_qr(ldns_pkt *p, bool b);
26
27 void ldns_pkt_set_aa(ldns_pkt *p, bool b);
28
29 void ldns_pkt_set_tc(ldns_pkt *p, bool b);
30
31 void ldns_pkt_set_rd(ldns_pkt *p, bool b);
32
33 void ldns_pkt_set_cd(ldns_pkt *p, bool b);
34
35 void ldns_pkt_set_ra(ldns_pkt *p, bool b);
36
37 void ldns_pkt_set_ad(ldns_pkt *p, bool b);
38
39 void ldns_pkt_set_opcode(ldns_pkt *p, ldns_pkt_opcode c);
40
41 void ldns_pkt_set_rcode(ldns_pkt *p, uint8_t c);
42
43 void ldns_pkt_set_qdcount(ldns_pkt *p, uint16_t c);
44
45 void ldns_pkt_set_ancount(ldns_pkt *p, uint16_t c);
46
47 void ldns_pkt_set_nscount(ldns_pkt *p, uint16_t c);
48
49 void ldns_pkt_set_arcount(ldns_pkt *p, uint16_t c);
50
51 void ldns_pkt_set_answerfrom(ldns_pkt *p, ldns_rdf *r);
52
53 void ldns_pkt_set_querytime(ldns_pkt *p, uint32_t t);
54
55 void ldns_pkt_set_size(ldns_pkt *p, size_t s);
56
57 void ldns_pkt_set_section_count(ldns_pkt *p, ldns_pkt_section s,
58 uint16_t x);
59
60 void ldns_pkt_set_tsig(ldns_pkt *p, ldns_rr *t);
61
63 ldns_pkt_set_flags() sets the flags in a packet.
64 pkt: the packet to operate on
65 flags: ORed values: LDNS_QR| LDNS_AR for instance
66 Returns true on success otherwise false
67
68 ldns_pkt_set_id() Set the packet's id
69 p: the packet
70 id: the id to set
71
72 ldns_pkt_set_qr() Set the packet's qr bit
73 p: the packet
74 b: the value to set (boolean)
75
76 ldns_pkt_set_aa() Set the packet's aa bit
77 p: the packet
78 b: the value to set (boolean)
79
80 ldns_pkt_set_tc() Set the packet's tc bit
81 p: the packet
82 b: the value to set (boolean)
83
84 ldns_pkt_set_rd() Set the packet's rd bit
85 p: the packet
86 b: the value to set (boolean)
87
88 ldns_pkt_set_cd() Set the packet's cd bit
89 p: the packet
90 b: the value to set (boolean)
91
92 ldns_pkt_set_ra() Set the packet's ra bit
93 p: the packet
94 b: the value to set (boolean)
95
96 ldns_pkt_set_ad() Set the packet's ad bit
97 p: the packet
98 b: the value to set (boolean)
99
100 ldns_pkt_set_opcode() Set the packet's opcode
101 p: the packet
102 c: the opcode
103
104 ldns_pkt_set_rcode() Set the packet's response code
105 p: the packet
106 c: the rcode
107
108 ldns_pkt_set_qdcount() Set the packet's qd count
109 p: the packet
110 c: the count
111
112 ldns_pkt_set_ancount() Set the packet's an count
113 p: the packet
114 c: the count
115
116 ldns_pkt_set_nscount() Set the packet's ns count
117 p: the packet
118 c: the count
119
120 ldns_pkt_set_arcount() Set the packet's arcount
121 p: the packet
122 c: the count
123
124 ldns_pkt_set_answerfrom() Set the packet's answering server
125 p: the packet
126 r: the address
127
128 ldns_pkt_set_querytime() Set the packet's query time
129 p: the packet
130 t: the querytime in msec
131
132 ldns_pkt_set_size() Set the packet's size
133 p: the packet
134 s: the size
135
136 ldns_pkt_set_section_count() Set a packet's section count to x
137 p: the packet
138 s: the section
139 x: the section count
140
141 ldns_pkt_set_tsig() Set the packet's tsig rr
142 p: the packet
143 t: the tsig rr
144
146 The ldns team at NLnet Labs.
147
148
150 Please report bugs to ldns-team@nlnetlabs.nl or in our bugzilla at
151 http://www.nlnetlabs.nl/bugs/index.html
152
153
155 Copyright (c) 2004 - 2006 NLnet Labs.
156
157 Licensed under the BSD License. There is NO warranty; not even for MER‐
158 CHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
159
160
162 ldns_pkt. And perldoc Net::DNS, RFC1034, RFC1035, RFC4033, RFC4034
163 and RFC4035.
164
166 This manpage was automatically generated from the ldns source code.
167
168
169
170 30 May 2006 ldns(3)