rsocks

package
v0.0.0-...-313d9de Latest Latest
Warning

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

Go to latest
Published: Jul 14, 2024 License: GPL-3.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func FilterARPSourceReply

func FilterARPSourceReply(sender net.IP) []bpf.Instruction

FilterARPSourceReply returns a BPF filter which filters replies from the given sender.

func FilterDhcpOperation

func FilterDhcpOperation(dstPort uint32, op uint8) []bpf.Instruction

FilterDhcpOperation returns a BPF filter which filters for the given DHCP operation.

func GetARPRecvSock

func GetARPRecvSock(iface *net.Interface, filter []bpf.Instruction) (*os.File, error)

GetARPRecvSock returns a raw socket for receiving ARP traffic.

func GetARPSendSock

func GetARPSendSock(iface *net.Interface) (*rssock, error)

GetARPSendSock returns a raw socket for broadcasting ARP requests.

func GetIPRecvSock

func GetIPRecvSock(iface *net.Interface, filter []bpf.Instruction) (*os.File, error)

GetIPRecvSocket returns a raw socket for receiving IP traffic.

func GetIPSendSock

func GetIPSendSock(iface *net.Interface) (*rssock, error)

GetIPSendSock returns a raw socket for sending broadcast IP traffic.

func GetUnicastSendSock

func GetUnicastSendSock(iface *net.Interface, hwaddr net.HardwareAddr) (*rssock, error)

GetUnicastSendSock returns a new raw socket for sending unicast IP traffic.

Types

This section is empty.

Jump to

Keyboard shortcuts

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