EVB-PIC24 WIZnet, EVB-PIC24 Datasheet - Page 88

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
dns_query() initializes the buffer that is needed for DNS inter-working and creates QNAME of Question
Section based on Query Type „BYNAME‟, and „BYIP.‟ If the Query Type is „BYNAME,‟ that is, when querying
the Domain Name with IP Address, Domain Name can be used as QNAME without transformation.
When Query Type is „BYIP,‟ that is, when querying the Domain Name with IP Address, change IP Address to
IP Address String and QNAME is used after adding “in-addr.arpa” to the changed IP Address String. After
the creation of QNAME, UDP Socket is created for DNS inter-working and DNS Request Message is created
by calling dns_make_query(). If DNS Request Message is created successfully DNS Request Message is
sent to DNS Name Server through UDP Socket. After sending DNS Request Message it receives DNS
Response Message or waits until the waiting time is expired.
If DNS Response Message is received from DNS Name Server during the waiting time it analyzes received
DNS Response Message using dns_parse_response().dns_query() returns IP Address or Domain Name
depending on Query Type.
<Fig 3.39> is dns_query()‟s process map
Get the network information of EVB
Communicate with the DNS Server
dns_query(s,&hostip,BYNAME)
Find a Free channel of W3100A
NetConf.dns == 0xFFFFFFFF
getSocket(SOCK_CLOSED)
SOCKET s
get_netconf(&NetConf)
Declare Local Variables
NetConf.dns == 0
gethostbyname()
RETURN 1
Success?
Found?
||
Y
N
Y
© Copyright 2006 WIZnet Co., Inc. All rights reserved.
N
<Fig 3.38: gethostbyaddr() & gethostbyname()>
N
Y
with the Server
communicate
RETURN 0
Not found a Free
Fail to
DNS Server IP
Addess is not
Configued
RETURN 0
Socket
Get the network information of EVB
Communicate with the DNS Server
Find a Free channel of W3100A
NetConf.dns == 0xFFFFFFFF
getSocket(SOCK_CLOSED)
dns_query(s,&hostip,BYIP)
SOCKET s
get_netconf(&NetConf)
Declare Local Variables
NetConf.dns == 0
gethostbyaddr()
RETURN 1
Success?
Found?
||
N
Y
Y
N
N
Y
with the Server
communicate
RETURN 0
Fail to
DNS Server IP
Addess is not
Not found a
Free Socket
RETURN 0
Configued
78

Related parts for EVB-PIC24