gvisorstack

package
v5.46.0 Latest Latest
Warning

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

Go to latest
Published: Feb 20, 2026 License: MIT Imports: 23 Imported by: 0

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"`
	// contains filtered or unexported fields
}

func (*Config) Descriptor deprecated

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

Deprecated: Use Config.ProtoReflect.Descriptor instead.

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) 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 WrappedStack

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

func NewStack

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

func (*WrappedStack) Close

func (w *WrappedStack) Close() error

func (*WrappedStack) CreateStackFromNetworkLayerDevice

func (w *WrappedStack) CreateStackFromNetworkLayerDevice(packetSwitchDevice packetswitch.NetworkLayerDevice) 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