On Thu, 2005-12-08 at 10:58, Riazuddin wrote:
> Hi Members,
> 
> I am new to this group. 
> 
> I am using kernel 2.4.20. How do i get a list of RX / TX Packet Count
> in Kernel Space and if i want to reset it to 0, how do i do it without
> restarting the machine.

RESETING ??  from kernel space ?? you must write a kernel module for
this 

you must have a line like this  

net_device_stats->rx_packets = 0 ;

look at the structure for more info,  netdevice.h

<snip>

struct net_device_stats
{
        unsigned long   rx_packets;             /* total packets
received */
        unsigned long   tx_packets;             /* total packets
transmitted */

</snip>
so everytime you insert this module with the code it will reset ,
however you can make it more better by integrating it with proc file
system. communicating with proc for triggered reset.

thanks regards
yunus 


-- 
------------------------------------------------------------------
Name                    : Shaikh Yunus
Email primary           : [EMAIL PROTECTED]
                        : [EMAIL PROTECTED]
Encrypted Mail Preferred 
PGP ID                  : 0xA7B0AB1D 
Fingerprint = 384E B543 F594 6DCA 358D F646 A3A8 0A65 A7B0 AB1D
------------------------------------------------------------------
         



--
 PRIVACY WARNING: For auditing purposes, a copy of this message has been
 saved in a permanent database.



------------------------ Yahoo! Groups Sponsor --------------------~--> 
Fair play? Video games influencing politics. Click and talk back!
http://us.click.yahoo.com/2jUsvC/tzNLAA/TtwFAA/0XFolB/TM
--------------------------------------------------------------------~-> 

 
Yahoo! Groups Links

<*> To visit your group on the web, go to:
    http://groups.yahoo.com/group/dubailug/

<*> To unsubscribe from this group, send an email to:
    [EMAIL PROTECTED]

<*> Your use of Yahoo! Groups is subject to:
    http://docs.yahoo.com/info/terms/
 


Reply via email to