macsniffer

package
v0.0.0-...-1ad6806 Latest Latest
Warning

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

Go to latest
Published: Apr 12, 2020 License: Apache-2.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func MultipleIpTest

func MultipleIpTest(testResults []SingleTest, expectedResults ClusterNetData)

func SingleIpTest

func SingleIpTest(offeredIp string, expectedIp string, mac string)

Types

type Client

type Client struct {
	HW     net.HardwareAddr
	PeerHw net.HardwareAddr
	IP     net.IP
	IFName string
	// contains filtered or unexported fields
}

func NewClient

func NewClient(macsToCheck []string, ifname, hostname string) (*Client, error)

func (*Client) Start

func (c *Client) Start(testChan chan<- SingleTest, status chan<- int) error

type ClusterNetData

type ClusterNetData struct {
	DNSData   []DNSDataStruct `json:"dns_data"`
	DNSServer string          `json:"dns_server"`
}

type DNSDataStruct

type DNSDataStruct struct {
	MacAddress string `json:"mac_address"`
	PrimaryIP  string `json:"primary_ip"`
}

type FullDNSDataStruct

type FullDNSDataStruct struct {
	Fqdn       string `json:"fqdn"`
	MacAddress string `json:"mac_address"`
	PrimaryIP  string `json:"primary_ip"`
	ReverseDNS string `json:"reverse_dns"`
}

type SingleTest

type SingleTest struct {
	SrcMac     string
	OfferedIp  string
	DhcpServer string
}

Jump to

Keyboard shortcuts

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