Skip to content

Commit

Permalink
Implement the PacketMMapEndpoint interface for PACKET_MMAP.
Browse files Browse the repository at this point in the history
This code is tested in the subsequent change with syscall tests.

PiperOrigin-RevId: 721861305
  • Loading branch information
manninglucas authored and gvisor-bot committed Jan 31, 2025
1 parent 198ac83 commit 0f88965
Show file tree
Hide file tree
Showing 4 changed files with 713 additions and 0 deletions.
37 changes: 37 additions & 0 deletions pkg/sentry/socket/netstack/packetmmap/BUILD
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
load("//tools:defs.bzl", "go_library")

package(
default_applicable_licenses = ["//:license"],
licenses = ["notice"],
)

go_library(
name = "packetmmap",
srcs = [
"endpoint.go",
"endpoint_state.go",
"ring_buffer.go",
],
visibility = [
"//visibility:public",
],
deps = [
"//pkg/abi/linux",
"//pkg/atomicbitops",
"//pkg/bitmap",
"//pkg/buffer",
"//pkg/context",
"//pkg/errors/linuxerr",
"//pkg/hostarch",
"//pkg/safemem",
"//pkg/sentry/memmap",
"//pkg/sentry/pgalloc",
"//pkg/sentry/socket",
"//pkg/sentry/usage",
"//pkg/sync",
"//pkg/tcpip",
"//pkg/tcpip/header",
"//pkg/tcpip/stack",
"//pkg/waiter",
],
)
Loading

0 comments on commit 0f88965

Please sign in to comment.