Documentation
¶
Index ¶
- Variables
- type Config
- func (*Config) Descriptor() ([]byte, []int)deprecated
- func (x *Config) GetEnablePromiscuousMode() bool
- func (x *Config) GetEnableSpoofing() bool
- func (x *Config) GetIps() []*routercommon.CIDR
- func (x *Config) GetMtu() uint32
- func (x *Config) GetPreferIpv6ForUdp() bool
- func (x *Config) GetRoutes() []*routercommon.CIDR
- func (x *Config) GetSocketSettings() *internet.SocketConfig
- func (x *Config) GetUserLevel() uint32
- func (*Config) ProtoMessage()
- func (x *Config) ProtoReflect() protoreflect.Message
- func (x *Config) Reset()
- func (x *Config) String() string
- type NetworkLayerDeviceToGvisorLinkEndpointAdaptor
- func (n *NetworkLayerDeviceToGvisorLinkEndpointAdaptor) ARPHardwareType() header.ARPHardwareType
- func (n *NetworkLayerDeviceToGvisorLinkEndpointAdaptor) AddHeader(_ *stack.PacketBuffer)
- func (n *NetworkLayerDeviceToGvisorLinkEndpointAdaptor) Attach(dispatcher stack.NetworkDispatcher)
- func (n *NetworkLayerDeviceToGvisorLinkEndpointAdaptor) Capabilities() stack.LinkEndpointCapabilities
- func (n *NetworkLayerDeviceToGvisorLinkEndpointAdaptor) Close()
- func (n *NetworkLayerDeviceToGvisorLinkEndpointAdaptor) IsAttached() bool
- func (n *NetworkLayerDeviceToGvisorLinkEndpointAdaptor) LinkAddress() tcpip.LinkAddress
- func (n *NetworkLayerDeviceToGvisorLinkEndpointAdaptor) MTU() uint32
- func (n *NetworkLayerDeviceToGvisorLinkEndpointAdaptor) MaxHeaderLength() uint16
- func (n *NetworkLayerDeviceToGvisorLinkEndpointAdaptor) ParseHeader(_ *stack.PacketBuffer) bool
- func (n *NetworkLayerDeviceToGvisorLinkEndpointAdaptor) SetLinkAddress(_ tcpip.LinkAddress)
- func (n *NetworkLayerDeviceToGvisorLinkEndpointAdaptor) SetMTU(mtu uint32)
- func (n *NetworkLayerDeviceToGvisorLinkEndpointAdaptor) SetOnCloseAction(f func())
- func (n *NetworkLayerDeviceToGvisorLinkEndpointAdaptor) Wait()
- func (n *NetworkLayerDeviceToGvisorLinkEndpointAdaptor) WritePackets(list stack.PacketBufferList) (int, tcpip.Error)
- type WrappedStack
- func (w *WrappedStack) Close() error
- func (w *WrappedStack) CreateStackFromNetworkLayerDevice(packetSwitchDevice packetswitch.NetworkLayerDevice) error
- func (w *WrappedStack) DialTCP(ctx context.Context, remoteAddress net.Destination) (net.Conn, error)
- func (w *WrappedStack) ListenUDP(ctx context.Context, localAddress net.Destination) (net.PacketConn, error)
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) GetEnablePromiscuousMode ¶
func (*Config) GetEnableSpoofing ¶
func (*Config) GetIps ¶
func (x *Config) GetIps() []*routercommon.CIDR
func (*Config) GetPreferIpv6ForUdp ¶
func (*Config) GetRoutes ¶
func (x *Config) GetRoutes() []*routercommon.CIDR
func (*Config) GetSocketSettings ¶
func (x *Config) GetSocketSettings() *internet.SocketConfig
func (*Config) GetUserLevel ¶
func (*Config) ProtoMessage ¶
func (*Config) ProtoMessage()
func (*Config) ProtoReflect ¶
func (x *Config) ProtoReflect() protoreflect.Message
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 (n *NetworkLayerDeviceToGvisorLinkEndpointAdaptor) ARPHardwareType() header.ARPHardwareType
func (*NetworkLayerDeviceToGvisorLinkEndpointAdaptor) AddHeader ¶
func (n *NetworkLayerDeviceToGvisorLinkEndpointAdaptor) AddHeader(_ *stack.PacketBuffer)
func (*NetworkLayerDeviceToGvisorLinkEndpointAdaptor) Attach ¶
func (n *NetworkLayerDeviceToGvisorLinkEndpointAdaptor) Attach(dispatcher stack.NetworkDispatcher)
func (*NetworkLayerDeviceToGvisorLinkEndpointAdaptor) Capabilities ¶
func (n *NetworkLayerDeviceToGvisorLinkEndpointAdaptor) Capabilities() stack.LinkEndpointCapabilities
func (*NetworkLayerDeviceToGvisorLinkEndpointAdaptor) Close ¶
func (n *NetworkLayerDeviceToGvisorLinkEndpointAdaptor) Close()
func (*NetworkLayerDeviceToGvisorLinkEndpointAdaptor) IsAttached ¶
func (n *NetworkLayerDeviceToGvisorLinkEndpointAdaptor) IsAttached() bool
func (*NetworkLayerDeviceToGvisorLinkEndpointAdaptor) LinkAddress ¶
func (n *NetworkLayerDeviceToGvisorLinkEndpointAdaptor) LinkAddress() tcpip.LinkAddress
func (*NetworkLayerDeviceToGvisorLinkEndpointAdaptor) MTU ¶
func (n *NetworkLayerDeviceToGvisorLinkEndpointAdaptor) MTU() uint32
func (*NetworkLayerDeviceToGvisorLinkEndpointAdaptor) MaxHeaderLength ¶
func (n *NetworkLayerDeviceToGvisorLinkEndpointAdaptor) MaxHeaderLength() uint16
func (*NetworkLayerDeviceToGvisorLinkEndpointAdaptor) ParseHeader ¶
func (n *NetworkLayerDeviceToGvisorLinkEndpointAdaptor) ParseHeader(_ *stack.PacketBuffer) bool
func (*NetworkLayerDeviceToGvisorLinkEndpointAdaptor) SetLinkAddress ¶
func (n *NetworkLayerDeviceToGvisorLinkEndpointAdaptor) SetLinkAddress(_ tcpip.LinkAddress)
func (*NetworkLayerDeviceToGvisorLinkEndpointAdaptor) SetMTU ¶
func (n *NetworkLayerDeviceToGvisorLinkEndpointAdaptor) SetMTU(mtu uint32)
func (*NetworkLayerDeviceToGvisorLinkEndpointAdaptor) SetOnCloseAction ¶
func (n *NetworkLayerDeviceToGvisorLinkEndpointAdaptor) SetOnCloseAction(f func())
func (*NetworkLayerDeviceToGvisorLinkEndpointAdaptor) Wait ¶
func (n *NetworkLayerDeviceToGvisorLinkEndpointAdaptor) Wait()
func (*NetworkLayerDeviceToGvisorLinkEndpointAdaptor) WritePackets ¶
func (n *NetworkLayerDeviceToGvisorLinkEndpointAdaptor) WritePackets(list stack.PacketBufferList) (int, tcpip.Error)
type WrappedStack ¶
type WrappedStack struct {
// contains filtered or unexported fields
}
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
Click to show internal directories.
Click to hide internal directories.