aboutsummaryrefslogtreecommitdiff
path: root/libgo/go/net/ip.go
diff options
context:
space:
mode:
Diffstat (limited to 'libgo/go/net/ip.go')
-rw-r--r--libgo/go/net/ip.go9
1 files changed, 6 insertions, 3 deletions
diff --git a/libgo/go/net/ip.go b/libgo/go/net/ip.go
index 1a1d0e7..9d1223e 100644
--- a/libgo/go/net/ip.go
+++ b/libgo/go/net/ip.go
@@ -31,7 +31,10 @@ const (
// be an IPv4 address.
type IP []byte
-// An IP mask is an IP address.
+// An IPMask is a bitmask that can be used to manipulate
+// IP addresses for IP addressing and routing.
+//
+// See type IPNet and func ParseCIDR for details.
type IPMask []byte
// An IPNet represents an IP network.
@@ -65,8 +68,8 @@ func IPv4Mask(a, b, c, d byte) IPMask {
return p
}
-// CIDRMask returns an IPMask consisting of `ones' 1 bits
-// followed by 0s up to a total length of `bits' bits.
+// CIDRMask returns an IPMask consisting of 'ones' 1 bits
+// followed by 0s up to a total length of 'bits' bits.
// For a mask of this form, CIDRMask is the inverse of IPMask.Size.
func CIDRMask(ones, bits int) IPMask {
if bits != 8*IPv4len && bits != 8*IPv6len {