Lines Matching refs:dname

2  * util/data/dname.h - domain name routines
54 * Determine length of dname in buffer, no compression ptrs allowed,
55 * @param query: the ldns buffer, current position at start of dname.
56 * at end, position is at end of the dname.
57 * @return: 0 on parse failure, or length including ending 0 of dname.
62 * Determine if dname in memory is correct. no compression ptrs allowed.
63 * @param dname: where dname starts in memory.
64 * @param len: dname is not allowed to exceed this length (i.e. of allocation).
65 * @return length of dname if dname is ok, 0 on a parse error.
67 size_t dname_valid(uint8_t* dname, size_t len);
69 /** lowercase query dname */
70 void query_dname_tolower(uint8_t* dname);
73 * lowercase pkt dname (follows compression pointers)
76 * @param dname: start of dname in packet.
78 void pkt_dname_tolower(struct sldns_buffer* pkt, uint8_t* dname);
94 * @param d1: dname to compare
95 * @param d2: dname to compare
102 * Determine correct, compressed, dname present in packet.
106 * At exit the position is right after the (compressed) dname.
116 * @param d1: dname to compare
117 * @param d2: dname to compare
124 * Hash dname, label by label, lowercasing, into hashvalue.
126 * @param dname: dname to hash.
130 hashvalue_type dname_query_hash(uint8_t* dname, hashvalue_type h);
133 * Hash dname, label by label, lowercasing, into hashvalue.
136 * @param dname: dname to hash, pointer to the pkt buffer.
142 hashvalue_type dname_pkt_hash(struct sldns_buffer* pkt, uint8_t* dname,
146 * Copy over a valid dname and decompress it.
149 * @param dname: pointer into packet where dname starts.
151 void dname_pkt_copy(struct sldns_buffer* pkt, uint8_t* to, uint8_t* dname);
154 * Copy over a valid dname to a packet.
156 * @param dname: dname to copy.
159 int dname_buffer_write(struct sldns_buffer* pkt, uint8_t* dname);
162 * Count the number of labels in an uncompressed dname in memory.
163 * @param dname: pointer to uncompressed dname.
166 int dname_count_labels(uint8_t* dname);
169 * Count labels and dname length both, for uncompressed dname in memory.
170 * @param dname: pointer to uncompressed dname.
171 * @param size: length of dname, including root label.
174 int dname_count_size_labels(uint8_t* dname, size_t* size);
179 * @param d1: first dname. pointer to uncompressed wireformat.
180 * @param labs1: number of labels in first dname.
181 * @param d2: second dname. pointer to uncompressed wireformat.
182 * @param labs2: number of labels in second dname.
190 * @param label: dname label
200 * Check if dname contains label
201 * @param dname: dname
202 * @param dnamelen: length of dname
203 * @param label: label to be checked for presence in dname
204 * @return: 1 if dname has this label, 0 otherwise
206 int dname_has_label(uint8_t* dname, size_t dnamelen, uint8_t* label);
236 * Debug helper. Print wireformat dname to output.
239 * @param dname: pointer to (start of) dname.
241 void dname_print(FILE* out, struct sldns_buffer* pkt, uint8_t* dname);
244 * Debug helper. Print dname to given string buffer (string buffer must
248 * @param dname: uncompressed wireformat.
251 void dname_str(uint8_t* dname, char* str);
254 * Returns true if the uncompressed wireformat dname is the root "."
255 * @param dname: the dname to check
258 int dname_is_root(uint8_t* dname);
261 * Snip off first label from a dname, returning the parent zone.
262 * @param dname: from what to strip off. uncompressed wireformat.
266 void dname_remove_label(uint8_t** dname, size_t* len);
269 * Snip off first N labels from a dname, returning the parent zone.
270 * @param dname: from what to strip off. uncompressed wireformat.
276 void dname_remove_labels(uint8_t** dname, size_t* len, int n);
281 * @param dname: valid uncompressed wireformat.
284 int dname_signame_label_count(uint8_t* dname);
288 * @param dname: valid uncompressed wireformat.
291 int dname_is_wild(uint8_t* dname);
297 * @param d1: first dname. pointer to uncompressed wireformat.
298 * @param labs1: number of labels in first dname.
299 * @param d2: second dname. pointer to uncompressed wireformat.
300 * @param labs2: number of labels in second dname.
308 * Canonical dname compare. Takes care of counting labels.
311 * @param d1: first dname. pointer to uncompressed wireformat.
312 * @param d2: second dname. pointer to uncompressed wireformat.
319 * @param d1: first dname. pointer to uncompressed wireformat.
320 * @param d2: second dname. pointer to uncompressed wireformat.