qemu and netdemo - more details
Joel Sherrill
joel.sherrill at OARcorp.com
Thu Mar 6 21:02:20 UTC 2008
Peter Mueller wrote:
> Hello
>
> here are some more details how my system (Debian) is set-up:
>
Did you get this working?
>
> Am 01.03.2008 um 21:23 schrieb Peter Mueller:
>
>> Hello,
>>
>> I've developed a simple test program based on netdemo for pc386. It
>> basically inits the stack and cyclicly prints out network statistics
>> data. When running the app in qemu and sending a broadcast ping from
>> Linux to the network I can see that the counters show network traffic.
>>
>> But the ping sent from Linux times out and seems not to receive a
>> reply from the app inside qemu.
>>
>> Does someone has an idea what the problem could be? Has someone an
>> example on how to setup the network interface for qemu under Linux?
>>
>>
>
> Commandline of qemu: qemu -M isapc -curses -net nic,model=ne2k_isa
> -net tap,script=/etc/qemu
> -ifup -m 8 -fda ~/floppy.img
>
> The ifup script:
> #!/bin/sh
> sudo -p "Password for $0:" /sbin/ifconfig $1 192.168.7.1
>
>
> and my network config in the rtems app:
>
>
> static struct rtems_bsdnet_ifconfig loopdriver_config = {
> "lo0", /* name */
> rtems_bsdnet_loopattach, /* attach function */
> NULL, /* link to next interface */
> "127.0.0.1", /* IP address */
> "255.0.0.0", /* IP net mask */
> NULL, /* Driver supplies hardware address */
> 0 /* Use default driver parameters */
> };
>
> static char ethernet_address[6] = { 0x00, 0x80, 0x7F, 0x22, 0x61, 0x77 };
>
> /*
> * Default network interface
> */
> static struct rtems_bsdnet_ifconfig netdriver_config = {
> BSP_NE2000_NETWORK_DRIVER_NAME, /* name */
> BSP_NE2000_NETWORK_DRIVER_ATTACH, /* attach function */
>
>
> &loopdriver_config, /* link to next interface */
> "192.168.7.44", /* IP address */
> "255.255.255.0", /* IP net mask */
>
> ethernet_address, /* Ethernet hardware address */
>
> 0, /* Use default driver
> parameters */
> 0, /* mtu */
> 0, /* rbuf_count */
> 0, /* xbuf_count */
> 0, /* port */
> 9 /* irq */
> };
>
> /*
> * Network configuration
> */
> struct rtems_bsdnet_config rtems_bsdnet_config = {
> &netdriver_config,
>
> NULL,
>
> 0, /* Default network task priority */
> 0, /* Default mbuf capacity */
> 0, /* Default mbuf cluster capacity */
>
> "rtems", /* Host name */
> "",
>
> /* Domain name */
> "192.168.7.1", /* Gateway */
> "192.168.7.1", /* Log host */
> {"192.168.7.1" }, /* Name server(s) */
> {"" }, /* NTP server(s) */
>
> };
>
> Hope this helps better to find the problem.
>
> Thanks,
> Peter
>
> --
> Peter Mueller
> peter.o.mueller at gmx.de <mailto:peter.o.mueller at gmx.de>
>
>
--
Joel Sherrill, Ph.D. Director of Research & Development
joel.sherrill at OARcorp.com On-Line Applications Research
Ask me about RTEMS: a free RTOS Huntsville AL 35805
Support Available (256) 722-9985
More information about the users
mailing list