Project Home
Project Home
Wiki
Wiki
Discussion Forums
Discussions
Project Information
Project Info
Forum Topic - How to get NIC flow?: (8 Items)
   
How to get NIC flow?  
On Linux, I can get NIC flow extracted from /proc/net/dev. But on QNX Neutrino 6.5.0, there is no such files. How to do 
it?

Allen Chen
Re: How to get NIC flow?  
What exactly do you mean by 'NIC flow'?

On Thu, May 02, 2013 at 11:48:45PM -0400, Allen Chen wrote:
> On Linux, I can get NIC flow extracted from /proc/net/dev. But on QNX Neutrino 6.5.0, there is no such files. How to 
do it?
> 
> Allen Chen
> 
> 
> 
> _______________________________________________
> 
> General
> http://community.qnx.com/sf/go/post101106
> To cancel your subscription to this discussion, please e-mail general-networking-unsubscribe@community.qnx.com
Re: How to get NIC flow?  
lt means network interface card flow. l want to monitor system status.

Allen

> 
> What exactly do you mean by 'NIC flow'?
> 
> On Thu, May 02, 2013 at 11:48:45PM -0400, Allen Chen wrote:
>> On Linux, I can get NIC flow extracted from /proc/net/dev. But on QNX Neutrino 6.5.0, there is no such files. How to 
do it?
>> 
>> Allen Chen
>> 
>> 
>> 
>> _______________________________________________
>> 
>> General
>> http://community.qnx.com/sf/go/post101106
>> To cancel your subscription to this discussion, please e-mail general-networking-unsubscribe@community.qnx.com
> 
> 
> 
> 
> _______________________________________________
> 
> General
> http://community.qnx.com/sf/go/post101113
> To cancel your subscription to this discussion, please e-mail general-networking-unsubscribe@community.qnx.com
Re: How to get NIC flow?  
'ifconfig -v' gives packet counts.

You'll have to elaborate if you want something more.

On Fri, May 03, 2013 at 11:09:33PM +0800, Allen Chen wrote:
> lt means network interface card flow. l want to monitor system status.
> 
> Allen
> 
> > 
> > What exactly do you mean by 'NIC flow'?
> > 
> > On Thu, May 02, 2013 at 11:48:45PM -0400, Allen Chen wrote:
> >> On Linux, I can get NIC flow extracted from /proc/net/dev. But on QNX Neutrino 6.5.0, there is no such files. How 
to do it?
> >> 
> >> Allen Chen
> >> 
> >> 
> >> 
> >> _______________________________________________
> >> 
> >> General
> >> http://community.qnx.com/sf/go/post101106
> >> To cancel your subscription to this discussion, please e-mail general-networking-unsubscribe@community.qnx.com
> > 
> > 
> > 
> > 
> > _______________________________________________
> > 
> > General
> > http://community.qnx.com/sf/go/post101113
> > To cancel your subscription to this discussion, please e-mail general-networking-unsubscribe@community.qnx.com
> 
> 
> 
> 
> _______________________________________________
> 
> General
> http://community.qnx.com/sf/go/post101122
> To cancel your subscription to this discussion, please e-mail general-networking-unsubscribe@community.qnx.com
Re: How to get NIC flow?  
Thanks for your reply. Is there any C/C++ codes to implement it? I want 
to send these status data by UPnP.

Allen

> 'ifconfig -v' gives packet counts.
>
> You'll have to elaborate if you want something more.
>
> On Fri, May 03, 2013 at 11:09:33PM +0800, Allen Chen wrote:
>> lt means network interface card flow. l want to monitor system status.
>>
>> Allen
>>
>>> What exactly do you mean by 'NIC flow'?
>>>
>>> On Thu, May 02, 2013 at 11:48:45PM -0400, Allen Chen wrote:
>>>> On Linux, I can get NIC flow extracted from /proc/net/dev. But on QNX Neutrino 6.5.0, there is no such files. How 
to do it?
>>>>
>>>> Allen Chen
>>>>
>>>>
>>>>
>>>> _______________________________________________
>>>>
>>>> General
>>>> http://community.qnx.com/sf/go/post101106
>>>> To cancel your subscription to this discussion, please e-mail general-networking-unsubscribe@community.qnx.com
>>>
>>>
>>>
>>> _______________________________________________
>>>
>>> General
>>> http://community.qnx.com/sf/go/post101113
>>> To cancel your subscription to this discussion, please e-mail general-networking-unsubscribe@community.qnx.com
>>
>>
>>
>> _______________________________________________
>>
>> General
>> http://community.qnx.com/sf/go/post101122
>> To cancel your subscription to this discussion, please e-mail general-networking-unsubscribe@community.qnx.com
>
>
>
> _______________________________________________
>
> General
> http://community.qnx.com/sf/go/post101123
> To cancel your subscription to this discussion, please e-mail general-networking-unsubscribe@community.qnx.com
>

