Sending data to emulated NIC
Posted: Sat Nov 12, 2016 8:57 am
I need to test my RTL8139 driver, at least will it receive any packets. How can I send a packet to QEMU's network card?
The Place to Start for Operating System Developers
http://f.osdev.org/
I don't even know does my code work. Also QEMU says that vlan0 isn't connected to the host network and I don't know any solution. BTW I want to only know did I set up NIC interrupt properly. If it's done properly I'll get the interrupt and "packet received" will be written to the log. I don't want to actually send or receive packets at first time.iansjack wrote:Just send a packet from any computer (the host is the easiest) on the same network as the QEMU NIC. Make its physical destination address that of your QEMU interface. Or you could just send an ethernet packet to the broadcast destination address (FF:FF:FF:FF:FF:FF). Or you could send a DHCP Discover packet from your QEMU VM; that should result in a reply from your DHCP server.
I know.iansjack wrote:Well, the only way you can properly test that it is working is to send and receive some test packets. I