The asmap data is currently owned by addrman, but is used by both addrman and connman. #22791 made the data const and private (so that it can’t be updated by other components), but it is still passed out of addrman as a reference to const, and used by CNetAddress
to calculate the group and AS of the net address.
This RFC PR proposes to move all asmap data and logic into a new NetGroupManager
component. This is initialized at startup, and the client components addrman and connman simply call NetGroupManager::GetGroup(const CAddress&)
and NetGroupManager::GetMappedAS(const CAddress&)
to get the net group and AS of an address.