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
-rw-r--r--pkg/tcpip/link/tun/tun_state_autogen.go27
-rw-r--r--pkg/tcpip/link/tun/tun_unsafe_state_autogen.go5
3 files changed, 32 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/tun_state_autogen.go b/pkg/tcpip/link/tun/tun_state_autogen.go
new file mode 100644
index 000000000..4b70647af
--- /dev/null
+++ b/pkg/tcpip/link/tun/tun_state_autogen.go
@@ -0,0 +1,27 @@
+// automatically generated by stateify.
+
+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_state_autogen.go b/pkg/tcpip/link/tun/tun_unsafe_state_autogen.go
new file mode 100644
index 000000000..149299ea3
--- /dev/null
+++ b/pkg/tcpip/link/tun/tun_unsafe_state_autogen.go
@@ -0,0 +1,5 @@
+// automatically generated by stateify.
+
+// +build linux
+
+package tun