summaryrefslogtreecommitdiffhomepage
path: root/pkg/sentry/inet
diff options
context:
space:
mode:
authorgVisor bot <gvisor-bot@google.com>2019-07-16 05:59:39 +0000
committergVisor bot <gvisor-bot@google.com>2019-07-16 05:59:39 +0000
commitbc22a1ce13808c5a864d781b662880fd0e27b81c (patch)
tree091a124a436e3c244dc0b5b73ac794fd8fa39f3b /pkg/sentry/inet
parent01f47edbbfc74a6d0adeb50f76cd6a55bc330c48 (diff)
parentcf4fc510fd80c5a23e271db677a8721385c45a4d (diff)
Merge cf4fc510 (automated)
Diffstat (limited to 'pkg/sentry/inet')
-rw-r--r--pkg/sentry/inet/inet.go7
-rw-r--r--pkg/sentry/inet/test_stack.go5
2 files changed, 12 insertions, 0 deletions
diff --git a/pkg/sentry/inet/inet.go b/pkg/sentry/inet/inet.go
index 7c104fd47..5b75a4a06 100644
--- a/pkg/sentry/inet/inet.go
+++ b/pkg/sentry/inet/inet.go
@@ -49,6 +49,9 @@ type Stack interface {
// SetTCPSACKEnabled attempts to change TCP selective acknowledgement
// settings.
SetTCPSACKEnabled(enabled bool) error
+
+ // Statistics reports stack statistics.
+ Statistics(stat interface{}, arg string) error
}
// Interface contains information about a network interface.
@@ -102,3 +105,7 @@ type TCPBufferSize struct {
// Max is the maximum size.
Max int
}
+
+// StatDev describes one line of /proc/net/dev, i.e., stats for one network
+// interface.
+type StatDev [16]uint64
diff --git a/pkg/sentry/inet/test_stack.go b/pkg/sentry/inet/test_stack.go
index 624371eb6..75f9e7a77 100644
--- a/pkg/sentry/inet/test_stack.go
+++ b/pkg/sentry/inet/test_stack.go
@@ -81,3 +81,8 @@ func (s *TestStack) SetTCPSACKEnabled(enabled bool) error {
s.TCPSACKFlag = enabled
return nil
}
+
+// Statistics implements inet.Stack.Statistics.
+func (s *TestStack) Statistics(stat interface{}, arg string) error {
+ return nil
+}