MCPcopy Index your code
hub / github.com/tailscale/tailscale / ipPrefixToAddressWithPrefix

Function ipPrefixToAddressWithPrefix

wgengine/netstack/netstack.go:691–696  ·  view source on GitHub ↗
(ipp netip.Prefix)

Source from the content-addressed store, hash-verified

689}
690
691func ipPrefixToAddressWithPrefix(ipp netip.Prefix) tcpip.AddressWithPrefix {
692 return tcpip.AddressWithPrefix{
693 Address: tcpip.AddrFromSlice(ipp.Addr().AsSlice()),
694 PrefixLen: int(ipp.Bits()),
695 }
696}
697
698var v4broadcast = netaddr.IPv4(255, 255, 255, 255)
699

Callers 1

UpdateNetstackIPsMethod · 0.85

Calls 2

AsSliceMethod · 0.45
AddrMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…