I am started with developing network communication. I wrote driver for RTL8139 https://github.com/Klaykap/LightningOS/ ... /rtl8139.c, but I now have problem with my test with sending ARP. Wireshark didnt see any packet. Please what I am doing wrong?
Code: Select all
//ETHERNET PACKET II
//preamble
ic_buffer[0]=0x5555;
ic_buffer[1]=0x5555;
ic_buffer[2]=0x5555;
ic_buffer[3]=0x55D5;
//this packet is for this MAC
ic_buffer[4]=0xFFFF;
ic_buffer[5]=0xFFFF;
ic_buffer[6]=0xFFFF;
//this packet is from this MAC
ic_buffer[7]=0x1111;
ic_buffer[8]=0x1111;
ic_buffer[9]=0x1111;
//type
ic_buffer[10]=0x0806;
//DATA
ic_buffer[11]=0x0001;
ic_buffer[12]=0x0800;
ic_buffer[13]=0x0406;
ic_buffer[14]=0x0001; //request
ic_buffer[15]=0x1111; //"my MAC"
ic_buffer[16]=0x1111; //"my MAC"
ic_buffer[17]=0x1111; //"my MAC"
ic_buffer[18]=0x0000;
ic_buffer[19]=0x0000;
ic_buffer[20]=0xFFFF; //for all
ic_buffer[21]=0xFFFF; //for all
ic_buffer[22]=0xFFFF; //for all
ic_buffer[23]=0x0000;
ic_buffer[24]=0x0000;
//PAD
ic_buffer[25]=0x0000;
ic_buffer[26]=0x0000;
ic_buffer[27]=0x0000;
ic_buffer[28]=0x0000;
ic_buffer[29]=0x0000;
ic_buffer[30]=0x0000;
ic_buffer[31]=0x0000;
ic_buffer[32]=0x0000;
ic_buffer[33]=0x0000;
//checksume(wrong)
ic_buffer[34]=0x1111;
ic_buffer[35]=0x1111;
send_packet_rtl8139(70);