home *** CD-ROM | disk | FTP | other *** search
/ Chip 2000 February / CHIPCD_2_2000.iso / software / testsoft / anasil / _SETUP.1 / NETBEUI.DEC < prev    next >
Text File  |  1997-09-09  |  3KB  |  94 lines

  1. ; ************************************************************************
  2. ;
  3. ; Plik z definicjami dekodera ramek dla protokolu NetBeui
  4. ;
  5. ; ************************************************************************
  6.  
  7. ;-----------------------------------------------------------
  8. ;
  9. ;  Tablice translacji - linie maja format
  10. ;   <liczba hex|liczba dec>,"tekst"
  11.  
  12.  
  13. [# LM_TYPE ]
  14.    Translate( 0x00,"Redirector" )
  15.    Translate( 0x03,"User" )
  16.    Translate( 0x05,"Forwarded name" )
  17.    Translate( 0x20,"Server" )
  18.  
  19. [# NETBIOS_TYPE ]
  20.    Translate( 0x00,"Add group name query" )
  21.    Translate( 0x01,"Add name query" )
  22.    Translate( 0x02,"Name in conflict" )
  23.    Translate( 0x03,"Status query" )
  24.    Translate( 0x07,"Terminate trace (remote)" )
  25.    Translate( 0x08,"Datagram" )
  26.    Translate( 0x09,"Datagram broadcast" )
  27.    Translate( 0x0A,"Name query" )
  28.    Translate( 0x0D,"Add name response" )
  29.    Translate( 0x0E,"Name recognized" )
  30.    Translate( 0x0F,"Status response" )
  31.    Translate( 0x13,"Terminate trace" )
  32.    Translate( 0x14,"Data ACK" )
  33.    Translate( 0x15,"Data first middle" )
  34.    Translate( 0x16,"Data only last" )
  35.    Translate( 0x17,"Session confirm" )
  36.    Translate( 0x18,"Session end" )
  37.    Translate( 0x19,"Session initialize" )
  38.    Translate( 0x1A,"No receive" )
  39.    Translate( 0x1B,"Receive outstanding" )
  40.    Translate( 0x1C,"Receive continue" )
  41.    Translate( 0x1F,"Session alive" )
  42.  
  43. ;-----------------------------------------------------------
  44. ;
  45. ;  Definicje fragmentow ramek
  46. ;
  47. ;  Kazda linia ma nastepujacy format:
  48. ;    Linia,Kolumna,Max.Szerokosc wartosci,Label,Format.Zmienna[,id tablicy translacji (tylko dla typow numerycznych)]
  49. ;
  50.  
  51.  
  52. [$ NETBEUI_HEADER ]
  53.   Layer( "NetBIOS frame header","NBF" )
  54.   Field( 0,0,5, "Length","%d", Word(0) )
  55.   Field( 1,0,5, "Delimiter","%04X", Word(2) )
  56.   Field( 2,0,3, "Command","%02X", Byte(4) )
  57.   Field( 3,0,26,"","(%s)", Byte(4), NETBIOS_TYPE )
  58.   Field( 4,0,3, "Data 1","%02X", Byte(5) )
  59.   Field( 5,0,5, "Data 2","%04X", Word(6) )
  60.   Field( 6,0,9, "Xmit/Resp","%08X", Long(8) )
  61.  
  62. [$ NETBEUI_HEADER_I ]
  63.   Field( 0,0,3,"Destination session", "%02X", Byte(0) )
  64.   Field( 1,0,3,"Source session", "%02X", Byte(1) )
  65.  
  66. [$ NETBEUI_HEADER_UI ]
  67.   Field( 0,0,17,"Destination name", "%s", String(0,15) )
  68.   Field( 0,1,15,"Destination type", "%s", Byte(15), LM_TYPE )
  69.   Field( 1,0,17,"Source name", "%s", String(16,15) )
  70.   Field( 1,1,15,"Source type", "%s", Byte(31), LM_TYPE )
  71.  
  72. ;-----------------------------------------------------------
  73. ;
  74. ;  Sekcje komend
  75. ;
  76.  
  77. [^ NetBeui]
  78. On ( Byte(4)>0x13 )
  79.    expand(NETBEUI_HEADER)
  80.    expand(NETBEUI_HEADER_I)
  81.    goto( Undecoded )
  82. OnEnd
  83.  
  84. expand(NETBEUI_HEADER)
  85. expand(NETBEUI_HEADER_UI)
  86.  
  87. goto( Undecoded )
  88.  
  89.  
  90.  
  91.  
  92.  
  93.  
  94.