package cgo
import "gvisor.dev/gvisor/pkg/sentry/socket/plugin/cgo"
Package cgo provides interfaces definition to interact with third-party network stack. It also implements CGO wrappers to handle Golang arguments to CGO and CGO return values to Golang.
Third-party external network stack will implement interfaces defined in this package in order to be used by gVisor.
Index ¶
- func Accept(handle uint32, addrPtr *byte, lenPtr *uint32) int64
- func Bind(handle uint32, sa []byte) int64
- func Close(handle uint32)
- func Connect(handle uint32, addr []byte) int64
- func EpollCreate() int
- func EpollCtl(epfd int32, op int, handle, events uint32)
- func EpollWait(epfd int32, events []syscall.EpollEvent, n int, us int) int
- func GetPeername(handle uint32, addr []byte, addrlen *uint32) int64
- func GetPtr(bs []byte) unsafe.Pointer
- func Getsockname(handle uint32, addr []byte, addrlen *uint32) int64
- func Getsockopt(handle uint32, l int, n int, val []byte, s int) (int64, int)
- func InitStack(initStr string, fds []int) error
- func Ioctl(handle uint32, cmd uint32, buf []byte) int64
- func Listen(handle uint32, backlog int) int64
- func PreInitStack(pid int) (string, []int, error)
- func Read(handle uint32, buf uintptr, count int) int64
- func Readiness(handle uint32, mask uint64) int64
- func Readv(handle uint32, iovs []syscall.Iovec) int64
- func Recvfrom(handle uint32, buf, addr []byte, flags int) (int64, int)
- func Recvmsg(handle uint32, iovs []syscall.Iovec, addr, control []byte, flags int) (int64, int, int, int)
- func Sendmsg(handle uint32, iovs []syscall.Iovec, addr []byte, flags int) int64
- func Sendto(handle uint32, buf uintptr, count int, flags int, addr []byte) int64
- func Setsockopt(handle uint32, l int, n int, val []byte) int64
- func Shutdown(handle uint32, how int) int64
- func Socket(domain, skType, protocol int) int64
- func Write(handle uint32, buf uintptr, count int) int64
- func Writev(handle uint32, iovs []syscall.Iovec) int64
Functions ¶
func Accept ¶
Accept is a non-cgo stub function.
func Bind ¶
Bind is a non-cgo stub function.
func Close ¶
func Close(handle uint32)
Close is a non-cgo stub function.
func Connect ¶
Connect is a non-cgo stub function.
func EpollCreate ¶
func EpollCreate() int
EpollCreate is a non-cgo stub function.
func EpollCtl ¶
EpollCtl is a non-cgo stub function.
func EpollWait ¶
EpollWait is a non-cgo stub function.
func GetPeername ¶
GetPeername is a non-cgo stub function.
func GetPtr ¶
GetPtr is a non-cgo stub function.
func Getsockname ¶
Getsockname is a non-cgo stub function.
func Getsockopt ¶
Getsockopt is a non-cgo stub function.
func InitStack ¶
InitStack is a non-cgo stub function.
func Ioctl ¶
Ioctl is a non-cgo stub function.
func Listen ¶
Listen is a non-cgo stub function.
func PreInitStack ¶
PreInitStack is a non-cgo stub function.
func Read ¶
Read is a non-cgo stub function.
func Readiness ¶
Readiness is a non-cgo stub function.
func Readv ¶
Readv is a non-cgo stub function.
func Recvfrom ¶
Recvfrom is a non-cgo stub function.
func Recvmsg ¶
func Recvmsg(handle uint32, iovs []syscall.Iovec, addr, control []byte, flags int) (int64, int, int, int)
Recvmsg is a non-cgo stub function.
func Sendmsg ¶
Sendmsg is a non-cgo stub function.
func Sendto ¶
Sendto is a non-cgo stub function.
func Setsockopt ¶
Setsockopt is a non-cgo stub function.
func Shutdown ¶
Shutdown is a non-cgo stub function.
func Socket ¶
Socket is a non-cgo stub function.
func Write ¶
Write is a non-cgo stub function.
func Writev ¶
Writev is a non-cgo stub function.
Source Files ¶
cgo.go nocgo_stub_unsafe.go
- Version
- v0.0.0-20250605235530-a6711d1e1dc6 (latest)
- Published
- Jun 5, 2025
- Platform
- linux/amd64
- Imports
- 2 packages
- Last checked
- 4 hours ago –
Tools for package owners.