Documentation
¶
Overview ¶
Package ipmetadata performs offline ASN and approximate location lookups. It does not resolve names or contact any network service.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func GlobalPrefix ¶
GlobalPrefix reports whether every address in p is global as Global defines it, so that a database never holds a record Lookup cannot reach.
Types ¶
type Databases ¶
type Databases struct {
// contains filtered or unexported fields
}
Databases holds the configured readers. Reload replaces a reader whose file was atomically renamed over; a lookup in progress keeps the reader it started with, which is closed only after that lookup returns. Never rewrite or truncate a mapped file in place.
func (*Databases) Lookup ¶
func (d *Databases) Lookup(address, addressSource string, observedAt int64, optOut bool) wire.AddressMetadata
Lookup accepts literal global addresses only. A hostname is unknown without a DNS lookup. IPv4-mapped IPv6 is treated as IPv4.
func (*Databases) Reload ¶
Reload reopens each configured database whose file is no longer the one it was opened from, typically because a new file was renamed into place. A replacement is validated as at startup before it is swapped in; when it is refused, the previous database stays in use. Lookups made afterwards use the new database; values already looked up keep their own source.
Directories
¶
| Path | Synopsis |
|---|---|
|
Package ris builds the dispatcher's ASN database from RIPE RIS routing data, the method RIPE Atlas uses for a probe's prefix and ASN: an address belongs to the longest prefix announced in BGP, and to that prefix's origin AS.
|
Package ris builds the dispatcher's ASN database from RIPE RIS routing data, the method RIPE Atlas uses for a probe's prefix and ASN: an address belongs to the longest prefix announced in BGP, and to that prefix's origin AS. |