internal

package
v1.0.4 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jun 21, 2022 License: GPL-3.0 Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ButcherConnections

func ButcherConnections(packetSource *gopacket.PacketSource, handle *pcap.Handle) (err error)

func CheckIpLocal

func CheckIpLocal(ip string) bool

func CombineBpfFilters

func CombineBpfFilters(filters ...string) string

func FindSystemInterfaceForIP

func FindSystemInterfaceForIP(ip string) (interf *pcap.Interface, err error)

func ForgeIPv4RstPacket

func ForgeIPv4RstPacket(
	srcMac net.HardwareAddr,
	dstMac net.HardwareAddr,
	srcIp net.IP,
	dstIp net.IP,
	srcPort layers.TCPPort,
	dstPort layers.TCPPort,
	seq uint32,
) (packet gopacket.Packet, err error)

func ForgeIPv4SynPackage

func ForgeIPv4SynPackage(
	srcIp net.IP,
	dstIp net.IP,
	srcPort layers.TCPPort,
	dstPort layers.TCPPort,
	seq uint32,
) (packet gopacket.Packet, err error)

func ForgeIPv6RstPacket

func ForgeIPv6RstPacket(
	srcMac net.HardwareAddr,
	dstMac net.HardwareAddr,
	srcIp net.IP,
	dstIp net.IP,
	srcPort layers.TCPPort,
	dstPort layers.TCPPort,
	seq uint32,
) (packet gopacket.Packet, err error)

func GetBpfFilter

func GetBpfFilter(host string, srcHost string, dstHost string, srcPort int, dstPort int) (filter string)

func GetPcapHandleWithFilter

func GetPcapHandleWithFilter(interf *pcap.Interface, filter string) (handle *pcap.Handle, err error)

func GetPcapInterfaceForName

func GetPcapInterfaceForName(name string) (interf *pcap.Interface, err error)

func GetSystemInterfaces

func GetSystemInterfaces() []pcap.Interface

Types

This section is empty.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL