Closed ojdo closed 2 years ago
No, there isn't a way to query by ASN. The database is only indexed by IP address. As you suggest, you can use the Networks
function to (inefficiently) create such a map yourself using something like db.Networks(maxminddb.SkipAliasedNetworks)
.
Currenty I only retrieve the
AutonomousSystemNumber uint
at one point in a longer date pipeline which aggregates over multiple IPs. Is there a "decent" way to query the database with the above number and return the correspondingAutonomousSystemOrganization string
?I would be fine with just iterating over the whole file, but so far I only could identify the
Networks
-oriented traverse functionality.Is there an elegant way to accomplish this?