On Thu, May 23, 2013 at 12:03:25PM -0400, Luiz Capitulino wrote:
> On Thu, 23 May 2013 17:08:00 +0800
> Amos Kong <[email protected]> wrote:
> > A flag is used to avoid events flooding, if user don't query
> > rx-filter after receives one event, new events won't be sent
> > to qmp monitor.
> > +RxFilterInfoList *qmp_query_rx_filter(bool has_name, const char *name,
> > + Error **errp)
> > +{
> > + NetClientState *nc;
> > + RxFilterInfoList *filter_list = NULL, *last_entry = NULL;
> > +
> > + QTAILQ_FOREACH(nc, &net_clients, next) {
> > + RxFilterInfoList *entry;
> > + RxFilterInfo *info;
> > +
> > + if (nc->info->type != NET_CLIENT_OPTIONS_KIND_NIC) {
> > + continue;
> > + }
> > + if (has_name && strcmp(nc->name, name) != 0) {
> > + continue;
> > + }
>
> I don't think we need this argument. This command is quite simple in its
> response, let's do this filtering in HMP only.
Event message contains the net client name, management might only want
to query the single net client.
And we plan to use a flag for _each nic_ to control the event notification,
querying single net client will only clear it's flag.
So we need to support query by net-client-name.
--
Amos.