home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Chip 2000 February
/
CHIPCD_2_2000.iso
/
software
/
testsoft
/
anasil
/
_SETUP.1
/
ETHERNET.DEC
< prev
next >
Wrap
Text File
|
1999-07-23
|
3KB
|
116 lines
; ************************************************************************
;
; Plik z definicjami dekodera ramek dla warstwy liniowej lacza Ethernet
;
; ************************************************************************
;-----------------------------------------------------------
;
; Tablice translacji - linie maja format
; <liczba hex|liczba dec>,"tekst"
[# EII_TYPE ]
Translate( 0x8137,"IPX" )
Translate( 0x0800,"IP" )
Translate( 0x0806,"ARP" )
Translate( 0x80F3,"AARP" )
;-----------------------------------------------------------
;
; Definicje fragmentow ramek
;
; Kazda linia ma nastepujacy format:
; Linia,Kolumna,Max.Szerokosc wartosci,Label,Format.Zmienna[,id tablicy translacji (tylko dla typow numerycznych)]
;
[$ ETHERNET_MAC ]
Field( 0,0,18,"Destination address:","%s", HString(0,6,"-") ) = E_DEST
Field( 1,0,18,"Source address:", "%s", HString(6,6,"-") ) = E_SRC
[$ ETHERNET_802_3 ]
Layer( "Ethernet 802.3","Eth.802.3" )
Field( 0,0,5,"Length","%d", RWord(0) )
[$ ETHERNET_802_2_I ]
Layer( "Ethernet 802.2 header type I","Eth.802.2-I" )
Field( 0,0,5,"Length", "%d", RWord(0) )
Field( 1,0,3,"DSAP", "%02X", Byte(2) )
Field( 2,0,3,"SSAP", "%02X", Byte(3) )
Field( 3,0,3,"Control Byte 1","%02X", Byte(4) )
[$ ETHERNET_802_2_II ]
Layer( "Ethernet 802.2 header type II","Eth.802.2-II" )
Field( 0,0,5,"Length", "%d", RWord(0) )
Field( 1,0,3,"DSAP", "%02X", Byte(2) )
Field( 2,0,3,"SSAP", "%02X", Byte(3) )
Field( 3,0,3,"Control Byte 1","%02X", Byte(4) )
Field( 4,0,3,"Control Byte 2","%02X", Byte(5) )
[$ ETHERNET_II ]
Layer( "Ethernet type II","Eth.II" )
Field( 0,0,1,"Type", "%s", RWord(0), EII_TYPE ) = E2_TYPE
[$ ETHERNET_SNAP ]
Layer( "Ethernet 802.2 SNAP","Eth.SNAP" )
Field( 0,0,5,"Length", "%d", RWord(0) )
Field( 1,0,3,"DSAP", "%02X", Byte(2) )
Field( 1,1,3,"SSAP", "%02X", Byte(3) )
Field( 2,0,3,"Control Byte 1","%02X", Byte(4) )
Field( 3,0,15,"ProtocolId", "%s" , HString(5,5,"-") ) = ES_PROTO
;-----------------------------------------------------------
;
; Sekcje komend
;
[^ Ethernet]
expand(ETHERNET_MAC)
On ( RWord(0)>1500 )
expand(ETHERNET_II)
TableJump( RWord(E2_TYPE) )
0x0800,IP_Frame
0x0806,ARP_Frame
0x80F3,AARP_Frame
0x8137,IPX_Frame
TableEnd
goto( Undecoded )
OnEnd
On ( (Byte(2)==0xAA)&(Byte(3)==0xAA)&(Byte(4)==0x03) )
expand(ETHERNET_SNAP)
On( (Byte(ES_PROTO)==0)&(RLong(ES_PROTO+1)==0x000080F3) )
goto( AARP_Frame )
OnEnd
On( (Byte(ES_PROTO)==0x08)&(RLong(ES_PROTO+1)==0x0007809B) )
goto( DDP_Frame )
OnEnd
goto( Undecoded )
OnEnd
On ( RWord(2)==0xFFFF )
expand(ETHERNET_802_3)
goto( IPX_Frame )
OnEnd
On ( Byte(4,0,1)==3 )
expand(ETHERNET_802_2_I)
TableJump( Word(-3) )
0xF0F0,NetBeui
0xE0E0,IPX_Frame
TableEnd
goto( Undecoded )
OnEnd
expand( ETHERNET_802_2_II )
TableJump( Word(-4) )
0xF0F0,NetBeui
0xE0E0,IPX_Frame
TableEnd
goto( Undecoded )