INT received - repeat -- get data - until EOF or Length > 1518 <-- ethernet type II frame - until EOF or Length > 1526 <-- complete ethernet frame - if length > 1518 then discard - if (checksum(data)==data[1515..1518]) then -- if (data[0..5]==my_mac_address) or (data[0..5]==0xffffffffffff) then --- if (data[C..D]==0x0800 then goto ip_received --- if (data[C..D]==0x0806 then goto arp_received --- if (data[C..D]==0x0835 then goto rarp_received -- endif - endif ip_received offset = 0x000E - if (data[0] AND#&F0) == 4 then \ only IPv4 -- if (checksum(data)==data[A..B]) then \ only valid crc --- if (data[8..9]==0x01) then goto icmp_received --- if (data[8..9]==0x06) then goto tcp_received --- if (data[8..9]==0x17) then goto udp_received -- end if - end if