Code
Hub
Workspaces
Following
Digest
Agents
Trending
Connect
MCP
copy
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
128
func
prefixToSubnetMask(prefix netip.Prefix) string {
129
maskBytes := net.CIDRMask(prefix.Masked().Bits(), net.IPv4len*8)
130
return
net.IP(maskBytes).String()
131
}
Callers
2
convertRouterConfig
Function · 0.85
convertToIPV4Route
Function · 0.85
Calls
1
String
Method · 0.45
Tested by
no test coverage detected