summaryrefslogtreecommitdiffhomepage
path: root/pkg/sentry/inet
diff options
context:
space:
mode:
Diffstat (limited to 'pkg/sentry/inet')
-rw-r--r--pkg/sentry/inet/BUILD20
-rwxr-xr-xpkg/sentry/inet/inet_state_autogen.go40
-rwxr-xr-x[-rw-r--r--]pkg/sentry/inet/namespace.go0
3 files changed, 40 insertions, 20 deletions
diff --git a/pkg/sentry/inet/BUILD b/pkg/sentry/inet/BUILD
deleted file mode 100644
index 07bf39fed..000000000
--- a/pkg/sentry/inet/BUILD
+++ /dev/null
@@ -1,20 +0,0 @@
-load("//tools:defs.bzl", "go_library")
-
-package(
- default_visibility = ["//:sandbox"],
- licenses = ["notice"],
-)
-
-go_library(
- name = "inet",
- srcs = [
- "context.go",
- "inet.go",
- "namespace.go",
- "test_stack.go",
- ],
- deps = [
- "//pkg/context",
- "//pkg/tcpip/stack",
- ],
-)
diff --git a/pkg/sentry/inet/inet_state_autogen.go b/pkg/sentry/inet/inet_state_autogen.go
new file mode 100755
index 000000000..97047d993
--- /dev/null
+++ b/pkg/sentry/inet/inet_state_autogen.go
@@ -0,0 +1,40 @@
+// automatically generated by stateify.
+
+package inet
+
+import (
+ "gvisor.dev/gvisor/pkg/state"
+)
+
+func (x *TCPBufferSize) beforeSave() {}
+func (x *TCPBufferSize) save(m state.Map) {
+ x.beforeSave()
+ m.Save("Min", &x.Min)
+ m.Save("Default", &x.Default)
+ m.Save("Max", &x.Max)
+}
+
+func (x *TCPBufferSize) afterLoad() {}
+func (x *TCPBufferSize) load(m state.Map) {
+ m.Load("Min", &x.Min)
+ m.Load("Default", &x.Default)
+ m.Load("Max", &x.Max)
+}
+
+func (x *Namespace) beforeSave() {}
+func (x *Namespace) save(m state.Map) {
+ x.beforeSave()
+ m.Save("creator", &x.creator)
+ m.Save("isRoot", &x.isRoot)
+}
+
+func (x *Namespace) load(m state.Map) {
+ m.Load("creator", &x.creator)
+ m.Load("isRoot", &x.isRoot)
+ m.AfterLoad(x.afterLoad)
+}
+
+func init() {
+ state.Register("pkg/sentry/inet.TCPBufferSize", (*TCPBufferSize)(nil), state.Fns{Save: (*TCPBufferSize).save, Load: (*TCPBufferSize).load})
+ state.Register("pkg/sentry/inet.Namespace", (*Namespace)(nil), state.Fns{Save: (*Namespace).save, Load: (*Namespace).load})
+}
diff --git a/pkg/sentry/inet/namespace.go b/pkg/sentry/inet/namespace.go
index c16667e7f..c16667e7f 100644..100755
--- a/pkg/sentry/inet/namespace.go
+++ b/pkg/sentry/inet/namespace.go