I have a simple UNIX-like kernel here:= http://www.oxkernel.com/download.html
And we tried adding LWIP TCP/IP Stack to it. I am trying to run it in QEMU under Linux.
Here is the command line for QEMU:=
emu-system-i386 -fda vmox.img -net nic,model=ne2k_isa -net user -net dump -redir tcp:7777::7777
This runs and gets to the point where the TCP stack says it has a connection established. However, its actually blocked waiting for response.
I tried running a simple client on that port (7777) and host os, and I am able to capture packets.
tcpdump has the following output :=
tcpdump -nnxr qemu-vlan0.pcap
reading from file qemu-vlan0.pcap, link-type EN10MB (Ethernet)
05:04:20.600573 ARP, Request who-has 10.0.2.15 tell 10.0.2.2, length 28
0x0000: 0001 0800 0604 0001 5255 0a00 0202 0a00
0x0010: 0202 0000 0000 0000 0a00 020f
05:04:26.572629 ARP, Request who-has 10.0.2.15 tell 10.0.2.2, length 28
0x0000: 0001 0800 0604 0001 5255 0a00 0202 0a00
0x0010: 0202 0000 0000 0000 0a00 020f
However, we never get out of the connection established wait (its waiting on a semaphore to complete, which only happens when there is the correct TCP input).
I believe the ne2000 driver is not getting any data from the network card.
I have iobase as 0xC000 and I registered the driver on every IRQ except the PIT IRQ. And I still get no data. I even call the isr from a timer and poll it, and I still get no data.
I tried with ne2k_pci and ne2k_isa devices, and still no data. The ne2k driver is based on this code :=
https://github.com/dreamcat4/lwip/blob/master/contrib/ports/old/ti_c6711/netif/ne2kif.c
Can someone help me out ? Thanks