diff options
author | sthen <sthen@openbsd.org> | 2013-11-26 12:50:10 +0000 |
---|---|---|
committer | sthen <sthen@openbsd.org> | 2013-11-26 12:50:10 +0000 |
commit | d3fecca9f63d975339880ea9da999a59fc9dbfdc (patch) | |
tree | 77f0767482483e7b94040f328076abf2e3d85323 /usr.sbin/nsd/dname.h | |
parent | - put -Q in the right place (diff) | |
download | wireguard-openbsd-d3fecca9f63d975339880ea9da999a59fc9dbfdc.tar.xz wireguard-openbsd-d3fecca9f63d975339880ea9da999a59fc9dbfdc.zip |
import NSD 4.0.0, tests from Dorian Büttner, Patrik Lundin, requested by brad@
Diffstat (limited to 'usr.sbin/nsd/dname.h')
-rw-r--r-- | usr.sbin/nsd/dname.h | 35 |
1 files changed, 9 insertions, 26 deletions
diff --git a/usr.sbin/nsd/dname.h b/usr.sbin/nsd/dname.h index fccc3ee2967..a9aa15ad177 100644 --- a/usr.sbin/nsd/dname.h +++ b/usr.sbin/nsd/dname.h @@ -1,7 +1,7 @@ /* * dname.h -- Domain name handling. * - * Copyright (c) 2001-2011, NLnet Labs. All rights reserved. + * Copyright (c) 2001-2006, NLnet Labs. All rights reserved. * * See LICENSE for the license. * @@ -179,9 +179,9 @@ dname_label(const dname_type *dname, uint8_t label) * Return < 0 if LEFT < RIGHT, 0 if LEFT == RIGHT, and > 0 if LEFT > * RIGHT. The comparison is case sensitive. * - * Pre: vleft != NULL && vright != NULL + * Pre: left != NULL && right != NULL */ -int dname_compare(const void *vleft, const void *right); +int dname_compare(const dname_type *left, const dname_type *right); /* @@ -346,21 +346,6 @@ label_next(const uint8_t *label) const char *dname_to_string(const dname_type *dname, const dname_type *origin); -/* - * Convert DNAME to its string representation. This is a reentrant - * version of dname_to_string. The buf argument is a pointer to a - * user defined result buffer capable of holding the string representation - * of a DNAME. Due to escape sequences and such, this buffer is recommeneded - * to be at least 5 * MAXDOMAINLEN in size. - * - * If ORIGIN is provided and DNAME is a subdomain of ORIGIN the dname - * will be represented relative to ORIGIN. - * - * Pre: dname != NULL - */ -const char *dname_to_string_r(const dname_type *dname, - const dname_type *origin, - char *buf); /* * Create a dname containing the single label specified by STR @@ -389,13 +374,11 @@ const dname_type *dname_replace(region_type* region, const dname_type* src, const dname_type* dest); -#ifndef FULL_PREHASH -/** - * Create a dname representing the wildcard form of the passed dname. - */ -int dname_make_wildcard(struct region *region, - struct dname const *dname, - struct dname const **wildcard); -#endif +/** Convert uncompressed wireformat dname to a string */ +char* wiredname2str(const uint8_t* dname); +/** convert uncompressed label to string */ +char* wirelabel2str(const uint8_t* label); +/** check if two uncompressed dnames of the same total length are equal */ +int dname_equal_nocase(uint8_t* a, uint8_t* b, uint16_t len); #endif /* _DNAME_H_ */ |