qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
* [Qemu-devel] qemu networking help
@ 2007-12-30  8:40 Ryan W Smith
  2007-12-30 11:55 ` Mulyadi Santosa
  2007-12-30 17:10 ` M. Warner Losh
  0 siblings, 2 replies; 3+ messages in thread
From: Ryan W Smith @ 2007-12-30  8:40 UTC (permalink / raw)
  To: qemu-devel

I'm currently working on a project where we're using qemu to trace  
information flow through the operating system.  One of the things  
that we'd like to do is trace network data as it flows through the  
operating system.  I've been reading through the code, and I've  
gotten a bit lost.  I gather that slirp is where data comes and goes  
from the host operating system, but I'm looking for the section of  
code that sends and receives data from the guest operating system.  I  
read through the network device code (ne2000.c), and my guess is that  
the inb and outb functions are used to transfer data to the guest,  
but I'm not quite certain how that is done.  Is there anything that  
anyone can point me to that would explain the process of getting data  
from the networking device to the guest operating system?  Also, is  
there anything that explains the ne2k networking device a little  
more, and could explain what all the registers are and how to use  
them?  Thanks in advance for any help you may offer.

-Ryan

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [Qemu-devel] qemu networking help
  2007-12-30  8:40 [Qemu-devel] qemu networking help Ryan W Smith
@ 2007-12-30 11:55 ` Mulyadi Santosa
  2007-12-30 17:10 ` M. Warner Losh
  1 sibling, 0 replies; 3+ messages in thread
From: Mulyadi Santosa @ 2007-12-30 11:55 UTC (permalink / raw)
  To: qemu-devel; +Cc: ryanwsmith

Hi...


> I'm currently working on a project where we're using qemu to trace
> information flow through the operating system.  One of the things
> that we'd like to do is trace network data as it flows through the
> operating system.  I've been reading through the code, and I've
> gotten a bit lost.  I gather that slirp is where data comes and goes
> from the host operating system, but I'm looking for the section of
> code that sends and receives data from the guest operating system.  I
> read through the network device code (ne2000.c), and my guess is that
> the inb and outb functions are used to transfer data to the guest,
> but I'm not quite certain how that is done.  Is there anything that
> anyone can point me to that would explain the process of getting data
> from the networking device to the guest operating system?  Also, is
> there anything that explains the ne2k networking device a little
> more, and could explain what all the registers are and how to use
> them?  Thanks in advance for any help you may offer.

Maybe it's not so helpful, but have you considered simply running
tcpdump in each guest OS? or running combination of netfilter+ulogd
(again, in each guest OS)?

regards,

Mulyadi.

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [Qemu-devel] qemu networking help
  2007-12-30  8:40 [Qemu-devel] qemu networking help Ryan W Smith
  2007-12-30 11:55 ` Mulyadi Santosa
@ 2007-12-30 17:10 ` M. Warner Losh
  1 sibling, 0 replies; 3+ messages in thread
From: M. Warner Losh @ 2007-12-30 17:10 UTC (permalink / raw)
  To: qemu-devel, ryanwsmith

In message: <AAC9B78C-442D-428C-92F7-FB0F50B7E7EB@gmail.com>
            Ryan W Smith <ryanwsmith@gmail.com> writes:
: I'm currently working on a project where we're using qemu to trace  
: information flow through the operating system.  One of the things  
: that we'd like to do is trace network data as it flows through the  
: operating system.  I've been reading through the code, and I've  
: gotten a bit lost.  I gather that slirp is where data comes and goes  
: from the host operating system, but I'm looking for the section of  
: code that sends and receives data from the guest operating system.  I  
: read through the network device code (ne2000.c), and my guess is that  
: the inb and outb functions are used to transfer data to the guest,  
: but I'm not quite certain how that is done.  Is there anything that  
: anyone can point me to that would explain the process of getting data  
: from the networking device to the guest operating system?  Also, is  
: there anything that explains the ne2k networking device a little  
: more, and could explain what all the registers are and how to use  
: them?  Thanks in advance for any help you may offer.

Well, the ne2000 has a shared memory area that the packets live in,
and a i/o port area that signals the host O/S what's going on.

I'd suggest reading the FreeBSD if_ed driver for some more information
about the card.  From it you'll see that the NE2000 has a DS8390
packet engine that does a DMA directly into the shared memory.  The
ds8390 datasheet can be foudn on the network.  You may also find good
comments in the Linux ne.c driver:
	http://www.gelato.unsw.edu.au/lxr/source/drivers/net/ne.c

Warner

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2007-12-30 17:11 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2007-12-30  8:40 [Qemu-devel] qemu networking help Ryan W Smith
2007-12-30 11:55 ` Mulyadi Santosa
2007-12-30 17:10 ` M. Warner Losh

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).