Subject: Re: netlink stats: Ability to get stats for a single device?

From: Ben Greear <[email-masked]>
Date: Tue, 26 Oct 2010 13:43:50 -0700

On 10/26/2010 01:37 PM, Eric Dumazet wrote:
> Le mardi 26 octobre 2010 à 13:29 -0700, Ben Greear a écrit :
>
>> I'm trying to craft my own netlink message...basically:
>>
>>      memset(&snl, 0, sizeof(snl));
>>      snl.nl_family = AF_NETLINK;
>>      snl.nl_pid    = 0;
>>      snl.nl_groups = 0;
>>
>>      memset(&buffer, 0, sizeof(buffer));
>>      nlh->nlmsg_type = msg_type;
>>      nlh->nlmsg_flags = NLM_F_MATCH|NLM_F_REQUEST;
>
> dont use F_MATCH : check net/core/rtnetlink.c
>
> vi +1660 net/core/rtnetlink.c
>
> You _dont_ want to call 'dumpit' : so dont use a bit present in
> NLM_F_DUMP at all:

That was exactly my problem.  It works as expected with that NLM_F_MATCH
removed.

Thanks!
Ben

-- 
Ben Greear <[email-masked]>
Candela Technologies Inc  http://www.candelatech.com