EVB-PIC24 WIZnet, EVB-PIC24 Datasheet - Page 90

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
Header Section
domain_len = strlen(qname)
© Copyright 2006 WIZnet Co., Inc. All rights reserved.
char* query = dns_buf;
u_char* domain_tok;
u_int domain_len;
u_int qtype;
u_int qclass;
*query++ = domain_len
memcpy(query,qname,doman_len)
qname += domain_len+1
*query += domain_len
Declare & Initialize Local Variables
N
N
*((u_int*)query) = dns_id
query += 2
*query++ = MAKE_FLAG0()
*query++ = MAKE_FLAG1()
*((u_int)query) = 1
query = dns_buf + DHDR_SIZE
domain_tok = strchr(qname,’.’)
Find the location of . In qname
*((u_int*)query) = qclass
query +=2
query_data == BYNAME
<Fig 3.40: dns_makequery()>
*((u_int*)query) = qtype
query += 2
qclass = CLASS_IN
domain_tok == NULL
RETURN Query Size
domain_tok != NULL
qtype = TYPE_PTR
dns_makequery()
domain_len > 63
*query++ = \0
N
N
Y
domain_len = (domain_tok - qname)
Y
Y
Y
qtype = TYPE_A
RETURN 0
Question Section
80

Related parts for EVB-PIC24