Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type DebugCapture ¶ added in v0.1.0
type DebugCapture struct {
// contains filtered or unexported fields
}
DebugCapture handles PCAP capture for debugging
func NewDebugCapture ¶ added in v0.1.0
func NewDebugCapture(targetIP, outputFile string) (*DebugCapture, error)
NewDebugCapture creates a new debug capture instance
func (*DebugCapture) CaptureOutgoingPacket ¶ added in v0.1.0
func (dc *DebugCapture) CaptureOutgoingPacket(data []byte)
CaptureOutgoingPacket captures an outgoing packet with current timestamp
func (*DebugCapture) CapturePacket ¶ added in v0.1.0
func (dc *DebugCapture) CapturePacket(data []byte, ci gopacket.CaptureInfo)
CapturePacket captures a packet if it matches the target IP
func (*DebugCapture) Close ¶ added in v0.1.0
func (dc *DebugCapture) Close()
Close closes the debug capture and waits for all packets to be written
type Device ¶
type Device interface { stack.LinkEndpoint // Name returns the current name of the device. Name() string // Type returns the driver type of the device. Type() string }
Device is the interface that implemented by network layer devices (e.g. tun), and easy to use as stack.LinkEndpoint.
type NetworkConfig ¶ added in v0.1.0
type NetworkConfig struct { Network *net.IPNet LocalIP net.IP LocalMAC net.HardwareAddr MTU uint32 }
NetworkConfig holds the parsed network configuration
type PCAP ¶
type PCAP struct { *ethernet.Endpoint Interface net.Interface // contains filtered or unexported fields }
func (*PCAP) SetHardwareAddr ¶
func (t *PCAP) SetHardwareAddr(srcIP net.IP, srcMAC net.HardwareAddr)
type Stacker ¶
type Stacker interface { AddStaticNeighbor(nicID tcpip.NICID, protocol tcpip.NetworkProtocolNumber, addr tcpip.Address, linkAddr tcpip.LinkAddress) tcpip.Error AddProtocolAddress(id tcpip.NICID, protocolAddress tcpip.ProtocolAddress, properties stack.AddressProperties) tcpip.Error }
Click to show internal directories.
Click to hide internal directories.