Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func GetRandomCIDR ¶
GetRandomCIDR returns a random CIDR with the given mask and not in the blacklist. If the blacklist is empty, it will return a random CIDR with the given mask. This function supports mask 0, 8, 16, 24. If you need more elaborate masks to get more subnets (i.e: 0<mask<32) refactor this to use bitwise operations on the IP.
func GetRandomCIDRInRange ¶
func IsFreePort ¶
IsFreePort checks if a given port is free to use by trying to listen on it.
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.