host

package
v0.0.6 Latest Latest
Warning

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

Go to latest
Published: Mar 9, 2020 License: MIT Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Host

type Host struct {
	IP  string
	MAC string
	// contains filtered or unexported fields
}

Host struct host information about discovered network client

func (*Host) ID

func (h *Host) ID() string

ID will generate unique MD5 hash of host by his properties and cache generated hash for future usage

type Scanner

type Scanner struct {
	Error error
	// contains filtered or unexported fields
}

Scanner provide container for control local network scanning process and checking results

func NewScanner

func NewScanner() *Scanner

NewScanner will initialise new instance of Scanner

func (*Scanner) Ctx added in v0.0.6

Ctx wrap given context and return new with cancel func

func (*Scanner) Hosts

func (s *Scanner) Hosts() <-chan *Host

Hosts will return a read only channel to receive found Host

func (*Scanner) Scan

func (s *Scanner) Scan()

Scan will detect system interfaces and go over each one to detect IP addresses to read/write ARP packets Blocked until every interfaces unable to write packets or stop call so typically should be run as a goroutine

Jump to

Keyboard shortcuts

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