I wrote a NE2K driver a few days ago.
For testing purposes, I pinged google.fr (with Windows) and sniffed the sent packet (with Wireshark). I copied this packet into my O/S and tried sending it.
When I send the packet, I get an interruption telling me it has been successfully sent.
I sniffed this and discovered that my O/S (using BOCHS) successfully sends the ping request, and that Google answers. But my O/S doesn't get any interruption from receiving a packet. I'm sure that interrupts are working as I get one from sending something.
Also I quote this from the BOCHS source code:
Code: Select all
/*
* rx_frame() - called by the platform-specific code when an
* ethernet frame has been received. The destination address
* is tested to see if it should be accepted, and if the
* rx ring has enough room, it is copied into it and
* the receive process is updated
*/
void bx_ne2k_c::rx_frame(const void *buf, unsigned io_len)
{
int pages;
int avail;
unsigned idx;
int wrapped;
int nextpage;
unsigned char pkthdr[4];
unsigned char *pktbuf = (unsigned char *) buf;
unsigned char *startptr;
BX_DEBUG(("rx_frame with length %d", io_len));
To sum up:
- my O/S sends a ping request which is sent by my real computer
- Google replies to my compter
- but BOCHS doesn't detect this
What can I do ? :-/
Is BOCHS's ne2k not working on Windows ? Or is there something I didn't think about ?