Go to the source code of this file.
Defines | |
#define | LDNS_DNAME_NORMALIZE tolower |
Functions | |
ldns_rdf * | ldns_dname_cat_clone (ldns_rdf *rd1, ldns_rdf *rd2) |
concatenate two dnames together | |
ldns_status | ldns_dname_cat (ldns_rdf *rd1, ldns_rdf *rd2) |
concatenates rd2 after rd1 (rd2 is copied, rd1 is modified) | |
ldns_rdf * | ldns_dname_left_chop (ldns_rdf *d) |
chop one label off a dname. | |
uint8_t | ldns_dname_label_count (const ldns_rdf *r) |
count the number of labels inside a LDNS_RDF_DNAME type rdf. | |
ldns_rdf * | ldns_dname_new_frm_str (const char *str) |
Create a new dname rdf. | |
ldns_rdf * | ldns_dname_new (uint16_t s, void *data) |
Create a new dname rdf from a string. | |
ldns_rdf * | ldns_dname_new_frm_data (uint16_t size, const void *data) |
Create a new dname rdf from data (the data is copied). | |
void | ldns_dname2canonical (const ldns_rdf *rdf) |
Put a dname into canonical fmt - ie. | |
bool | ldns_dname_is_subdomain (const ldns_rdf *sub, const ldns_rdf *parent) |
test wether the name sub falls under parent (i.e. | |
bool | ldns_dname_str_absolute (const char *dname_str) |
Checks whether the given dname string is absolute (i.e. | |
ldns_rdf * | ldns_dname_label (const ldns_rdf *rdf, uint8_t labelpos) |
look inside the rdf and if it is an LDNS_RDF_TYPE_DNAME try and retrieve a specific label. |
void ldns_dname2canonical | ( | const ldns_rdf * | rdf | ) |
Put a dname into canonical fmt - ie.
lowercase it
[in] | rdf | the dname to lowercase |
ldns_status ldns_dname_cat | ( | ldns_rdf * | rd1, | |
ldns_rdf * | rd2 | |||
) |
concatenates rd2 after rd1 (rd2 is copied, rd1 is modified)
[in] | rd1 | the leftside |
[in] | rd2 | the rightside |
concatenate two dnames together
[in] | rd1 | the leftside |
[in] | rd2 | the rightside |
test wether the name sub falls under parent (i.e.
is a subdomain of parent.
[in] | sub | the name to test |
[in] | parent | the parent's name |
look inside the rdf and if it is an LDNS_RDF_TYPE_DNAME try and retrieve a specific label.
The labels are numbered starting from 0 (left most).
[in] | rdf | the rdf to look in |
[in] | labelpos | return the label with this number |
uint8_t ldns_dname_label_count | ( | const ldns_rdf * | r | ) |
count the number of labels inside a LDNS_RDF_DNAME type rdf.
[in] | *r | the rdf |
chop one label off a dname.
so wwww.nlnetlabs.nl, becomes nlnetlabs.nl
[in] | d | the dname to chop |
ldns_rdf* ldns_dname_new | ( | uint16_t | s, | |
void * | data | |||
) |
Create a new dname rdf from a string.
[in] | s | the size of the new dname |
[in] | *data | pointer to the actual data |
ldns_rdf* ldns_dname_new_frm_data | ( | uint16_t | size, | |
const void * | data | |||
) |
Create a new dname rdf from data (the data is copied).
[in] | size | the size of the data |
[in] | *data | pointer to the actual data |
ldns_rdf* ldns_dname_new_frm_str | ( | const char * | str | ) |
Create a new dname rdf.
Copies pointers!
[in] | str | string to use |
bool ldns_dname_str_absolute | ( | const char * | dname_str | ) |
Checks whether the given dname string is absolute (i.e.
ends with a '.')
[in] | *dname_str | a string representing the dname |