I want to encode DNS protocol header using C and create a UDP datagram. Lets say I have a query www.google.com.
Can anyone suggest how to go about it?
You can find the header format here - http://www.nersc.gov/~scottc/software/snort/dns%5Fhead.html