Re: How to get NIC flow?  
struct ifdatareq ifdr;
memset(&ifdr, 0, sizeof(ifdr));
strlcpy(ifdr.ifdr_name, ifname, sizeof(ifdr.ifdr_name));
ioctl(s, SIOCGIFDATA, &ifdr);

On Sat, May 04, 2013 at 08:52:36AM +0800, Allen Chen wrote:
> Thanks for your reply. Is there any C/C++ codes to implement it? I want 
> to send these status data by UPnP.
> 
> Allen
> 
> > 'ifconfig -v' gives packet counts.
> >
> > You'll have to elaborate if you want something more.
> >
> > On Fri, May 03, 2013 at 11:09:33PM +0800, Allen Chen wrote:
> >> lt means network interface card flow. l want to monitor system status.
> >>
> >> Allen
> >>
> >>> What exactly do you mean by 'NIC flow'?
> >>>
> >>> On Thu, May 02, 2013 at 11:48:45PM -0400, Allen Chen wrote:
> >>>> On Linux, I can get NIC flow extracted from /proc/net/dev. But on QNX Neutrino 6.5.0, there is no such files. How
 to do it?
> >>>>
> >>>> Allen Chen
> >>>>
> >>>>
> >>>>
> >>>> _______________________________________________
> >>>>
> >>>> General
> >>>> http://community.qnx.com/sf/go/post101106
> >>>> To cancel your subscription to this discussion, please e-mail general-networking-unsubscribe@community.qnx.com
> >>>
> >>>
> >>>
> >>> _______________________________________________
> >>>
> >>> General
> >>> http://community.qnx.com/sf/go/post101113
> >>> To cancel your subscription to this discussion, please e-mail general-networking-unsubscribe@community.qnx.com
> >>
> >>
> >>
> >> _______________________________________________
> >>
> >> General
> >> http://community.qnx.com/sf/go/post101122
> >> To cancel your subscription to this discussion, please e-mail general-networking-unsubscribe@community.qnx.com
> >
> >
> >
> > _______________________________________________
> >
> > General
> > http://community.qnx.com/sf/go/post101123
> > To cancel your subscription to this discussion, please e-mail general-networking-unsubscribe@community.qnx.com
> >
> 
> 
> 
> 
> 
> _______________________________________________
> 
> General
> http://community.qnx.com/sf/go/post101147
> To cancel your subscription to this discussion, please e-mail general-networking-unsubscribe@community.qnx.com
Re: How to get NIC flow?  
Thank you very much.
It does work!

> 
> struct ifdatareq ifdr;
> memset(&ifdr, 0, sizeof(ifdr));
> strlcpy(ifdr.ifdr_name, ifname, sizeof(ifdr.ifdr_name));
> ioctl(s, SIOCGIFDATA, &ifdr);
> 
> On Sat, May 04, 2013 at 08:52:36AM +0800, Allen Chen wrote:
> > Thanks for your reply. Is there any C/C++ codes to implement it? I want 
> > to send these status data by UPnP.
> > 
> > Allen
> > 
> > > 'ifconfig -v' gives packet counts.
> > >
> > > You'll have to elaborate if you want something more.
> > >
> > > On Fri, May 03, 2013 at 11:09:33PM +0800, Allen Chen wrote:
> > >> lt means network interface card flow. l want to monitor system status.
> > >>
> > >> Allen
> > >>
> > >>> What exactly do you mean by 'NIC flow'?
> > >>>
> > >>> On Thu, May 02, 2013 at 11:48:45PM -0400, Allen Chen wrote:
> > >>>> On Linux, I can get NIC flow extracted from /proc/net/dev. But on QNX 
> Neutrino 6.5.0, there is no such files. How to do it?
> > >>>>
> > >>>> Allen Chen
> > >>>>
> > >>>>
> > >>>>
> > >>>> _______________________________________________
> > >>>>
> > >>>> General
> > >>>> http://community.qnx.com/sf/go/post101106
> > >>>> To cancel your subscription to this discussion, please e-mail general-
> networking-unsubscribe@community.qnx.com
> > >>>
> > >>>
> > >>>
> > >>> _______________________________________________
> > >>>
> > >>> General
> > >>> http://community.qnx.com/sf/go/post101113
> > >>> To cancel your subscription to this discussion, please e-mail general-
> networking-unsubscribe@community.qnx.com
> > >>
> > >>
> > >>
> > >> _______________________________________________
> > >>
> > >> General
> > >> http://community.qnx.com/sf/go/post101122
> > >> To cancel your subscription to this discussion, please e-mail general-
> networking-unsubscribe@community.qnx.com
> > >
> > >
> > >
> > > _______________________________________________
> > >
> > > General
> > > http://community.qnx.com/sf/go/post101123
> > > To cancel your subscription to this discussion, please e-mail general-
> networking-unsubscribe@community.qnx.com
> > >
> > 
> > 
> > 
> > 
> > 
> > _______________________________________________
> > 
> > General
> > http://community.qnx.com/sf/go/post101147
> > To cancel your subscription to this discussion, please e-mail general-
> networking-unsubscribe@community.qnx.com


