]>
Commit | Line | Data |
---|---|---|
023caa7f MT |
1 | # **_`libloc`_** - IP Address Location |
2 | ||
3 | [Home](https://www.ipfire.org/location) | |
4 | ||
5 | `libloc` is a library for fast and efficient IP address location. | |
6 | ||
7 | It offers: | |
8 | ||
9 | - **The Fastest Lookups**: O(1) lookup time for IP addresses using a binary tree structure. | |
10 | - **Low Memory Footprint**: The database is packed in a very efficient format. | |
11 | - **Security**: Integrated signature verification for data integrity. | |
12 | - **Maintainability**: Automatic updates. | |
13 | - **Standalone**: No external dependencies, easy to integrate. | |
14 | ||
15 | `libloc` is ideal for: | |
16 | ||
17 | - Firewalls | |
18 | - Intrusion Prevention/Detection Systems (IPS/IDS) | |
19 | - Web Applications | |
20 | - Network Management Tools | |
21 | ||
22 | The publicly available daily updated database stores information about: | |
23 | ||
24 | - The entire IPv6 and IPv4 Internet | |
25 | - Autonomous System Information including names | |
26 | - Country Codes, Names and Continent Codes | |
27 | ||
28 | ## Command Line | |
29 | ||
30 | `libloc` comes with a command line tool which makes it easy to test the library or | |
31 | integrate it into your shell scripts. location(8) knows a couple of commands to retrieve | |
32 | country or Autonomous System of an IP address and can generate lists of networks to be | |
33 | imported into other software. | |
34 | ||
35 | `location (8)` is versatile and very easy to use. | |
36 | ||
37 | ## Language Bindings | |
38 | ||
39 | `libloc` itself is written in C. There are bindings for the following languages available: | |
40 | ||
41 | - Python 3 | |
42 | - Lua | |
43 | - Perl | |
44 | ||
45 | `libloc` comes with native Python bindings which are used by its main command-line tool | |
46 | location. They are the most advanced bindings as they support reading from the database | |
47 | as well as writing to it. |