device

package
v0.0.6 Latest Latest
Warning

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

Go to latest
Published: Apr 8, 2022 License: MIT Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetIpv4Devices

func GetIpv4Devices() (keys []string, data map[string]net.IP)

func PcapInit

func PcapInit(devicename string) (*pcap.Handle, error)

Types

type EtherTable

type EtherTable struct {
	SrcIp  net.IP  `yaml:"src_ip"`
	Device string  `yaml:"device"`
	SrcMac SelfMac `yaml:"src_mac"`
	DstMac SelfMac `yaml:"dst_mac"`
}

func AutoGetDevices

func AutoGetDevices() *EtherTable

type SelfMac

type SelfMac net.HardwareAddr

func (SelfMac) HardwareAddr

func (d SelfMac) HardwareAddr() net.HardwareAddr

func (SelfMac) MarshalYAML

func (d SelfMac) MarshalYAML() (interface{}, error)

func (SelfMac) String

func (d SelfMac) String() string

Jump to

Keyboard shortcuts

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