home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Chip 2000 February
/
CHIPCD_2_2000.iso
/
software
/
testsoft
/
anasil
/
_SETUP.1
/
DNS.DEC
< prev
next >
Wrap
Text File
|
1998-05-14
|
3KB
|
98 lines
; ************************************************************************
;
; Plik z definicjami dekodera ramek dla protokolu DNS
;
; ************************************************************************
[# DNS_QR ]
Translate( 0,"Query" )
Translate( 1,"Response" )
[# DNS_OPCODE ]
Translate( 0,"Standard query" )
Translate( 1,"Inverse query" )
Translate( 2,"Server status request" )
[# DNS_RETCODE ]
Translate( 0,"No error" )
Translate( 1,"Name error" )
[# DNS_TYPES ]
Translate( 1, "A (IP address)" )
Translate( 2, "NS (Name server)" )
Translate( 5, "CNAME (Canonical name)" )
Translate( 12, "PTR (Pointer record)" )
Translate( 13, "HINFO (Host info)" )
Translate( 15, "MX (Mail exchange record)" )
Translate( 252,"AXFR (Request for zone transfer)" )
Translate( 255,"ANY (Request for all records)" )
[# DNS_CLASSES ]
Translate( 1, "Internet address" )
;-----------------------------------------------------------
;
; Definicje fragmentow ramek
;
; Kazda linia ma nastepujacy format:
; Linia,Kolumna,Max.Szerokosc wartosci,Label,Format.Zmienna[,id tablicy translacji (tylko dla typow numerycznych)]
;
[$ DNS_Header ]
Layer( "DNS header","DNS" )
Field( 0,0,4,"Identification", "%04X", RWord(0) ) = DNS_OFFSET
Field( 1,0,9,"Query flag", "%s", RWord(2,15,15), DNS_QR ) = DNS_FLAG_OFF
Field( 1,1,1,"Opcode", "%s", RWord(DNS_FLAG_OFF,11,14), DNS_OPCODE )
Field( 3,0,1,"AA flag", "%d", RWord(DNS_FLAG_OFF,10,10) )
Field( 3,1,1,"TC flag", "%d", RWord(DNS_FLAG_OFF,9,9) )
Field( 4,0,1,"RD flag", "%d", RWord(DNS_FLAG_OFF,8,8) )
Field( 4,1,1,"RA flag", "%d", RWord(DNS_FLAG_OFF,7,7) )
Field( 5,0,1,"Return code", "%s", RWord(DNS_FLAG_OFF,0,3), DNS_RETCODE )
[$ DNS_Header1 ]
Field( 0,0,4,"Num.of questions", "%d", RWord(0) ) = DNS_QUESTION_NUM
Field( 1,0,4,"Num.of answers", "%d", RWord(2) ) = DNS_ANSWERS_NUM
Field( 2,0,4,"Num.of authorities", "%d", RWord(4) ) = DNS_AUTH_NUM
Field( 3,0,4,"Num.of additional RR", "%d", RWord(6) ) = DNS_ADD_NUM
[$ DNS_Question ]
Field( 0,0,1,"Name", "%s", DNSNAME(0,DNS_OFFSET) )
Field( 1,0,1,"Query type", "%s", RWord(%FIELD_OFFSET), DNS_TYPES )
Field( 2,0,1,"Query class", "%s", RWord(%FIELD_OFFSET), DNS_CLASSES )
[$ DNS_Res_Record ]
Field( 0,0,1,"Domain name", "%s", DNSNAME(0,DNS_OFFSET) )
Field( 1,0,1,"Type", "%s", RWord(%FIELD_OFFSET), DNS_TYPES )
Field( 2,0,1,"Class", "%s", RWord(%FIELD_OFFSET), DNS_CLASSES )
Field( 3,0,1,"Time to live", "%d", RLong(%FIELD_OFFSET) )
Field( 4,0,1,"Data length", "%d", RWord(%FIELD_OFFSET) ) = DNS_DATALEN
Field( 5,0,1,"Data", "%s", HString(%FIELD_OFFSET,RWord(DNS_DATALEN),"-") )
;-----------------------------------------------------------
;
; Sekcje komend
;
[^ DNS_Frame]
expand(DNS_Header)
expand(DNS_Header1)
Loop( RWord(DNS_QUESTION_NUM) )
expand(DNS_Question)
LoopEnd
Loop( RWord(DNS_ANSWERS_NUM) )
expand(DNS_Res_Record)
LoopEnd
Loop( RWord(DNS_AUTH_NUM) )
expand(DNS_Res_Record)
LoopEnd
Loop( RWord(DNS_ADD_NUM) )
expand(DNS_Res_Record)
LoopEnd
goto(Undecoded)