Next: Introduction, Previous: (dir), Up: (dir) [Contents][Index]
This is the cl-geoip Reference Manual, generated automatically by Declt version 4.0 beta 2 "William Riker" on Mon Aug 15 03:41:09 2022 GMT+0.
Next: Systems, Previous: The cl-geoip Reference Manual, Up: The cl-geoip Reference Manual [Contents][Index]
A simple cffi-wrapper around some basic functionality of libGeoIP as provided by the debian package http://packages.debian.org/wheezy/libgeoip-dev (original source http://www.maxmind.com). I only implemented the functionality I actually need, and released it since it might be useful for other people. If anybody needs more functionality, patches are welcome!
I tested this under SBCL, Linux x64.
Copyright (C) 2013 (let ((n "Christoph-Simon Senjak")) #| |#
(format nil "~A <~C~C~C~C~A>" n (elt n 0) (elt n 10) (elt n 16)
#\@ "uxul.de"))
This program is free software. It comes without any warranty, to
the extent permitted by applicable law. You can redistribute it
and/or modify it under the terms of the Do What The Fuck You Want
To Public License, Version 2, as published by Sam Hocevar. See
http://www.wtfpl.net/ for more details.
Under Debian/Ubuntu, the packages libgeoip-dev and geoip-database should provide the necessary files to get started.
Before we can use the databases, they have to be initialized using
open-databases
, which wants two file names, one for the IPv4 and one
fore the IPv6 database. Under Debian/Ubuntu, the following should be
correct:
(geoip:open-databases "/usr/share/GeoIP/GeoIP.dat"
"/usr/share/GeoIP/GeoIPv6.dat")
After that, you should be able to find Country-Codes for IP-Strings
using get-country-code
. If it is not found, NIL is returned:
CL-USER> (geoip:get-country-code "188.40.170.99")
"DE"
CL-USER> (geoip:get-country-code "2a01:4f8:101:281:7ad5:1003:0:1")
"DE"
CL-USER> (geoip:get-country-code "some clusterfuck")
NIL
Next: Files, Previous: Introduction, Up: The cl-geoip Reference Manual [Contents][Index]
The main system appears first, followed by any subsystem dependency.
Wrapper around libGeoIP
WTFPL 2.0
cffi (system).
geoip.lisp (file).
Next: Packages, Previous: Systems, Up: The cl-geoip Reference Manual [Contents][Index]
Files are sorted by type and then listed depth-first from the systems components trees.
Next: cl-geoip/geoip.lisp, Previous: Lisp, Up: Lisp [Contents][Index]
cl-geoip (system).
Previous: cl-geoip/cl-geoip.asd, Up: Lisp [Contents][Index]
cl-geoip (system).
Next: Definitions, Previous: Files, Up: The cl-geoip Reference Manual [Contents][Index]
Packages are listed by definition order.
Next: Indexes, Previous: Packages, Up: The cl-geoip 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]
Previous: Public Interface, Up: Public Interface [Contents][Index]
Previous: Public Interface, Up: Definitions [Contents][Index]
Next: Ordinary functions, Previous: Internals, Up: Internals [Contents][Index]
Previous: Definitions, Up: The cl-geoip Reference Manual [Contents][Index]
Jump to: | F G O |
---|
Jump to: | F G O |
---|
Next: Data types, Previous: Functions, Up: Indexes [Contents][Index]
Jump to: | *
S |
---|
Jump to: | *
S |
---|
Jump to: | C F G P S |
---|
Jump to: | C F G P S |
---|