Re: How to get NIC flow?  
Hi Sean, your codes can be compiled on Neutrino 6.5.0, but not on 6.3.2.
It gives an error that aggregate "struct ifdatareq ifdr" incomplete type 
cannot be initialized.
I open /usr/include/net/if.h and found that it doesn't define struct 
ifdatareq and the macro SIOCGIFDATA.
How to make it run ok on 6.3.2?

于 2013/5/6 22:33, Sean Boudreau 写道:
> struct ifdatareq ifdr;
> memset(&ifdr, 0, sizeof(ifdr));
> strlcpy(ifdr.ifdr_name, ifname, sizeof(ifdr.ifdr_name));
> ioctl(s, SIOCGIFDATA, &ifdr);
>
> On Sat, May 04, 2013 at 08:52:36AM +0800, Allen Chen wrote:
>> Thanks for your reply. Is there any C/C++ codes to implement it? I want
>> to send these status data by UPnP.
>>
>> Allen
>>
>>> 'ifconfig -v' gives packet counts.
>>>
>>> You'll have to elaborate if you want something more.
>>>
>>> On Fri, May 03, 2013 at 11:09:33PM +0800, Allen Chen wrote:
>>>> lt means network interface card flow. l want to monitor system status.
>>>>
>>>> Allen
>>>>
>>>>> What exactly do you mean by 'NIC flow'?
>>>>>
>>>>> On Thu, May 02, 2013 at 11:48:45PM -0400, Allen Chen wrote:
>>>>>> On Linux, I can get NIC flow extracted from /proc/net/dev. But on QNX Neutrino 6.5.0, there is no such files. How
 to do it?
>>>>>>
>>>>>> Allen Chen
>>>>>>
>>>>>>
>>>>>>
>>>>>> _______________________________________________
>>>>>>
>>>>>> General
>>>>>> http://community.qnx.com/sf/go/post101106
>>>>>> To cancel your subscription to this discussion, please e-mail general-networking-unsubscribe@community.qnx.com
>>>>>
>>>>>
>>>>> _______________________________________________
>>>>>
>>>>> General
>>>>> http://community.qnx.com/sf/go/post101113
>>>>> To cancel your subscription to this discussion, please e-mail general-networking-unsubscribe@community.qnx.com
>>>>
>>>>
>>>> _______________________________________________
>>>>
>>>> General
>>>> http://community.qnx.com/sf/go/post101122
>>>> To cancel your subscription to this discussion, please e-mail general-networking-unsubscribe@community.qnx.com
>>>
>>>
>>> _______________________________________________
>>>
>>> General
>>> http://community.qnx.com/sf/go/post101123
>>> To cancel your subscription to this discussion, please e-mail general-networking-unsubscribe@community.qnx.com
>>>
>>
>>
>>
>>
>> _______________________________________________
>>
>> General
>> http://community.qnx.com/sf/go/post101147
>> To cancel your subscription to this discussion, please e-mail general-networking-unsubscribe@community.qnx.com
>
>
>
> _______________________________________________
>
> General
> http://community.qnx.com/sf/go/post101178
> To cancel your subscription to this discussion, please e-mail general-networking-unsubscribe@community.qnx.com
>