Dns Program Using Udp In C

I have got this home work in which I have to make a DNS client which is connected to a DNS server with a socket. DNS servers are already build, so my job is to create a DNS client.The client should send a domain name to the server and server should respond with an equivalent IP address for that domain name. Therefore, I would like to know the basic steps that will be used in coding a DNS client. Also, on the internet, I have found a program saying 'DNS query program'.

What exactly is a DNS query program? I have attached a link below which will direct you to that query program. Is this program useful for me in making DNS client? Thanks in advance.

Using Udp In C

DNS Query Code in C with linux sockets. A udp socket is used to send a UDP packet and the response is analysed. Code: //DNS Query Program on Linux //Author. Exploring Art A Global Thematic Approach Download here. C program for domain name server; ip address into web address domain name system in c programming; simulation of domain name system program in c.

Toz 78 Owners Manual. Dear all I hope you are fine. I have a question regarding socket programming, sorry but i am new in this area. I am making a program with libpcap filtering the DNS traffic from a client or from my PC. I successfully made the program using C language and libpcap API. But i want to go further and read the kind of Resource Record or data that is being interchanged between the user and the DNS server, in other words the request.

I understand that DNS use UDP as to perform the communications. But I can not find how to read the payload where i can find the Resource Records (RR) (Like A RR, MX RR, etc ). Could anybody give me an idea how to read that data or which is the correct procedure to read the payload of the filtered traffic, according to the RFC 1035 is a comparison between pre-defined values.

See More On Stackoverflow

I hope you could help me. Thank you very much. Hello Kryptkat and Cactus Hugger Thank you very much for your answers. About Cactus Hugger question, yes you are right the RFC is quite detailed about the fields of the DNS packet. My problem is the implementation of a sniffer that can get the information contained there. About Kryptkat answer.