EVB-PIC24 WIZnet, EVB-PIC24 Datasheet - Page 89

no-image

EVB-PIC24

Manufacturer Part Number
EVB-PIC24
Description
Development Boards & Kits - PIC / DSPIC W3150A+EVAL BOARD BASED ON PIC24
Manufacturer
WIZnet
Datasheet

Specifications of EVB-PIC24

Rohs
yes
Product
Development Kits
Interface Type
RS-232
Data Bus Width
16 bit
Dimensions
50 mm x 40 mm
RETURN 0
int len
u_int port;
u_char response_received = 0
char* qname;
dns_buf = (u_char*) TX_BUF
get_domain_name = dns_buf + MAX_DNSMSG_SIZE
query_data = querydata
Convert domain_name into Dotted Notation Format
qname += MAX_DNSMSG_SIZE
strcpy(qname,inet_ntoa(*domain_ip))
strcat(qname,".in-addr.arpa")
© Copyright 2006 WIZnet Co., Inc. All rights reserved.
len = dns_makequery(OPQUERY,qname)
Copy get_domain_name to domain_name
sendto(dns_buf,dnsip,IPPORT_DOMAIN)
strcpy(domain_name, get_domain_name)
Declare & Initialize Local Variables
N
Send the query to the DNS Server
N
Create a UDP Socket for DNS
Make a Query with qname
N
querydata == BYNAME
querydata == BYNAME
reponse_received == 1
socket(Sn_MR_UDP)
dns_parse_reponse()
Analyze the answer
Close the socket
dns_query()
Create OK?
elapse-- > 0
RETURN 1
close(s)
len != 0
<Fig 3.39: dns_query()>
N
N
N
Y
Y
Y
Y
Y
Y
wait_10ms(1)
Wait 10ms
qname = domain_name
*domain_ip = get_domain_ip
reponse_received = 1
Receive a answer from the DNS Server
getSn_RX_RSR(s) > 0
recvfrom(dns_buf)
N
Y
79

Related parts for EVB-PIC24