You are not logged in.

#1 2008-06-09 09:44:57

ezzetabi
Member
Registered: 2006-08-27
Posts: 947

dns mx and res_query.

I'd like making a small dns client who get the stmp server where sending the emails for any given host address.

I use res_query, domain_name is a char* to the domain name.

res_query(domain_name, C_IN, T_MX, buffer, length);

the function fill in the buffer with the server answer, but how I can interpret it?
Seeking around I understood the first 12 bytes should be interpreted using this bit field.
But what about the rest?

It is not for spamming, it is just I am studying dns.
etb

Offline

Board footer

Powered by FluxBB