dname.h
Go to the documentation of this file.00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00039 #ifndef LDNS_DNAME_H
00040 #define LDNS_DNAME_H
00041
00042 #include <ldns/common.h>
00043 #include <ldns/rdata.h>
00044
00045 #ifdef __cplusplus
00046 extern "C" {
00047 #endif
00048
00049 #define LDNS_DNAME_NORMALIZE tolower
00050
00057 ldns_rdf *ldns_dname_cat_clone(const ldns_rdf *rd1, const ldns_rdf *rd2);
00058
00065 ldns_status ldns_dname_cat(ldns_rdf *rd1, ldns_rdf *rd2);
00066
00073 ldns_rdf *ldns_dname_reverse(const ldns_rdf *d);
00074
00084 ldns_rdf *
00085 ldns_dname_clone_from(const ldns_rdf *d, uint16_t n);
00086
00094 ldns_rdf *ldns_dname_left_chop(const ldns_rdf *d);
00095
00101 uint8_t ldns_dname_label_count(const ldns_rdf *r);
00102
00108 ldns_rdf *ldns_dname_new_frm_str(const char *str);
00109
00117 ldns_rdf *ldns_dname_new(uint16_t s, void *data);
00118
00126 ldns_rdf *ldns_dname_new_frm_data(uint16_t size, const void *data);
00127
00133 void ldns_dname2canonical(const ldns_rdf *rdf);
00134
00143 bool ldns_dname_is_subdomain(const ldns_rdf *sub, const ldns_rdf *parent);
00144
00152 int ldns_dname_compare(const ldns_rdf *dname1, const ldns_rdf *dname2);
00153
00163 int ldns_dname_match_wildcard(const ldns_rdf *dname, const ldns_rdf *wildcard);
00164
00173 int ldns_dname_interval(const ldns_rdf *prev, const ldns_rdf *middle, const ldns_rdf *next);
00174
00180 bool ldns_dname_str_absolute(const char *dname_str);
00181
00187 bool ldns_dname_absolute(const ldns_rdf *dname);
00188
00197 ldns_rdf * ldns_dname_label(const ldns_rdf *rdf, uint8_t labelpos);
00198
00204 int ldns_dname_is_wildcard(const ldns_rdf* dname);
00205
00206 #ifdef __cplusplus
00207 }
00208 #endif
00209
00210 #endif