On 07/23/2012 01:14 PM, Laine Stump wrote:
On 07/23/2012 10:26 AM, Hendrik Schwartke wrote:
> I'm currently working on a feature that dumps the network traffic of a virtual
interface over the streaming api of libvirt.
> The goal is to offer the possiblity to debug network related problems of guests
without the need to have access to a shell on the host.
> E.g. "virsh iface-dumptraffic virbr0 icmp | tcpdump -n -r -" prints all
icmp traffic on virbr0 to stdout.
> The code below is only a proof of concept, but it should be possible to recognize
what I have in mind and how I want to implement it.
>
> So I would appreciate any comments on that!
>
It's definitely interesting functionality, but putting it in
netcf_driver.c doesn't seem like the right place, since it doesn't use
any netcf functionality, and could just as easily be made to work
without it. On the other hand, since (the way you've implemented it) it
is related to host interfaces, it kind of makes logical sense for it to
be named virInterface<something>, and the backend of all those commands
is currently in netcf_driver.c.
Then again, I have a patch that I need to revive and post a v2, which
renames things to use interface_driver instead of netcf_driver...
https://www.redhat.com/archives/libvir-list/2012-June/msg01331.html
--
Eric Blake eblake(a)redhat.com +1-919-301-3266
Libvirt virtualization library
http://libvirt.org