netutil

package
v1.1.0 Latest Latest
Warning

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

Go to latest
Published: Mar 24, 2024 License: GPL-3.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ExpandIPNet

func ExpandIPNet(ipNet *net.IPNet) []net.IP

ExpandIPNet takes a network and returns a slice of all IPs that belong to that network.

func FindNetwork

func FindNetwork() (*net.Interface, *net.IPNet, error)

FindNetwork returns the first active interface and network.

func GetVendor

func GetVendor(macAddress string) (string, bool)

GetVendor returns the vendor for a mac address, and true if it was found in the gopacket database.

func IPNetTooLarge

func IPNetTooLarge(ipNet *net.IPNet) bool

IPNetTooLarge returns true if a network is considered too large to scan.

Anything larger than a /24 is considered too large.

func IsValidMAC

func IsValidMAC(s string) bool

func ParseMACList

func ParseMACList(values string) ([]string, bool)

func UnqualifyHostname

func UnqualifyHostname(hostname string) string

UnqualifyHostname returns a hostname without the domain portion and removes any trailing periods, if any.

Types

This section is empty.

Jump to

Keyboard shortcuts

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