Hi,
I am still in the early stages of writing a network driver for NE2000 card. The OS will run on bochs.
I wrote an ISR for the interrupt of NIC. But it doesn't fire. The reason is the network packets that I send from the host OS donot reach bochs. I used TAP-Win32 interface. In order to check that the networking is up, I booted up bochs with dlxlinux, and I am able to ping both ways(host <-> guest). But when I boot up bochs with my OS and ping from the host, it says Request Timed Out. I modified the route table, I added static entry to the arp table (because I can't assign an IP address to the nic yet). I also enabled the card to receive broadcast packets. So, when I ping the broadcast address from the host, the packets should reach the nic and the interrupt should fire.. am I correct? But that doesnt happen.
I would like to know if I am right in thinking that the nic will be able to receive the packets and fire the interrupts, when they are broadcast packets (using an IP address). Since I have not yet assigned an IP address or subnet mask, will the packet reach my nic just because there is an arp table entry?
Thank you for your patience,
ADR
Network driver for a small OS on Bochs
- thepowersgang
- Member
- Posts: 734
- Joined: Tue Dec 25, 2007 6:03 am
- Libera.chat IRC: thePowersGang
- Location: Perth, Western Australia
- Contact:
Re: Network driver for a small OS on Bochs
You seem to not be understanding the idea of a network stack.
ping will fail unless your OS has support for IP (and the required protocols below it)
As for the IRQ not firing, have you masked interrupts correctly on the card? Is there an interrupt currently active?
ping will fail unless your OS has support for IP (and the required protocols below it)
As for the IRQ not firing, have you masked interrupts correctly on the card? Is there an interrupt currently active?
Kernel Development, It's the brain surgery of programming.
Acess2 OS (c) | Tifflin OS (rust) | mrustc - Rust compiler
Currently Working on: mrustc
Acess2 OS (c) | Tifflin OS (rust) | mrustc - Rust compiler
Currently Working on: mrustc
Re: Network driver for a small OS on Bochs
I do understand why the ping does/will fail. My question is regarding the interrupt.
I have cleared the ISR and set the IMR to 0x0B
I have cleared the ISR and set the IMR to 0x0B
- thepowersgang
- Member
- Posts: 734
- Joined: Tue Dec 25, 2007 6:03 am
- Libera.chat IRC: thePowersGang
- Location: Perth, Western Australia
- Contact:
Re: Network driver for a small OS on Bochs
Since you're using Bochs, I suggest breaking out the debugger and using the "info ne2000" command to get the card state, this should tell you if there's something you have forgotten to do.
Kernel Development, It's the brain surgery of programming.
Acess2 OS (c) | Tifflin OS (rust) | mrustc - Rust compiler
Currently Working on: mrustc
Acess2 OS (c) | Tifflin OS (rust) | mrustc - Rust compiler
Currently Working on: mrustc