EVB-B1+ WIZnet, EVB-B1+ Datasheet - Page 94

no-image

EVB-B1+

Manufacturer Part Number
EVB-B1+
Description
Development Boards & Kits - ARM W3150A+EVAL BOARD BASED ON AVR
Manufacturer
WIZnet
Datasheet

Specifications of EVB-B1+

Rohs
yes
Product
Evaluation Boards
Interface Type
RS-232, SPI
Operating Supply Voltage
3.3 V, 5 V
Data Bus Width
8 bit
Dimensions
50 mm x 40 mm
Processor Series
ATmega128
dns_makequery() creates DNS Request message to be sent to DNS Name Server. Since DNS Request
Message can query only with Header, Question Section, RRs Sections is not needed to be created. If you
examine the header section creation at dns_makequery(), first, it sets ID Field values as any value in DNS
Message inter-working. On here, ID is set with 0x1122, and for further inter-working, the value is incremented
by 1. QR, Opcode, AA, TC, RD Field are set as QR_QUERY, OP_QUERY/OP_IQUERY, 0, 0, 1 respectively
through MAKE_FLAG0(), and RA, Z, RCODE Field are set as 0, 0, 0 respectively through MAKE_FLAG1().
Since the count fields, QDCOUNT, ANCOUNT, NSCOUNT, and ARCOUNT, have only one question, each is
set as 1, 0, 0, 0 respectively.
Let’s look at Question Section. QNAME Field is the field that sets IP Address string. Domain Name and IP
Address string are composed of label length of 1 byte and label of MAX 63 Byte. The end of QNAME is
always set with 0 to find out the variable length of QNAME. <Fig 3.41> is actual example of transformation of
Domain Name “www.wiznet.co.kr” in QNAME field.
#define QR_QUERY
#define QR_RESPONSE
#define OP_QUERY
#define OP_IQUREY
#define OP_STATUS
#define MAKE_FLAG0(qr, op, aa, tc, rd)
#define MAKE_FLAG1(ra, z, rcode)
( ((qr & 0x01) << 7) + ((op & 0x0F) << 3) + ((aa & 0x01) << 2) + ((tc & 0x01) << 1) + (rd & 0x01) )
( ((ra & 0x01) << 7) + ((z & 0x07) << 4) + (rcode & 0x0F) )
<Fig 3.41: Example of QNAME Field transformation of Question Section >
<Table 3-39: Constants and MACRO used in Header Section>
© Copyright 2006 WIZnet Co., Inc. All rights reserved.
0
1
0
1
2
/* a standard query (QUERY) */
/* an inverse query (IQUERY) */
/*a server status request (STATUS)*/
84

Related parts for EVB-B1+