Documentation ¶
Overview ¶
Package muxed provides a muxed link endpoints.
Index ¶
- type InjectableEndpoint
- func (*InjectableEndpoint) ARPHardwareType() header.ARPHardwareType
- func (*InjectableEndpoint) AddHeader(*stack.PacketBuffer)
- func (m *InjectableEndpoint) Attach(dispatcher stack.NetworkDispatcher)
- func (m *InjectableEndpoint) Capabilities() stack.LinkEndpointCapabilities
- func (*InjectableEndpoint) Close()
- func (m *InjectableEndpoint) InjectInbound(protocol tcpip.NetworkProtocolNumber, pkt *stack.PacketBuffer)
- func (m *InjectableEndpoint) InjectOutbound(dest tcpip.Address, packet *buffer.View) tcpip.Error
- func (m *InjectableEndpoint) IsAttached() bool
- func (m *InjectableEndpoint) LinkAddress() tcpip.LinkAddress
- func (m *InjectableEndpoint) MTU() uint32
- func (m *InjectableEndpoint) MaxHeaderLength() uint16
- func (*InjectableEndpoint) ParseHeader(*stack.PacketBuffer) bool
- func (m *InjectableEndpoint) SetLinkAddress(tcpip.LinkAddress)
- func (m *InjectableEndpoint) SetMTU(mtu uint32)
- func (*InjectableEndpoint) SetOnCloseAction(func())
- func (m *InjectableEndpoint) StateFields() []string
- func (m *InjectableEndpoint) StateLoad(ctx context.Context, stateSourceObject state.Source)
- func (m *InjectableEndpoint) StateSave(stateSinkObject state.Sink)
- func (m *InjectableEndpoint) StateTypeName() string
- func (m *InjectableEndpoint) Wait()
- func (m *InjectableEndpoint) WritePackets(pkts stack.PacketBufferList) (int, tcpip.Error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type InjectableEndpoint ¶
type InjectableEndpoint struct {
// contains filtered or unexported fields
}
InjectableEndpoint is an injectable multi endpoint. The endpoint has trivial routing rules that determine which InjectableEndpoint a given packet will be written to. Note that HandleLocal works differently for this endpoint (see WritePacket).
+stateify savable
func NewInjectableEndpoint ¶
func NewInjectableEndpoint(routes map[tcpip.Address]stack.InjectableLinkEndpoint) *InjectableEndpoint
NewInjectableEndpoint creates a new multi-endpoint injectable endpoint.
func (*InjectableEndpoint) ARPHardwareType ¶
func (*InjectableEndpoint) ARPHardwareType() header.ARPHardwareType
ARPHardwareType implements stack.LinkEndpoint.ARPHardwareType.
func (*InjectableEndpoint) AddHeader ¶
func (*InjectableEndpoint) AddHeader(*stack.PacketBuffer)
AddHeader implements stack.LinkEndpoint.AddHeader.
func (*InjectableEndpoint) Attach ¶
func (m *InjectableEndpoint) Attach(dispatcher stack.NetworkDispatcher)
Attach implements stack.LinkEndpoint.
func (*InjectableEndpoint) Capabilities ¶
func (m *InjectableEndpoint) Capabilities() stack.LinkEndpointCapabilities
Capabilities implements stack.LinkEndpoint.
func (*InjectableEndpoint) Close ¶
func (*InjectableEndpoint) Close()
Close implements stack.LinkEndpoint.
func (*InjectableEndpoint) InjectInbound ¶
func (m *InjectableEndpoint) InjectInbound(protocol tcpip.NetworkProtocolNumber, pkt *stack.PacketBuffer)
InjectInbound implements stack.InjectableLinkEndpoint.
func (*InjectableEndpoint) InjectOutbound ¶
InjectOutbound writes outbound packets to the appropriate LinkInjectableEndpoint based on the dest address.
func (*InjectableEndpoint) IsAttached ¶
func (m *InjectableEndpoint) IsAttached() bool
IsAttached implements stack.LinkEndpoint.
func (*InjectableEndpoint) LinkAddress ¶
func (m *InjectableEndpoint) LinkAddress() tcpip.LinkAddress
LinkAddress implements stack.LinkEndpoint.
func (*InjectableEndpoint) MTU ¶
func (m *InjectableEndpoint) MTU() uint32
MTU implements stack.LinkEndpoint.
func (*InjectableEndpoint) MaxHeaderLength ¶
func (m *InjectableEndpoint) MaxHeaderLength() uint16
MaxHeaderLength implements stack.LinkEndpoint.
func (*InjectableEndpoint) ParseHeader ¶
func (*InjectableEndpoint) ParseHeader(*stack.PacketBuffer) bool
ParseHeader implements stack.LinkEndpoint.ParseHeader.
func (*InjectableEndpoint) SetLinkAddress ¶
func (m *InjectableEndpoint) SetLinkAddress(tcpip.LinkAddress)
SetLinkAddress implements stack.LinkEndpoint.SetLinkAddress.
func (*InjectableEndpoint) SetMTU ¶
func (m *InjectableEndpoint) SetMTU(mtu uint32)
SetMTU implements stack.LinkEndpoint.
func (*InjectableEndpoint) SetOnCloseAction ¶
func (*InjectableEndpoint) SetOnCloseAction(func())
SetOnCloseAction implements stack.LinkEndpoint.SetOnCloseAction.
func (*InjectableEndpoint) StateFields ¶
func (m *InjectableEndpoint) StateFields() []string
func (*InjectableEndpoint) StateLoad ¶
func (m *InjectableEndpoint) StateLoad(ctx context.Context, stateSourceObject state.Source)
+checklocksignore
func (*InjectableEndpoint) StateSave ¶
func (m *InjectableEndpoint) StateSave(stateSinkObject state.Sink)
+checklocksignore
func (*InjectableEndpoint) StateTypeName ¶
func (m *InjectableEndpoint) StateTypeName() string
func (*InjectableEndpoint) Wait ¶
func (m *InjectableEndpoint) Wait()
Wait implements stack.LinkEndpoint.Wait.
func (*InjectableEndpoint) WritePackets ¶
func (m *InjectableEndpoint) WritePackets(pkts stack.PacketBufferList) (int, tcpip.Error)
WritePackets writes outbound packets to the appropriate LinkInjectableEndpoint based on the RemoteAddress. HandleLocal only works if pkt.EgressRoute.RemoteAddress has a route registered in this endpoint.