pkgnet

package
v0.0.0-...-1f64b99 Latest Latest
Warning

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

Go to latest
Published: Mar 25, 2023 License: MIT Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func BroadcastIPAddress

func BroadcastIPAddress(network *net.IPNet) net.IP

BroadcastIPAddress returns the broadcast IP address for the given network, which is obtained by bitwise OR'ing the network IP address with the negated mask, i.e. by basically turning on the mask's zero bits in the network IP address.

Example: 1.1.1.0/24 => 1.1.1.255

func ParseNetworkCIDR

func ParseNetworkCIDR(s string) (*net.IPNet, error)

ParseNetworkCIDR uses net.ParseCIDR() but returns an error if the returned IP address is not equal the network IP address.

Types

This section is empty.

Jump to

Keyboard shortcuts

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