Development discussion of WireGuard
 help / color / mirror / Atom feed
* Netstat bytes count doesn't match with Wireguard
@ 2021-09-14 20:53 Manikandan Thiagarajan
  2021-09-15  7:31 ` Aaron Jones
  2022-03-10  1:00 ` Wireguard Go C API Callbacks Manikandan Thiagarajan
  0 siblings, 2 replies; 3+ messages in thread
From: Manikandan Thiagarajan @ 2021-09-14 20:53 UTC (permalink / raw)
  To: wireguard

Hi,

I use the Wireguard Go C API to integrate with my packet tunnel network extension to forward traffic to the WG tunnel on Mac OS. I also use the wgGetConfig() API to get tunnel status information.

During my testing, I noticed some differences between what the netstat -ib reports and what Wireguard reports as rx and tx bytes. Usually the Wireguard numbers are higher than netstat numbers.

Is it normal to see so much difference? Can you be able to provide me some information or point me to a doc on how Wireguard calculates the tx/rx bytes?


Netstat -ib output:
Name  Mtu   Network       Address            Ipkts Ierrs     Ibytes    Opkts Oerrs     Obytes  Coll
utun2 1420  <Link#23>                          130     0      42713      180     0      15245     0
utun2 1420  100.101.113.5 100.101.113.54       130     -      42713      180     -      15245     -

Wireguard output:
last_handshake_time_sec=1631646164
last_handshake_time_nsec=79839000
tx_bytes=21328
rx_bytes=47980
persistent_keepalive_interval=0
allowed_ip=155.2.135.28/32
allowed_ip=192.168.128.4/32

Thanks,
Mani

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2022-03-10  1:00 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-09-14 20:53 Netstat bytes count doesn't match with Wireguard Manikandan Thiagarajan
2021-09-15  7:31 ` Aaron Jones
2022-03-10  1:00 ` Wireguard Go C API Callbacks Manikandan Thiagarajan

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).