generate

command
v1.4.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: May 8, 2026 License: MIT Imports: 10 Imported by: 0

Documentation

Overview

Command generate converts MaxMind GeoLite2-ASN.mmdb to ipasn binary format.

Usage: go run ./ipasn/generate -mmdb path/to/GeoLite2-ASN.mmdb -out ./ipasn

Output files (raw + .gz):

ipv4.bin  sorted end-IPs (uint32 LE x N)
ipv4.idx  parallel array of asn-table indices (uint32 LE x N)
ipv6.bin  sorted end-IPs (uint64 LE pair x N)
ipv6.idx  parallel array of asn-table indices (uint32 LE x N)
asn.bin   deduped ASN records: {asn:u32, org_off:u32, org_len:u16, _pad:u16}
orgs.txt  concatenated org-name bytes

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL