oschwald / maxminddb-golang

MaxMind DB Reader for Go

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Provide "netmask" information

abh opened this issue · comments

In the legacy API I could use GeoIP_last_netmask to get the netmask that the data covered.

For my application (EDNS-CLIENT-SUBNET support in a DNS server) this is very helpful.

I'd be happy to accept a PR that returned the prefix length as part of a new method, similar to this one from the C# API. The prefix length is already calculated, more or less, here as i.