package pipe
import "gvisor.dev/gvisor/pkg/tcpip/link/pipe"
Package pipe provides the implementation of pipe-like data-link layer endpoints. Such endpoints allow packets to be sent between two interfaces.
Index ¶
- func New(linkAddr1, linkAddr2 tcpip.LinkAddress, mtu uint32) (*Endpoint, *Endpoint)
- type Endpoint
- func (*Endpoint) ARPHardwareType() header.ARPHardwareType
- func (*Endpoint) AddHeader(*stack.PacketBuffer)
- func (e *Endpoint) Attach(dispatcher stack.NetworkDispatcher)
- func (*Endpoint) Capabilities() stack.LinkEndpointCapabilities
- func (e *Endpoint) Close()
- func (e *Endpoint) IsAttached() bool
- func (e *Endpoint) LinkAddress() tcpip.LinkAddress
- func (e *Endpoint) MTU() uint32
- func (*Endpoint) MaxHeaderLength() uint16
- func (*Endpoint) ParseHeader(*stack.PacketBuffer) bool
- func (e *Endpoint) SetLinkAddress(addr tcpip.LinkAddress)
- func (e *Endpoint) SetMTU(mtu uint32)
- func (*Endpoint) SetOnCloseAction(func())
- func (*Endpoint) Wait()
- func (e *Endpoint) WritePackets(pkts stack.PacketBufferList) (int, tcpip.Error)
Functions ¶
func New ¶
func New(linkAddr1, linkAddr2 tcpip.LinkAddress, mtu uint32) (*Endpoint, *Endpoint)
New returns both ends of a new pipe.
Types ¶
type Endpoint ¶
type Endpoint struct {
// contains filtered or unexported fields
}
Endpoint is one end of a pipe.
+stateify savable
func (*Endpoint) ARPHardwareType ¶
func (*Endpoint) ARPHardwareType() header.ARPHardwareType
ARPHardwareType implements stack.LinkEndpoint.
func (*Endpoint) AddHeader ¶
func (*Endpoint) AddHeader(*stack.PacketBuffer)
AddHeader implements stack.LinkEndpoint.
func (*Endpoint) Attach ¶
func (e *Endpoint) Attach(dispatcher stack.NetworkDispatcher)
Attach implements stack.LinkEndpoint.
func (*Endpoint) Capabilities ¶
func (*Endpoint) Capabilities() stack.LinkEndpointCapabilities
Capabilities implements stack.LinkEndpoint.
func (*Endpoint) Close ¶
func (e *Endpoint) Close()
Close implements stack.LinkEndpoint.
func (*Endpoint) IsAttached ¶
IsAttached implements stack.LinkEndpoint.
func (*Endpoint) LinkAddress ¶
func (e *Endpoint) LinkAddress() tcpip.LinkAddress
LinkAddress implements stack.LinkEndpoint.
func (*Endpoint) MTU ¶
MTU implements stack.LinkEndpoint.
func (*Endpoint) MaxHeaderLength ¶
MaxHeaderLength implements stack.LinkEndpoint.
func (*Endpoint) ParseHeader ¶
func (*Endpoint) ParseHeader(*stack.PacketBuffer) bool
ParseHeader implements stack.LinkEndpoint.
func (*Endpoint) SetLinkAddress ¶
func (e *Endpoint) SetLinkAddress(addr tcpip.LinkAddress)
SetLinkAddress implements stack.LinkEndpoint.
func (*Endpoint) SetMTU ¶
SetMTU implements stack.LinkEndpoint.
func (*Endpoint) SetOnCloseAction ¶
func (*Endpoint) SetOnCloseAction(func())
SetOnCloseAction implements stack.LinkEndpoint.SetOnCloseAction.
func (*Endpoint) Wait ¶
func (*Endpoint) Wait()
Wait implements stack.LinkEndpoint.
func (*Endpoint) WritePackets ¶
WritePackets implements stack.LinkEndpoint.
Source Files ¶
pipe.go
- Version
- v0.0.0-20250605235530-a6711d1e1dc6 (latest)
- Published
- Jun 5, 2025
- Platform
- linux/amd64
- Imports
- 3 packages
- Last checked
- 4 hours ago –
Tools for package owners.