title: DNS Server in C to return IP Address and port number
body: <p>From my understanding of a DNS Server, a simple explanation is that for a given hostname the DNS server uses a lookup table to return the IP Address of the hostname.</p>
  
  <p>For one of my projects, I used to connect my client to the server through a wifi network, and specify the IP Address and port at which the server is listening on the client.
  A new requirement has come which asks to specify a DNS server in the network settings, and the DNS server in turn returns the IP Address and port number of my server.</p>
  
  <p>I went through online to check the request/ response to A DNS server, and I found many places it is mentioned that port number is not sent by the DNS Server. Is it right?</p>
  
  <p>I have coded my project in Visual studio 2005. Is there any libray/code of a DNS Server which I can integrate with my existing visual studio project? And is it possible, that for a particular host name I can specify the port number in the response?</p>
  
  <p>I have checked many source codes for DNS Server in C like ldns/ bind ,  but I have not found a way to integrate with visual studio.</p>