Documentation ¶
Overview ¶
Package muxed provides a muxed link endpoints.
Index ¶
- type InjectableEndpoint
- func (m *InjectableEndpoint) Attach(dispatcher stack.NetworkDispatcher)
- func (m *InjectableEndpoint) Capabilities() stack.LinkEndpointCapabilities
- func (m *InjectableEndpoint) Inject(protocol tcpip.NetworkProtocolNumber, vv buffer.VectorisedView)
- func (m *InjectableEndpoint) IsAttached() bool
- func (m *InjectableEndpoint) LinkAddress() tcpip.LinkAddress
- func (m *InjectableEndpoint) MTU() uint32
- func (m *InjectableEndpoint) MaxHeaderLength() uint16
- func (m *InjectableEndpoint) Wait()
- func (m *InjectableEndpoint) WritePacket(r *stack.Route, _ *stack.GSO, hdr buffer.Prependable, ...) *tcpip.Error
- func (m *InjectableEndpoint) WriteRawPacket(dest tcpip.Address, packet []byte) *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).
func NewInjectableEndpoint ¶
func NewInjectableEndpoint(routes map[tcpip.Address]stack.InjectableLinkEndpoint) *InjectableEndpoint
NewInjectableEndpoint creates a new multi-endpoint injectable endpoint.
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) Inject ¶
func (m *InjectableEndpoint) Inject(protocol tcpip.NetworkProtocolNumber, vv buffer.VectorisedView)
Inject implements stack.InjectableLinkEndpoint.
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) Wait ¶
func (m *InjectableEndpoint) Wait()
Wait implements stack.LinkEndpoint.Wait.
func (*InjectableEndpoint) WritePacket ¶
func (m *InjectableEndpoint) WritePacket(r *stack.Route, _ *stack.GSO, hdr buffer.Prependable, payload buffer.VectorisedView, protocol tcpip.NetworkProtocolNumber) *tcpip.Error
WritePacket writes outbound packets to the appropriate LinkInjectableEndpoint based on the RemoteAddress. HandleLocal only works if r.RemoteAddress has a route registered in this endpoint.
func (*InjectableEndpoint) WriteRawPacket ¶
WriteRawPacket writes outbound packets to the appropriate LinkInjectableEndpoint based on the dest address.