0

I wrote a code to gather the network usage statistics. When I ran it I got the below results. what are the interfaces pdp0 and tun10 in these statistics. Are they 3g interfaces? I am running this app on samsung galaxy phone

{\"data\":{\"pdp0:\":{\"recv\":{\"packets\":\"8580\",\"bytes\":\"9227448\"},\"sent\":{\"packets\":\"5725\",\"bytes\":\"479019\"}},\"gre0:\":{\"recv\":{\"packets\":\"0\",\"bytes\":\"0\"},\"sent\":{\"packets\":\"0\",\"bytes\":\"0\"}},\"tunl0:\":{\"recv\":{\"packets\":\"0\",\"bytes\":\"0\"},\"sent\":{\"packets\":\"0\",\"bytes\":\"0\"}},\"usb0:\":{\"recv\":{\"packets\":\"0\",\"bytes\":\"0\"},\"sent\":{\"packets\":\"0\",\"bytes\":\"0\"}},\"lo:\":{\"recv\":{\"packets\":\"14908\",\"bytes\":\"713035\"},\"sent\":{\"packets\":\"14908\",\"bytes\":\"713035\"}}},\"ver\":\"1.4\",\"type\":\"netdev\",\"date\":\"2011-3-17 15:52:7\",\"user\":\"351863047772880\",\"time_stamp\":1303073527930}

gprathour
  • 14,813
  • 5
  • 66
  • 90
  • Possibly duplicate of http://stackoverflow.com/q/8531292/1055241 check out the accepted answer to understand the concept of interfaces. – gprathour Jan 25 '12 at 08:19

1 Answers1

1

PDP is a Packet Data Protocol interface and is likely your 2.5G or 3G network interface. See http://en.wikipedia.org/wiki/GPRS_Core_Network#PDP_Context

Tun interfaces are typically virtual software interfaces used to create network tunnels.

See http://en.wikipedia.org/wiki/TUN/TAP

Cepheid
  • 316
  • 1
  • 2
  • 5
  • Hey thanks a lot. Also, as you can see 9227448 bytes is transferred from pdp interface. which means almost 9 GB! Are the statistics wrong? or it is showing the entire data usage until now. –  Apr 18 '11 at 04:05
  • Hey Sarath. That would be 9MB not GB. I'm just making an educated guess, but if the phone os is like linux/bsd those values will be reset on reboot / when the interface is re-initialized. – Cepheid Apr 18 '11 at 13:19
  • Hey Cepheid. I am sorry lol. I made a crazy calculation. But is this 9MB the entire data usage or is it during a particular time period? –  Apr 19 '11 at 05:53