13 usage(FILE *fp,
char *
prog) {
14 fprintf(fp,
"%s domain\n",
prog);
15 fprintf(fp,
" print out the mx for domain\n");
20 main(
int argc,
char *argv[])
34 usage(stdout, argv[0]);
40 usage(stdout, argv[0]);
83 " *** invalid answer name %s after MX query for %s\n",
bool ldns_dname_str_absolute(const char *dname_str)
Checks whether the given dname string is absolute (i.e.
bool ldns_dname_absolute(const ldns_rdf *rdf)
Checks whether the given dname is absolute (i.e.
ldns_rdf * ldns_dname_new_frm_str(const char *str)
creates a new dname rdf from a string.
enum ldns_enum_status ldns_status
void ldns_rr_list_print(FILE *output, const ldns_rr_list *lst)
print a rr_list to output
int main(int argc, char *argv[])
Including this file will include all ldns files, and define some lookup tables.
void ldns_pkt_free(ldns_pkt *packet)
frees the packet structure and all data that it contains.
ldns_rr_list * ldns_pkt_rr_list_by_type(const ldns_pkt *packet, ldns_rr_type type, ldns_pkt_section sec)
return all the rr with a specific type from a packet.
void ldns_rdf_deep_free(ldns_rdf *rd)
frees a rdf structure and frees the data.
size_t ldns_rdf_size(const ldns_rdf *rd)
returns the size of the rdf.
void ldns_rdf_set_size(ldns_rdf *rd, size_t size)
sets the size of the rdf.
ldns_status ldns_resolver_new_frm_file(ldns_resolver **res, const char *filename)
Configure a resolver by means of a resolv.conf file The file may be NULL in which case there will be ...
ldns_pkt * ldns_resolver_search(const ldns_resolver *r, const ldns_rdf *name, ldns_rr_type t, ldns_rr_class c, uint16_t flags)
Send the query for using the resolver and take the search list into account The search algorithm is a...
void ldns_resolver_deep_free(ldns_resolver *res)
Frees the allocated space for this resolver and all it's data.
void ldns_rr_list_deep_free(ldns_rr_list *rr_list)
frees an rr_list structure and all rrs contained therein.
void ldns_rr_list_sort(ldns_rr_list *unsorted)
sorts an rr_list (canonical wire format).
@ LDNS_RR_TYPE_MX
mail exchange
@ LDNS_RR_CLASS_IN
the Internet
Resource record data field.
DNS stub resolver structure.
List or Set of Resource Records.