Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func IsBuiltinQEMU ¶ added in v1.30.0
IsBuiltinQEMU returns if network is builtin or the legacy value user.
Types ¶
type Parameters ¶
type Parameters struct { IP string // IP address of network Netmask string // dotted-decimal format ('a.b.c.d') Prefix int // network prefix length (number of leading ones in network mask) CIDR string // CIDR format ('a.b.c.d/n') Gateway string // taken from network interface address or assumed as first network IP address from given addr ClientMin string // second IP address ClientMax string // last IP address before broadcast Broadcast string // last IP address IsPrivate bool // whether the IP is private or not Interface // contains filtered or unexported fields }
Parameters contains main network parameters.
func FreeSubnet ¶
func FreeSubnet(startSubnet string, step, tries int) (*Parameters, error)
FreeSubnet will try to find free private network beginning with startSubnet, incrementing it in steps up to number of tries.
Click to show internal directories.
Click to hide internal directories.