On 08/26/2015 08:33 PM, Thomas Huth wrote: > Add glue code to use the dumping functions as a netdev > filter, too. > > Signed-off-by: Thomas Huth <th...@redhat.com> > --- > net/dump.c | 54 ++++++++++++++++++++++++++++++++++++++++++++++++++++++ > net/filter.c | 1 + > net/filters.h | 2 ++ > qapi-schema.json | 20 +++++++++++++++++++- > 4 files changed, 76 insertions(+), 1 deletion(-) >
> +++ b/net/filters.h > @@ -13,5 +13,7 @@ > > int net_init_filter_buffer(const NetFilterOptions *opts, const char *name, > int chain, NetClientState *netdev, Error **errp); > +int net_init_filter_dump(const NetFilterOptions *opts, const char *name, > + int chain, NetClientState *netdev, Error **errp); Indentation is off. > > #endif /* QEMU_NET_FILTERS_H */ > diff --git a/qapi-schema.json b/qapi-schema.json > index 7882641..71caca9 100644 > --- a/qapi-schema.json > +++ b/qapi-schema.json > @@ -2599,6 +2599,23 @@ > '*interval': 'uint32' } } > > ## > +# @NetFilterDumpOptions > +# Otherwise, the interface looks clean. I can't tell from this patch whether the file is opened by qemu_open() (probably in net_dump_state_init() in an earlier patch of the series); but if not, you should fix that. That way, I can pass '/dev/fdset/XXX' as the name for an fd passed in by an earlier 'add-fd' even if qemu is restricted from open()ing files directly. -- Eric Blake eblake redhat com +1-919-301-3266 Libvirt virtualization library http://libvirt.org
signature.asc
Description: OpenPGP digital signature