Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type DhcpRequest ¶
type DhcpRequest struct {
MAC net.HardwareAddr
}
DhcpRequest is a simple DHCP request
func NewDhcpRequest ¶
func NewDhcpRequest(MAC net.HardwareAddr) *DhcpRequest
NewDhcpRequest constructs a DHCP request
func (*DhcpRequest) Bytes ¶
func (d *DhcpRequest) Bytes() []byte
Bytes returns the marshalled DHCP request
type Ethernet ¶
type Ethernet struct {
// contains filtered or unexported fields
}
Ethernet requests the creation of a network connection with a given uuid and optional IP
func NewEthernet ¶
NewEthernet creates an Ethernet frame
type EthernetFrame ¶
type EthernetFrame struct { Dst net.HardwareAddr Src net.HardwareAddr Type uint16 Data []byte }
EthernetFrame is an ethernet frame
func NewEthernetFrame ¶
func NewEthernetFrame(Dst, Src net.HardwareAddr, Type uint16) *EthernetFrame
NewEthernetFrame constructs an Ethernet frame
func ParseEthernetFrame ¶
func ParseEthernetFrame(frame []byte) (*EthernetFrame, error)
ParseEthernetFrame parses the ethernet frame
func (*EthernetFrame) Bytes ¶
func (e *EthernetFrame) Bytes() []byte
Bytes returns the marshalled ethernet frame
type InitMessage ¶
type InitMessage struct {
// contains filtered or unexported fields
}
InitMessage is used for the initial version exchange
func (*InitMessage) String ¶
func (m *InitMessage) String() string
String returns a human-readable string.
type Ipv4 ¶
Ipv4 is an IPv4 frame
func (*Ipv4) HeaderBytes ¶
HeaderBytes returns the marshalled form of the IPv4 header
type PcapWriter ¶
type PcapWriter struct {
// contains filtered or unexported fields
}
PcapWriter writes pcap-formatted packet streams
func NewPcapWriter ¶
func NewPcapWriter(w io.Writer) (*PcapWriter, error)
NewPcapWriter creates a PcapWriter and writes the initial header
func (*PcapWriter) Write ¶
func (p *PcapWriter) Write(packet []byte) error
Write appends a packet with a pcap-format header
type Vif ¶
type Vif struct { MTU uint16 MaxPacketSize uint16 ClientMAC net.HardwareAddr IP net.IP // contains filtered or unexported fields }
Vif represents an Ethernet device
type Vmnet ¶
type Vmnet struct {
// contains filtered or unexported fields
}
Vmnet describes a "vmnet protocol" connection which allows ethernet frames to be sent to and received by vpnkit.
func (*Vmnet) ConnectVif ¶
ConnectVif returns a connected network interface with the given uuid.