0

if I type ifconfig i get packet for Tx and RX ... where exactly the piece of code to increment this counter? Is it in the network driver itself? or in the kernel ?

If possible please provide lxr link of the counter variable used.

Thx !

Kaleb Pederson
  • 45,767
  • 19
  • 102
  • 147
kumar
  • 2,530
  • 6
  • 33
  • 57

2 Answers2

1

It's done in the individual network drivers.

Eg, for the rtl8139too driver, the TX count is incremented on line 1786 (see here).

caf
  • 233,326
  • 40
  • 323
  • 462
0

ifconfig read the statistics off from procfs. The values found in proc is updated by the kernel and ultimately boils down to the drivers of the network card.

khn
  • 31
  • 2