gvisorstack

package
v5.54.2 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Sep 22, 2026 License: MIT Imports: 26 Imported by: 1 module, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Index

Constants

This section is empty.

Variables

View Source
var File_common_packetswitch_gvisorstack_config_proto protoreflect.FileDescriptor

Functions

This section is empty.

Types

type Config

type Config struct {
	Mtu                   uint32                 `protobuf:"varint,2,opt,name=mtu,proto3" json:"mtu,omitempty"`
	UserLevel             uint32                 `protobuf:"varint,3,opt,name=user_level,json=userLevel,proto3" json:"user_level,omitempty"`
	Ips                   []*routercommon.CIDR   `protobuf:"bytes,6,rep,name=ips,proto3" json:"ips,omitempty"`
	Routes                []*routercommon.CIDR   `protobuf:"bytes,7,rep,name=routes,proto3" json:"routes,omitempty"`
	EnablePromiscuousMode bool                   `` /* 127-byte string literal not displayed */
	EnableSpoofing        bool                   `protobuf:"varint,9,opt,name=enable_spoofing,json=enableSpoofing,proto3" json:"enable_spoofing,omitempty"`
	SocketSettings        *internet.SocketConfig `protobuf:"bytes,10,opt,name=socket_settings,json=socketSettings,proto3" json:"socket_settings,omitempty"`
	PreferIpv6ForUdp      bool                   `protobuf:"varint,11,opt,name=prefer_ipv6_for_udp,json=preferIpv6ForUdp,proto3" json:"prefer_ipv6_for_udp,omitempty"`
	DualStackUdp          bool                   `protobuf:"varint,12,opt,name=dual_stack_udp,json=dualStackUdp,proto3" json:"dual_stack_udp,omitempty"`
	TcpListener           []*TCPListener         `protobuf:"bytes,13,rep,name=tcp_listener,json=tcpListener,proto3" json:"tcp_listener,omitempty"`
	// contains filtered or unexported fields
}

func (*Config) Descriptor deprecated

func (*Config) Descriptor() ([]byte, []int)

Deprecated: Use Config.ProtoReflect.Descriptor instead.

func (*Config) GetDualStackUdp added in v5.48.0

func (x *Config) GetDualStackUdp() bool

func (*Config) GetEnablePromiscuousMode

func (x *Config) GetEnablePromiscuousMode() bool

func (*Config) GetEnableSpoofing

func (x *Config) GetEnableSpoofing() bool

func (*Config) GetIps

func (x *Config) GetIps() []*routercommon.CIDR

func (*Config) GetMtu

func (x *Config) GetMtu() uint32

func (*Config) GetPreferIpv6ForUdp

func (x *Config) GetPreferIpv6ForUdp() bool

func (*Config) GetRoutes

func (x *Config) GetRoutes() []*routercommon.CIDR

func (*Config) GetSocketSettings

func (x *Config) GetSocketSettings() *internet.SocketConfig

func (*Config) GetTcpListener added in v5.48.0

func (x *Config) GetTcpListener() []*TCPListener

func (*Config) GetUserLevel

func (x *Config) GetUserLevel() uint32

func (*Config) ProtoMessage

func (*Config) ProtoMessage()

func (*Config) ProtoReflect

func (x *Config) ProtoReflect() protoreflect.Message

func (*Config) Reset

func (x *Config) Reset()

func (*Config) String

func (x *Config) String() string

type NetworkLayerDeviceToGvisorLinkEndpointAdaptor

type NetworkLayerDeviceToGvisorLinkEndpointAdaptor struct {
	// contains filtered or unexported fields
}

NetworkLayerDeviceToGvisorLinkEndpointAdaptor is primarily machine generated.

func NewNetworkLayerDeviceToGvisorLinkEndpointAdaptor

func NewNetworkLayerDeviceToGvisorLinkEndpointAdaptor(_ context.Context, mtu int, networkLayerSwitch packetswitch.NetworkLayerDevice) *NetworkLayerDeviceToGvisorLinkEndpointAdaptor

func (*NetworkLayerDeviceToGvisorLinkEndpointAdaptor) ARPHardwareType

