Functions | |
getdns_return_t | getdns_rr_dict2wire (const getdns_dict *rr_dict, uint8_t **wire, size_t *wire_sz) |
getdns_return_t | getdns_rr_dict2wire_buf (const getdns_dict *rr_dict, uint8_t *wire, size_t *wire_sz) |
getdns_return_t | getdns_rr_dict2wire_scan (const getdns_dict *rr_dict, uint8_t **wire, int *wire_sz) |
getdns_return_t | getdns_wire2rr_dict (const uint8_t *wire, size_t wire_sz, getdns_dict **rr_dict) |
getdns_return_t | getdns_wire2rr_dict_buf (const uint8_t *wire, size_t *wire_sz, getdns_dict **rr_dict) |
getdns_return_t | getdns_wire2rr_dict_scan (const uint8_t **wire, size_t *wire_sz, getdns_dict **rr_dict) |
getdns_return_t | getdns_rr_dict2str (const getdns_dict *rr_dict, char **str) |
getdns_return_t | getdns_rr_dict2str_buf (const getdns_dict *rr_dict, char *str, size_t *str_len) |
getdns_return_t | getdns_rr_dict2str_scan (const getdns_dict *rr_dict, char **str, int *str_len) |
getdns_return_t | getdns_str2rr_dict (const char *str, getdns_dict **rr_dict, const char *origin, uint32_t default_ttl) |
getdns_return_t | getdns_fp2rr_list (FILE *in, getdns_list **rr_list, const char *origin, uint32_t default_ttl) |
getdns_return_t | getdns_msg_dict2wire (const getdns_dict *msg_dict, uint8_t **wire, size_t *wire_sz) |
getdns_return_t | getdns_msg_dict2wire_buf (const getdns_dict *msg_dict, uint8_t *wire, size_t *wire_sz) |
getdns_return_t | getdns_msg_dict2wire_scan (const getdns_dict *msg_dict, uint8_t **wire, int *wire_sz) |
getdns_return_t | getdns_wire2msg_dict (const uint8_t *wire, size_t wire_sz, getdns_dict **msg_dict) |
getdns_return_t | getdns_wire2msg_dict_buf (const uint8_t *wire, size_t *wire_sz, getdns_dict **msg_dict) |
getdns_return_t | getdns_wire2msg_dict_scan (const uint8_t **wire, size_t *wire_sz, getdns_dict **msg_dict) |
getdns_return_t | getdns_msg_dict2str (const getdns_dict *msg_dict, char **str) |
getdns_return_t | getdns_msg_dict2str_buf (const getdns_dict *msg_dict, char *str, size_t *str_len) |
getdns_return_t | getdns_msg_dict2str_scan (const getdns_dict *msg_dict, char **str, int *str_len) |
Detailed Description
Function Documentation
getdns_return_t getdns_rr_dict2wire | ( | const getdns_dict * | rr_dict, |
uint8_t ** | wire, | ||
size_t * | wire_sz | ||
) |
Convert rr_dict to wireformat representation of the resource record.
- Parameters
-
rr_dict The getdns dict representation of the resource record wire A newly allocated buffer which will contain the wireformat. wire_sz The size of the allocated buffer and the wireformat.
- Returns
- GETDNS_RETURN_GOOD on success or an error code on failure.
getdns_return_t getdns_rr_dict2wire_buf | ( | const getdns_dict * | rr_dict, |
uint8_t * | wire, | ||
size_t * | wire_sz | ||
) |
Convert rr_dict to wireformat representation of the resource record.
- Parameters
-
rr_dict The getdns dict representation of the resource record wire The buffer in which the wireformat will be written wire_sz On input the size of the wire buffer, On output the amount of wireformat needed for the wireformat representation of the resource record; even if it did not fit.
- Returns
- GETDNS_RETURN_GOOD on success or an error code on failure. GETDNS_RETURN_NEED_MORE_SPACE will be returned when the buffer was too small. wire_sz will be set to the needed buffer space then.
getdns_return_t getdns_rr_dict2wire_scan | ( | const getdns_dict * | rr_dict, |
uint8_t ** | wire, | ||
int * | wire_sz | ||
) |
Convert rr_dict to wireformat representation of the resource record.
- Parameters
-
rr_dict The getdns dict representation of the resource record wire A pointer to the buffer pointer in which the wireformat will be written. On output the buffer pointer will have moved along the buffer and point right after the just written RR. wire_sz On input the size of the wire buffer, On output the amount of wireformat needed for the wireformat will have been substracted from wire_sz.
- Returns
- GETDNS_RETURN_GOOD on success or an error code on failure. GETDNS_RETURN_NEED_MORE_SPACE will be returned when the buffer was too small. The function will pretend that it had written beyond the end of the buffer, and wire will point past the buffer and wire_sz will contain a negative value.
getdns_return_t getdns_wire2rr_dict | ( | const uint8_t * | wire, |
size_t | wire_sz, | ||
getdns_dict ** | rr_dict | ||
) |
Convert wireformat resource record in a getdns rr_dict representation.
- Parameters
-
wire Buffer containing the wireformat rr wire_sz Size of the wire buffer rr_dict The returned rr_dict
- Returns
- GETDNS_RETURN_GOOD on success or an error code on failure.
getdns_return_t getdns_wire2rr_dict_buf | ( | const uint8_t * | wire, |
size_t * | wire_sz, | ||
getdns_dict ** | rr_dict | ||
) |
Convert wireformat resource record in a getdns rr_dict representation.
- Parameters
-
wire Buffer containing the wireformat rr wire_sz On input the size of the wire buffer On output the length of the wireformat rr. rr_dict The returned rr_dict
- Returns
- GETDNS_RETURN_GOOD on success or an error code on failure.
getdns_return_t getdns_wire2rr_dict_scan | ( | const uint8_t ** | wire, |
size_t * | wire_sz, | ||
getdns_dict ** | rr_dict | ||
) |
Convert wireformat resource record in a getdns rr_dict representation.
- Parameters
-
wire A pointer to the pointer of the wireformat buffer. On return this pointer is moved to after first read in resource record. wire_sz On input the size of the wire buffer On output the size is decreased with the length of the wireformat resource record. rr_dict The returned rr_dict
- Returns
- GETDNS_RETURN_GOOD on success or an error code on failure.
getdns_return_t getdns_rr_dict2str | ( | const getdns_dict * | rr_dict, |
char ** | str | ||
) |
Convert rr_dict to the string representation of the resource record.
- Parameters
-
rr_dict The getdns dict representation of the resource record str A newly allocated string representation of the rr
- Returns
- GETDNS_RETURN_GOOD on success or an error code on failure.
getdns_return_t getdns_rr_dict2str_buf | ( | const getdns_dict * | rr_dict, |
char * | str, | ||
size_t * | str_len | ||
) |
Convert rr_dict to the string representation of the resource record.
- Parameters
-
rr_dict The getdns dict representation of the resource record str The buffer in which the string will be written str_len On input the size of the text buffer, On output the amount of characters needed to write the string representation of the rr. Even if it does not fit.
- Returns
- GETDNS_RETURN_GOOD on success or an error code on failure. GETDNS_RETURN_NEED_MORE_SPACE will be returned when the buffer was too small. str_len will be set to the needed buffer space then.
getdns_return_t getdns_rr_dict2str_scan | ( | const getdns_dict * | rr_dict, |
char ** | str, | ||
int * | str_len | ||
) |
Convert rr_dict to the string representation of the resource record.
- Parameters
-
rr_dict The getdns dict representation of the resource record str A pointer to the buffer pointer in which the string will be written. On output the buffer pointer will have moved along the buffer and point right after the just written RR. str_len On input the size of the str buffer, On output the number of characters needed for the string will have been substracted from strlen.
- Returns
- GETDNS_RETURN_GOOD on success or an error code on failure. GETDNS_RETURN_NEED_MORE_SPACE will be returned when the buffer was too small. The function will pretend that it had written beyond the end of the buffer, and str will point past the buffer and str_len will contain a negative value.
getdns_return_t getdns_str2rr_dict | ( | const char * | str, |
getdns_dict ** | rr_dict, | ||
const char * | origin, | ||
uint32_t | default_ttl | ||
) |
Convert the string representation of the resource record to rr_dict format.
- Parameters
-
str String representation of the resource record. rr_dict The result getdns dict representation of the resource record origin Default suffix for not fully qualified domain names default_ttl Default ttl
- Returns
- GETDNS_RETURN_GOOD on success or an error code on failure.
getdns_return_t getdns_fp2rr_list | ( | FILE * | in, |
getdns_list ** | rr_list, | ||
const char * | origin, | ||
uint32_t | default_ttl | ||
) |
Read the zonefile and convert to a list of rr_dict's.
- Parameters
-
in An opened FILE pointer on the zone file. rr_list The result list of rr_dicts representing the zone file. origin Default suffix for not fully qualified domain names default_ttl Default ttl
- Returns
- GETDNS_RETURN_GOOD on success or an error code on failure.
getdns_return_t getdns_msg_dict2wire | ( | const getdns_dict * | msg_dict, |
uint8_t ** | wire, | ||
size_t * | wire_sz | ||
) |
Convert DNS message dict to wireformat representation.
- Parameters
-
msg_dict The getdns dict representation of a DNS message wire A newly allocated buffer which will contain the wireformat. wire_sz The size of the allocated buffer and the wireformat.
- Returns
- GETDNS_RETURN_GOOD on success or an error code on failure.
getdns_return_t getdns_msg_dict2wire_buf | ( | const getdns_dict * | msg_dict, |
uint8_t * | wire, | ||
size_t * | wire_sz | ||
) |
Convert DNS message dict to wireformat representation.
- Parameters
-
msg_dict The getdns dict representation of a DNS message wire The buffer in which the wireformat will be written wire_sz On input the size of the wire buffer, On output the amount of wireformat needed for the wireformat representation of the DNS message; even if it did not fit.
- Returns
- GETDNS_RETURN_GOOD on success or an error code on failure. GETDNS_RETURN_NEED_MORE_SPACE will be returned when the buffer was too small. wire_sz will be set to the needed buffer space then.
getdns_return_t getdns_msg_dict2wire_scan | ( | const getdns_dict * | msg_dict, |
uint8_t ** | wire, | ||
int * | wire_sz | ||
) |
Convert DNS message dict to wireformat representation.
- Parameters
-
msg_dict The getdns dict representation of the DNS message wire A pointer to the buffer pointer in which the wireformat will be written. On output the buffer pointer will have moved along the buffer and point right after the just written RR. wire_sz On input the size of the wire buffer, On output the amount of wireformat needed for the wireformat will have been substracted from wire_sz.
- Returns
- GETDNS_RETURN_GOOD on success or an error code on failure. GETDNS_RETURN_NEED_MORE_SPACE will be returned when the buffer was too small. The function will pretend that it had written beyond the end of the buffer, and wire will point past the buffer and wire_sz will contain a negative value.
getdns_return_t getdns_wire2msg_dict | ( | const uint8_t * | wire, |
size_t | wire_sz, | ||
getdns_dict ** | msg_dict | ||
) |
Convert wireformat DNS message in a getdns msg_dict representation.
- Parameters
-
wire Buffer containing the wireformat rr wire_sz Size of the wire buffer msg_dict The returned DNS message
- Returns
- GETDNS_RETURN_GOOD on success or an error code on failure.
getdns_return_t getdns_wire2msg_dict_buf | ( | const uint8_t * | wire, |
size_t * | wire_sz, | ||
getdns_dict ** | msg_dict | ||
) |
Convert wireformat DNS message in a getdns msg_dict representation.
- Parameters
-
wire Buffer containing the wireformat rr wire_sz On input the size of the wire buffer On output the length of the wireformat rr. msg_dict The returned DNS message
- Returns
- GETDNS_RETURN_GOOD on success or an error code on failure.
getdns_return_t getdns_wire2msg_dict_scan | ( | const uint8_t ** | wire, |
size_t * | wire_sz, | ||
getdns_dict ** | msg_dict | ||
) |
Convert wireformat DNS message in a getdns msg_dic representation.
- Parameters
-
wire A pointer to the pointer of the wireformat buffer. On return this pointer is moved to after first read in resource record. wire_sz On input the size of the wire buffer On output the size is decreased with the length of the wireformat DNS message. msg_dict The returned DNS message
- Returns
- GETDNS_RETURN_GOOD on success or an error code on failure.
getdns_return_t getdns_msg_dict2str | ( | const getdns_dict * | msg_dict, |
char ** | str | ||
) |
Convert msg_dict to the string representation of the DNS message.
- Parameters
-
msg_dict The getdns dict representation of the DNS message str A newly allocated string representation of the rr
- Returns
- GETDNS_RETURN_GOOD on success or an error code on failure.
getdns_return_t getdns_msg_dict2str_buf | ( | const getdns_dict * | msg_dict, |
char * | str, | ||
size_t * | str_len | ||
) |
Convert msg_dict to the string representation of the DNS message.
- Parameters
-
msg_dict The getdns dict representation of the resource record str The buffer in which the string will be written str_len On input the size of the text buffer, On output the amount of characters needed to write the string representation of the rr. Even if it does not fit.
- Returns
- GETDNS_RETURN_GOOD on success or an error code on failure. GETDNS_RETURN_NEED_MORE_SPACE will be returned when the buffer was too small. str_len will be set to the needed buffer space then.
getdns_return_t getdns_msg_dict2str_scan | ( | const getdns_dict * | msg_dict, |
char ** | str, | ||
int * | str_len | ||
) |
Convert msg_dict to the string representation of the resource record.
- Parameters
-
msg_dict The getdns dict representation of the resource record str A pointer to the buffer pointer in which the string will be written. On output the buffer pointer will have moved along the buffer and point right after the just written RR. str_len On input the size of the str buffer, On output the number of characters needed for the string will have been substracted from strlen.
- Returns
- GETDNS_RETURN_GOOD on success or an error code on failure. GETDNS_RETURN_NEED_MORE_SPACE will be returned when the buffer was too small. The function will pretend that it had written beyond the end of the buffer, and str will point past the buffer and str_len will contain a negative value.