Subversion Repositories Spectranet

[/] [branches/] [gnubinutils/] [rom/] [dnsdefs.inc] - Blame information for rev 384

Details | Compare with Previous | View Log

Line No. Rev Author Line
1 49 winston
;The MIT License
2
;
3
;Copyright (c) 2008 Dylan Smith
4
;
5
;Permission is hereby granted, free of charge, to any person obtaining a copy
6
;of this software and associated documentation files (the "Software"), to deal
7
;in the Software without restriction, including without limitation the rights
8
;to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
;copies of the Software, and to permit persons to whom the Software is
10
;furnished to do so, subject to the following conditions:
11
;
12
;The above copyright notice and this permission notice shall be included in
13
;all copies or substantial portions of the Software.
14
;
15
;THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
;IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
;FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
;AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
;LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
;OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
21
;THE SOFTWARE.
22
 
23
; Definitions for querying DNS
24
;
25
; Most of the fields for a standard DNS 'A' record lookup will not change
26
; so the fields are defined here so they get flashed into the ROM.
27
; See RFC 1035 for full descriptions of the fields.
28
 
29
; Definitions
30
dns_headerlen   equ 12          ; 12 bytes long
31
dns_Arecord     equ 1           ; A record indicator in query/answer
32
dns_port        equ 53          ; port 53/udp
33 83 winston
dns_polltime    equ 16384       ; How long to poll for DNS response
34 49 winston
 
35
; Offsets to the fields of the DNS message header
36
dns_serial      equ 0           ; Two byte serial number
37
dns_bitfield1   equ 2           ; First 8 bits of the flags bitfield
38
dns_bitfield2   equ 3           ; Last 8 bits of the flags bitfield
39
dns_qdcount     equ 4           ; Number of questions (2 bytes, big endian)
40
dns_ancount     equ 6           ; Number of resource records
41
dns_nscount     equ 8           ; Number of NS records
42
dns_arcount     equ 10          ; Number of additional records
43
 
44 83 winston