osutil

package
v0.0.3 Latest Latest
Warning

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

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

Documentation

Index

Constants

View Source
const (
	// LeasesPath is the path to dhcpd leases
	LeasesPath = "/var/db/dhcpd_leases"
)
View Source
const UnixPathMax = 108

UnixPathMax is the value of UNIX_PATH_MAX.

Variables

This section is empty.

Functions

func GetIPFromMac

func GetIPFromMac(mac string) (string, error)

GetIPAddressByMACAddress gets the IP address of a MAC address

func MacVZUser

func MacVZUser(warn bool) (*user.User, error)

func TrimMACAddress

func TrimMACAddress(macAddress string) string

TrimMacAddress trimming "0" of the ten's digit

Types

type DHCPEntry

type DHCPEntry struct {
	Name      string
	IPAddress string
	HWAddress string
	ID        string
	Lease     string
}

DHCPEntry holds a parsed DNS entry

type Group

type Group struct {
	Name string
	Gid  uint32
}

func LookupGroup

func LookupGroup(name string) (Group, error)

type User

type User struct {
	User  string
	Uid   uint32
	Group string
	Gid   uint32
}

func LookupUser

func LookupUser(name string) (User, error)

Jump to

Keyboard shortcuts

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