summaryrefslogtreecommitdiffhomepage
path: root/pkg/sentry/socket/unix/io.go
diff options
context:
space:
mode:
authorIan Gudger <igudger@google.com>2018-10-17 11:36:32 -0700
committerShentubot <shentubot@google.com>2018-10-17 11:37:51 -0700
commit6cba410df0ea2eabb87bad5074a8a79ed89312b8 (patch)
treef0e67873a5d25b9b241f33b3a128a2a66955afc8 /pkg/sentry/socket/unix/io.go
parent8cbca46b6d99bcf0b2647ffa247b0963f872916b (diff)
Move Unix transport out of netstack
PiperOrigin-RevId: 217557656 Change-Id: I63d27635b1a6c12877279995d2d9847b6a19da9b
Diffstat (limited to 'pkg/sentry/socket/unix/io.go')
-rw-r--r--pkg/sentry/socket/unix/io.go21
1 files changed, 11 insertions, 10 deletions
diff --git a/pkg/sentry/socket/unix/io.go b/pkg/sentry/socket/unix/io.go
index 0ca2e35d0..06333e14b 100644
--- a/pkg/sentry/socket/unix/io.go
+++ b/pkg/sentry/socket/unix/io.go
@@ -16,23 +16,23 @@ package unix
import (
"gvisor.googlesource.com/gvisor/pkg/sentry/safemem"
+ "gvisor.googlesource.com/gvisor/pkg/sentry/socket/unix/transport"
"gvisor.googlesource.com/gvisor/pkg/syserr"
"gvisor.googlesource.com/gvisor/pkg/tcpip"
- "gvisor.googlesource.com/gvisor/pkg/tcpip/transport/unix"
)
-// EndpointWriter implements safemem.Writer that writes to a unix.Endpoint.
+// EndpointWriter implements safemem.Writer that writes to a transport.Endpoint.
//
// EndpointWriter is not thread-safe.
type EndpointWriter struct {
- // Endpoint is the unix.Endpoint to write to.
- Endpoint unix.Endpoint
+ // Endpoint is the transport.Endpoint to write to.
+ Endpoint transport.Endpoint
// Control is the control messages to send.
- Control unix.ControlMessages
+ Control transport.ControlMessages
// To is the endpoint to send to. May be nil.
- To unix.BoundEndpoint
+ To transport.BoundEndpoint
}
// WriteFromBlocks implements safemem.Writer.WriteFromBlocks.
@@ -46,12 +46,13 @@ func (w *EndpointWriter) WriteFromBlocks(srcs safemem.BlockSeq) (uint64, error)
}}.WriteFromBlocks(srcs)
}
-// EndpointReader implements safemem.Reader that reads from a unix.Endpoint.
+// EndpointReader implements safemem.Reader that reads from a
+// transport.Endpoint.
//
// EndpointReader is not thread-safe.
type EndpointReader struct {
- // Endpoint is the unix.Endpoint to read from.
- Endpoint unix.Endpoint
+ // Endpoint is the transport.Endpoint to read from.
+ Endpoint transport.Endpoint
// Creds indicates if credential control messages are requested.
Creds bool
@@ -71,7 +72,7 @@ type EndpointReader struct {
From *tcpip.FullAddress
// Control contains the received control messages.
- Control unix.ControlMessages
+ Control transport.ControlMessages
}
// ReadToBlocks implements safemem.Reader.ReadToBlocks.