MCPcopy Index your code
hub / github.com/coder/coder / prefixToSubnetMask

Function prefixToSubnetMask

vpn/router.go:128–131  ·  view source on GitHub ↗
(prefix netip.Prefix)

Source from the content-addressed store, hash-verified

126}
127
128func prefixToSubnetMask(prefix netip.Prefix) string {
129 maskBytes := net.CIDRMask(prefix.Masked().Bits(), net.IPv4len*8)
130 return net.IP(maskBytes).String()
131}

Callers 2

convertRouterConfigFunction · 0.85
convertToIPV4RouteFunction · 0.85

Calls 1

StringMethod · 0.45

Tested by

no test coverage detected