summaryrefslogtreecommitdiffhomepage
path: root/pkg/tcpip/transport/unix
diff options
context:
space:
mode:
authorZhaozhong Ni <nzz@google.com>2018-08-02 10:41:44 -0700
committerShentubot <shentubot@google.com>2018-08-02 10:42:48 -0700
commit57d0fcbdbf7e9d2d573ce8d4ca2f72b82f778d63 (patch)
tree7d09abd7209c47ea68471588531bc06ff4f8655c /pkg/tcpip/transport/unix
parentcf44aff6e08b0e19935d5cd98455b4af98fd8794 (diff)
Automated rollback of changelist 207037226
PiperOrigin-RevId: 207125440 Change-Id: I6c572afb4d693ee72a0c458a988b0e96d191cd49
Diffstat (limited to 'pkg/tcpip/transport/unix')
-rw-r--r--pkg/tcpip/transport/unix/BUILD16
-rw-r--r--pkg/tcpip/transport/unix/connectioned.go2
-rw-r--r--pkg/tcpip/transport/unix/connectionless.go2
-rw-r--r--pkg/tcpip/transport/unix/unix.go11
4 files changed, 16 insertions, 15 deletions
diff --git a/pkg/tcpip/transport/unix/BUILD b/pkg/tcpip/transport/unix/BUILD
index 676f2cf92..dae0bd079 100644
--- a/pkg/tcpip/transport/unix/BUILD
+++ b/pkg/tcpip/transport/unix/BUILD
@@ -1,17 +1,6 @@
package(licenses = ["notice"]) # Apache 2.0
-load("//tools/go_stateify:defs.bzl", "go_library", "go_stateify")
-
-go_stateify(
- name = "unix_state",
- srcs = [
- "connectioned.go",
- "connectionless.go",
- "unix.go",
- ],
- out = "unix_state.go",
- package = "unix",
-)
+load("//tools/go_stateify:defs.bzl", "go_library")
go_library(
name = "unix",
@@ -20,14 +9,11 @@ go_library(
"connectioned_state.go",
"connectionless.go",
"unix.go",
- "unix_state.go",
],
importpath = "gvisor.googlesource.com/gvisor/pkg/tcpip/transport/unix",
visibility = ["//:sandbox"],
deps = [
"//pkg/ilist",
- "//pkg/log",
- "//pkg/state",
"//pkg/tcpip",
"//pkg/tcpip/buffer",
"//pkg/tcpip/transport/queue",
diff --git a/pkg/tcpip/transport/unix/connectioned.go b/pkg/tcpip/transport/unix/connectioned.go
index 0e63186b2..dd7c03cf1 100644
--- a/pkg/tcpip/transport/unix/connectioned.go
+++ b/pkg/tcpip/transport/unix/connectioned.go
@@ -85,6 +85,8 @@ type ConnectingEndpoint interface {
// path != "" && acceptedChan != nil => bound and listening.
//
// Only one of these will be true at any moment.
+//
+// +stateify savable
type connectionedEndpoint struct {
baseEndpoint
diff --git a/pkg/tcpip/transport/unix/connectionless.go b/pkg/tcpip/transport/unix/connectionless.go
index 3276ddcd0..2a6ec8b4b 100644
--- a/pkg/tcpip/transport/unix/connectionless.go
+++ b/pkg/tcpip/transport/unix/connectionless.go
@@ -25,6 +25,8 @@ import (
//
// Specifically, this means datagram unix sockets not created with
// socketpair(2).
+//
+// +stateify savable
type connectionlessEndpoint struct {
baseEndpoint
}
diff --git a/pkg/tcpip/transport/unix/unix.go b/pkg/tcpip/transport/unix/unix.go
index 190a1ccdb..8e4af3139 100644
--- a/pkg/tcpip/transport/unix/unix.go
+++ b/pkg/tcpip/transport/unix/unix.go
@@ -60,6 +60,8 @@ type CredentialsControlMessage interface {
}
// A ControlMessages represents a collection of socket control messages.
+//
+// +stateify savable
type ControlMessages struct {
// Rights is a control message containing FDs.
Rights RightsControlMessage
@@ -235,6 +237,8 @@ type BoundEndpoint interface {
}
// message represents a message passed over a Unix domain socket.
+//
+// +stateify savable
type message struct {
ilist.Entry
@@ -306,6 +310,8 @@ type Receiver interface {
}
// queueReceiver implements Receiver for datagram sockets.
+//
+// +stateify savable
type queueReceiver struct {
readQueue *queue.Queue
}
@@ -369,6 +375,8 @@ func (q *queueReceiver) RecvMaxQueueSize() int64 {
func (*queueReceiver) Release() {}
// streamQueueReceiver implements Receiver for stream sockets.
+//
+// +stateify savable
type streamQueueReceiver struct {
queueReceiver
@@ -579,6 +587,7 @@ type ConnectedEndpoint interface {
Release()
}
+// +stateify savable
type connectedEndpoint struct {
// endpoint represents the subset of the Endpoint functionality needed by
// the connectedEndpoint. It is implemented by both connectionedEndpoint
@@ -671,6 +680,8 @@ func (*connectedEndpoint) Release() {}
// unix domain socket Endpoint implementations.
//
// Not to be used on its own.
+//
+// +stateify savable
type baseEndpoint struct {
*waiter.Queue