Next: Introduction, Previous: (dir), Up: (dir) [Contents][Index]
This is the cl-maxminddb Reference Manual, version 0.0.1.3, generated automatically by Declt version 4.0 beta 2 "William Riker" on Mon Aug 15 03:48:47 2022 GMT+0.
Next: Systems, Previous: The cl-maxminddb Reference Manual, Up: The cl-maxminddb Reference Manual [Contents][Index]
CL-MAXMINDDB is MaxMind DB files reader.
> (with-mmdb (mmdb "/var/lib/GeoIP/GeoLite2-City.mmdb")
(mmdb-query mmdb "8.8.8.8"))
((:CONTINENT (:CODE . "NA") (:GEONAME-ID . 6255149)
(:NAMES (:DE . "Nordamerika") (:EN . "North America") (:ES . "Norteamérica")
(:FR . "Amérique du Nord") (:JA . "北アメリカ") (:PT-BR . "América do Norte")
(:RU . "Северная Америка") (:ZH-CN . "北美洲")))
(:COUNTRY (:GEONAME-ID . 6252001) (:ISO-CODE . "US")
(:NAMES (:DE . "USA") (:EN . "United States") (:ES . "Estados Unidos")
(:FR . "États-Unis") (:JA . "アメリカ合衆国") (:PT-BR . "Estados Unidos")
(:RU . "США") (:ZH-CN . "美国")))
(:LOCATION (:ACCURACY-RADIUS . 1000) (:LATITUDE . 37.751d0)
(:LONGITUDE . -97.822d0) (:TIME-ZONE . "America/Chicago"))
(:REGISTERED-COUNTRY (:GEONAME-ID . 6252001) (:ISO-CODE . "US")
(:NAMES (:DE . "USA") (:EN . "United States") (:ES . "Estados Unidos")
(:FR . "États-Unis") (:JA . "アメリカ合衆国") (:PT-BR . "Estados Unidos")
(:RU . "США") (:ZH-CN . "美国"))))
That sets up a new database every time, which is fine for occasional lookups. If you need to do many lookups, the following approach is faster and produces the same result as above:
(defparameter *city-db* (make-mmdb "/var/lib/GeoIP/GeoLite2-City.mmdb"))
(mmdb-query *city-db* "8.8.8.8")
The first approach constructs a new database object, including an mmap of the Maxmind file, and unmaps it with each call. This is slower but doesn't keep the mmap in memory.
The second approach mmaps the file, keeps a permanent reference to the database object, and never unmaps it. This uses more memo
Next: Modules, Previous: Introduction, Up: The cl-maxminddb Reference Manual [Contents][Index]
The main system appears first, followed by any subsystem dependency.
CL MaxMind DB
Azamat S. Kalimoulline <turtle@bazon.ru>
GNU Lesser General Public License, v3
0.0.1.3
src (module).
Next: Files, Previous: Systems, Up: The cl-maxminddb Reference Manual [Contents][Index]
Modules are listed depth-first from the system components tree.
cl-maxminddb (system).
Next: Packages, Previous: Modules, Up: The cl-maxminddb Reference Manual [Contents][Index]
Files are sorted by type and then listed depth-first from the systems components trees.
Next: cl-maxminddb/src/package.lisp, Previous: Lisp, Up: Lisp [Contents][Index]
cl-maxminddb (system).
Next: cl-maxminddb/src/ip.lisp, Previous: cl-maxminddb/cl-maxminddb.asd, Up: Lisp [Contents][Index]
src (module).
Next: cl-maxminddb/src/maxminddb.lisp, Previous: cl-maxminddb/src/package.lisp, Up: Lisp [Contents][Index]
package.lisp (file).
src (module).
Previous: cl-maxminddb/src/ip.lisp, Up: Lisp [Contents][Index]
src (module).
Next: Definitions, Previous: Files, Up: The cl-maxminddb Reference Manual [Contents][Index]
Packages are listed by definition order.
cl-maxminddb
Next: Indexes, Previous: Packages, Up: The cl-maxminddb Reference Manual [Contents][Index]
Definitions are sorted by export status, category, package, and then by lexicographic order.
Next: Internals, Previous: Definitions, Up: Definitions [Contents][Index]
Next: Ordinary functions, Previous: Public Interface, Up: Public Interface [Contents][Index]
Previous: Public Interface, Up: Definitions [Contents][Index]
Next: Ordinary functions, Previous: Internals, Up: Internals [Contents][Index]
Next: Structures, Previous: Special variables, Up: Internals [Contents][Index]
Previous: Ordinary functions, Up: Internals [Contents][Index]
structure-object.
This slot is read-only.
This slot is read-only.
0
This slot is read-only.
fixnum
-1
structure-object.
fixnum
0
This slot is read-only.
fixnum
0
This slot is read-only.
fixnum
0
This slot is read-only.
string
This slot is read-only.
vector
This slot is read-only.
fixnum
0
This slot is read-only.
fixnum
0
This slot is read-only.
fixnum
0
This slot is read-only.
list
This slot is read-only.
Previous: Definitions, Up: The cl-maxminddb Reference Manual [Contents][Index]
Jump to: | (
B C F G L M P R W |
---|
Jump to: | (
B C F G L M P R W |
---|
Next: Data types, Previous: Functions, Up: Indexes [Contents][Index]
Jump to: | *
B D F I L M N P R S |
---|
Jump to: | *
B D F I L M N P R S |
---|
Jump to: | C F I M P R S |
---|
Jump to: | C F I M P R S |
---|