func (*NetworkLayerDeviceToGvisorLinkEndpointAdaptor) AddHeader

func (*NetworkLayerDeviceToGvisorLinkEndpointAdaptor) Attach

func (*NetworkLayerDeviceToGvisorLinkEndpointAdaptor) Capabilities

func (*NetworkLayerDeviceToGvisorLinkEndpointAdaptor) Close

func (*NetworkLayerDeviceToGvisorLinkEndpointAdaptor) IsAttached

func (*NetworkLayerDeviceToGvisorLinkEndpointAdaptor) LinkAddress

func (*NetworkLayerDeviceToGvisorLinkEndpointAdaptor) MTU

func (*NetworkLayerDeviceToGvisorLinkEndpointAdaptor) MaxHeaderLength

func (*NetworkLayerDeviceToGvisorLinkEndpointAdaptor) ParseHeader

func (*NetworkLayerDeviceToGvisorLinkEndpointAdaptor) SetLinkAddress

func (*NetworkLayerDeviceToGvisorLinkEndpointAdaptor) SetMTU

func (*NetworkLayerDeviceToGvisorLinkEndpointAdaptor) SetOnCloseAction

func (n *NetworkLayerDeviceToGvisorLinkEndpointAdaptor) SetOnCloseAction(f func())

func (*NetworkLayerDeviceToGvisorLinkEndpointAdaptor) Wait

func (*NetworkLayerDeviceToGvisorLinkEndpointAdaptor) WritePackets

type TCPListener added in v5.48.0

type TCPListener struct {
	Port    uint32             `protobuf:"varint,1,opt,name=port,proto3" json:"port,omitempty"`
	Address *routercommon.CIDR `protobuf:"bytes,2,opt,name=address,proto3" json:"address,omitempty"`
	Tag     string             `protobuf:"bytes,3,opt,name=tag,proto3" json:"tag,omitempty"`
	// contains filtered or unexported fields
}

func (*TCPListener) Descriptor deprecated added in v5.48.0

func (*TCPListener) Descriptor() ([]byte, []int)

Deprecated: Use TCPListener.ProtoReflect.Descriptor instead.

func (*TCPListener) GetAddress added in v5.48.0

func (x *TCPListener) GetAddress() *routercommon.CIDR

func (*TCPListener) GetPort added in v5.48.0

func (x *TCPListener) GetPort() uint32

func (*TCPListener) GetTag added in v5.48.0

func (x *TCPListener) GetTag() string

func (*TCPListener) ProtoMessage added in v5.48.0

func (*TCPListener) ProtoMessage()

func (*TCPListener) ProtoReflect added in v5.48.0

func (x *TCPListener) ProtoReflect() protoreflect.Message

func (*TCPListener) Reset added in v5.48.0

func (x *TCPListener) Reset()

func (*TCPListener) String added in v5.48.0

func (x *TCPListener) String() string

type WrappedStack

type WrappedStack struct {
	// contains filtered or unexported fields
}

func NewStack

func NewStack(ctx context.Context, config *Config) (*WrappedStack, error)

func (*WrappedStack) ApplyListeners added in v5.48.0

func (w *WrappedStack) ApplyListeners() error

func (*WrappedStack) Close

func (w *WrappedStack) Close() error

func (*WrappedStack) CreateStackFromNetworkLayerDevice

func (w *WrappedStack) CreateStackFromNetworkLayerDevice(packetSwitchDevice packetswitch.NetworkLayerDevice) error

func (*WrappedStack) CreateStackListener added in v5.48.0

func (w *WrappedStack) CreateStackListener(addr tcpip.FullAddress, netProto tcpip.NetworkProtocolNumber) (*gonet.TCPListener, error)

func (*WrappedStack) DialTCP

func (w *WrappedStack) DialTCP(ctx context.Context, remoteAddress net.Destination) (net.Conn, error)

DialTCP will create a connection to the given destination, using the stack. Machine Generated

func (*WrappedStack) ListenUDP

func (w *WrappedStack) ListenUDP(ctx context.Context, localAddress net.Destination) (net.PacketConn, error)

ListenUDP will create a connection to the given destination, using the stack. Machine Generated

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL