summaryrefslogtreecommitdiffhomepage
path: root/pkg/tcpip/link/tun
diff options
context:
space:
mode:
Diffstat (limited to 'pkg/tcpip/link/tun')
-rw-r--r--pkg/tcpip/link/tun/BUILD25
-rwxr-xr-x[-rw-r--r--]pkg/tcpip/link/tun/device.go0
-rwxr-xr-x[-rw-r--r--]pkg/tcpip/link/tun/protocol.go0
-rwxr-xr-xpkg/tcpip/link/tun/tun_state_autogen.go29
-rwxr-xr-x[-rw-r--r--]pkg/tcpip/link/tun/tun_unsafe.go0
5 files changed, 29 insertions, 25 deletions
diff --git a/pkg/tcpip/link/tun/BUILD b/pkg/tcpip/link/tun/BUILD
deleted file mode 100644
index e0db6cf54..000000000
--- a/pkg/tcpip/link/tun/BUILD
+++ /dev/null
@@ -1,25 +0,0 @@
-load("//tools:defs.bzl", "go_library")
-
-package(licenses = ["notice"])
-
-go_library(
- name = "tun",
- srcs = [
- "device.go",
- "protocol.go",
- "tun_unsafe.go",
- ],
- visibility = ["//visibility:public"],
- deps = [
- "//pkg/abi/linux",
- "//pkg/refs",
- "//pkg/sync",
- "//pkg/syserror",
- "//pkg/tcpip",
- "//pkg/tcpip/buffer",
- "//pkg/tcpip/header",
- "//pkg/tcpip/link/channel",
- "//pkg/tcpip/stack",
- "//pkg/waiter",
- ],
-)
diff --git a/pkg/tcpip/link/tun/device.go b/pkg/tcpip/link/tun/device.go
index f6e301304..f6e301304 100644..100755
--- a/pkg/tcpip/link/tun/device.go
+++ b/pkg/tcpip/link/tun/device.go
diff --git a/pkg/tcpip/link/tun/protocol.go b/pkg/tcpip/link/tun/protocol.go
index 89d9d91a9..89d9d91a9 100644..100755
--- a/pkg/tcpip/link/tun/protocol.go
+++ b/pkg/tcpip/link/tun/protocol.go
diff --git a/pkg/tcpip/link/tun/tun_state_autogen.go b/pkg/tcpip/link/tun/tun_state_autogen.go
new file mode 100755
index 000000000..8b56175e4
--- /dev/null
+++ b/pkg/tcpip/link/tun/tun_state_autogen.go
@@ -0,0 +1,29 @@
+// automatically generated by stateify.
+
+// +build linux
+
+package tun
+
+import (
+ "gvisor.dev/gvisor/pkg/state"
+)
+
+func (x *Device) save(m state.Map) {
+ x.beforeSave()
+ m.Save("Queue", &x.Queue)
+ m.Save("endpoint", &x.endpoint)
+ m.Save("notifyHandle", &x.notifyHandle)
+ m.Save("flags", &x.flags)
+}
+
+func (x *Device) afterLoad() {}
+func (x *Device) load(m state.Map) {
+ m.Load("Queue", &x.Queue)
+ m.Load("endpoint", &x.endpoint)
+ m.Load("notifyHandle", &x.notifyHandle)
+ m.Load("flags", &x.flags)
+}
+
+func init() {
+ state.Register("pkg/tcpip/link/tun.Device", (*Device)(nil), state.Fns{Save: (*Device).save, Load: (*Device).load})
+}
diff --git a/pkg/tcpip/link/tun/tun_unsafe.go b/pkg/tcpip/link/tun/tun_unsafe.go
index 09ca9b527..09ca9b527 100644..100755
--- a/pkg/tcpip/link/tun/tun_unsafe.go
+++ b/pkg/tcpip/link/tun/tun_unsafe.go