summaryrefslogtreecommitdiffhomepage
path: root/pkg/tcpip/stack/stack.go
diff options
context:
space:
mode:
authorBert Muthalaly <stijlist@google.com>2019-03-19 08:29:37 -0700
committerShentubot <shentubot@google.com>2019-03-19 08:30:43 -0700
commit928809fa7d3b682c7e2e06c9f9b1f3fb5d75a0d6 (patch)
tree33e1e1c21be68ffaeeb83cfb86f29af512515058 /pkg/tcpip/stack/stack.go
parent8a499ae65f361fb01c2e4be03122f69910a8ba4a (diff)
Add layer 2 stats (tx, rx) X (packets, bytes) to netstack
PiperOrigin-RevId: 239194420 Change-Id: Ie193e8ac2b7a6db21195ac85824a335930483971
Diffstat (limited to 'pkg/tcpip/stack/stack.go')
-rw-r--r--pkg/tcpip/stack/stack.go3
1 files changed, 3 insertions, 0 deletions
diff --git a/pkg/tcpip/stack/stack.go b/pkg/tcpip/stack/stack.go
index cbfe5c3c7..15a268b10 100644
--- a/pkg/tcpip/stack/stack.go
+++ b/pkg/tcpip/stack/stack.go
@@ -627,6 +627,8 @@ type NICInfo struct {
// MTU is the maximum transmission unit.
MTU uint32
+
+ Stats NICStats
}
// NICInfo returns a map of NICIDs to their associated information.
@@ -648,6 +650,7 @@ func (s *Stack) NICInfo() map[tcpip.NICID]NICInfo {
ProtocolAddresses: nic.Addresses(),
Flags: flags,
MTU: nic.linkEP.MTU(),
+ Stats: nic.stats,
}
}
return nics