CCS C Software and Maintenance Offers
FAQFAQ   FAQForum Help   FAQOfficial CCS Support   SearchSearch  RegisterRegister 

ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

CCS does not monitor this forum on a regular basis.

Please do not post bug reports on this forum. Send them to support@ccsinfo.com

Help on DNS

 
Post new topic   Reply to topic    CCS Forum Index -> General CCS C Discussion
View previous topic :: View next topic  
Author Message
wireless



Joined: 02 Nov 2003
Posts: 16
Location: London England

View user's profile Send private message

Help on DNS
PostPosted: Mon May 25, 2009 2:35 pm     Reply with quote

Two simple questions about DNSResolve.

1. Where does the stack get the DNS server address from?

2. Do I need "http://www" in front of the host name I am trying to resolve.

Can anybody post a simple example of resolving a host name to an IP address. I have tried using the smtp_mail example but am having no luck.


Thanks in anticipation.
vijay s



Joined: 20 Oct 2007
Posts: 17
Location: coimbatore,india

View user's profile Send private message Send e-mail Yahoo Messenger

PostPosted: Mon May 25, 2009 10:19 pm     Reply with quote

You have to specify your DNS Server IP address in TCP/IP Stack. When you enter any Domain name in browser, it sends the domain name to DNS Server, it resolves the corresponding IP.

Of course, you have to enter http://www in browser.

What is the stack you using CCS or Microchip?
_________________
with regards
vijay s
asmallri



Joined: 12 Aug 2004
Posts: 1634
Location: Perth, Australia

View user's profile Send private message Send e-mail Visit poster's website

PostPosted: Mon May 25, 2009 11:58 pm     Reply with quote

vijay s wrote:
you have to specify your DNS Server IP address in TCP/IP Stack.


The above is true if you do not use DHCP. If you use DHCP then this information is provided by the DHCP server.
_________________
Regards, Andrew

http://www.brushelectronics.com/software
Home of Ethernet, SD card and Encrypted Serial Bootloaders for PICs!!
wireless



Joined: 02 Nov 2003
Posts: 16
Location: London England

View user's profile Send private message

Help on DNS
PostPosted: Tue May 26, 2009 1:53 am     Reply with quote

Thanks Vijay and Andrew for your replies.

I am using DHCP, the CCS TCP/IP stack with CCS PCH C Compiler, Version 4.058 and a PIC18F67J60. The software is all working fine if I specify the IP address of the server to which I am connecting. It also has a HTTP server to set up all the parameters which also works OK.

The DNSResolve returns with an error 04 which is the DNS_GET_RESULT state. From this I assume that it has sent the UDP packet but failed to get a reply from the DNS server.

I will try and do some more debugging later today.

Regards

Terry
Display posts from previous:   
Post new topic   Reply to topic    CCS Forum Index -> General CCS C Discussion All times are GMT - 6 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group