W5100E01-AVR WIZnet, W5100E01-AVR Datasheet - Page 93

no-image

W5100E01-AVR

Manufacturer Part Number
W5100E01-AVR
Description
Development Boards & Kits - AVR W5100 EVAL BOARD BASED ON AVR
Manufacturer
WIZnet
Datasheet

Specifications of W5100E01-AVR

Rohs
yes
Product
Development Boards
Tool Is For Evaluation Of
ATMEGA128
Core
AVR8
Interface Type
LAN, RS-232
Operating Supply Voltage
5 V
Data Bus Width
8 bit
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 2007 WIZnet Co., Inc. All rights reserved.
0
1
0
1
2
/*a server status request (STATUS)*/
/* a standard query (QUERY) */
/* an inverse query (IQUERY) */
83

Related parts for W5100E01-AVR