Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ByteArrToStr ¶
Types ¶
type Mask ¶
Mask is just a tidy way of storing a netmask
func CidrToMask ¶
CidrToMask converts a slash netmask to a Mask struct
func DottedToMask ¶
DottedToMask converts a dotted netmask to a Mask struct
type NetworkInfo ¶
type NetworkInfo struct { Address []uint8 Netmask Mask Wildcard []uint8 Network []uint8 Broadcast []uint8 HostMinAddress []uint8 HostMaxAddress []uint8 HostsQuantity uint32 }
NetworkInfo contains the result of the CalculateNetwork function
func CalculateNetwork ¶
func CalculateNetwork(ip string, subnet string) NetworkInfo
CalculateNetwork calculates all the infos of a given network
Click to show internal directories.
Click to hide internal directories.