people/ms/libloc.git
2 years agoMove all header files into src/loc and install them
Michael Tremer [Fri, 29 Dec 2017 11:20:30 +0000 (11:20 +0000)] 
Move all header files into src/loc and install them

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
2 years agopython: Add Database class
Michael Tremer [Fri, 29 Dec 2017 11:10:01 +0000 (11:10 +0000)] 
python: Add Database class

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
2 years agoStart a Python module
Michael Tremer [Thu, 28 Dec 2017 18:32:45 +0000 (18:32 +0000)] 
Start a Python module

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
2 years agoWrite networks to the database
Michael Tremer [Thu, 28 Dec 2017 18:07:11 +0000 (18:07 +0000)] 
Write networks to the database

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
2 years agoAllow creating networks in memory
Michael Tremer [Thu, 28 Dec 2017 16:55:33 +0000 (16:55 +0000)] 
Allow creating networks in memory

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
2 years agoDo not copy the file pointer when opening a database
Michael Tremer [Tue, 12 Dec 2017 17:11:27 +0000 (17:11 +0000)] 
Do not copy the file pointer when opening a database

We don't need this at all when we are using mmap to read
any data from any of the sections.

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
2 years agoUse be*toh and htobe* to convert to big-endian
Michael Tremer [Tue, 12 Dec 2017 17:06:18 +0000 (17:06 +0000)] 
Use be*toh and htobe* to convert to big-endian

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
2 years agoLog how long it takes to open the database
Michael Tremer [Tue, 12 Dec 2017 17:02:46 +0000 (17:02 +0000)] 
Log how long it takes to open the database

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
2 years agodatabase: Log how long it took to retrieve an AS
Michael Tremer [Tue, 12 Dec 2017 16:58:16 +0000 (16:58 +0000)] 
database: Log how long it took to retrieve an AS

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
2 years agostringpool: Make them initializable right from the file
Michael Tremer [Tue, 12 Dec 2017 16:45:22 +0000 (16:45 +0000)] 
stringpool: Make them initializable right from the file

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
2 years agotest: We do not guarantee that string pointers never change
Michael Tremer [Tue, 12 Dec 2017 16:44:50 +0000 (16:44 +0000)] 
test: We do not guarantee that string pointers never change

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
2 years agoSplit database into a writer and reader
Michael Tremer [Tue, 12 Dec 2017 15:52:47 +0000 (15:52 +0000)] 
Split database into a writer and reader

This allows us to build both parts more to their
own purpose instead of making code overly complicated
to archive flexibility we don't need.

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
2 years agodatabase: Move string pool to the end of the file again
Michael Tremer [Tue, 12 Dec 2017 13:31:27 +0000 (13:31 +0000)] 
database: Move string pool to the end of the file again

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
2 years agodatabase: Save time when the database was created
Michael Tremer [Tue, 12 Dec 2017 13:29:10 +0000 (13:29 +0000)] 
database: Save time when the database was created

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
2 years agodatabase: Add function to align to page boundaries
Michael Tremer [Tue, 12 Dec 2017 13:16:54 +0000 (13:16 +0000)] 
database: Add function to align to page boundaries

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
2 years agodatabase: Cleanup writing AS section
Michael Tremer [Tue, 12 Dec 2017 13:14:14 +0000 (13:14 +0000)] 
database: Cleanup writing AS section

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
2 years agodatabase: Cleanup writing pool
Michael Tremer [Tue, 12 Dec 2017 13:08:34 +0000 (13:08 +0000)] 
database: Cleanup writing pool

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
2 years agoconfigure: We don't allow disabling logging any more
Michael Tremer [Tue, 12 Dec 2017 12:50:16 +0000 (12:50 +0000)] 
configure: We don't allow disabling logging any more

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
2 years agostringpool: Use mmap to make reading the pool more efficient
Michael Tremer [Tue, 12 Dec 2017 12:49:44 +0000 (12:49 +0000)] 
stringpool: Use mmap to make reading the pool more efficient

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
2 years agodatabase: Copy the file pointer so we can keep the file open
Michael Tremer [Tue, 12 Dec 2017 12:04:49 +0000 (12:04 +0000)] 
database: Copy the file pointer so we can keep the file open

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
2 years agoMove all database format definition into format.h
Michael Tremer [Tue, 12 Dec 2017 11:43:59 +0000 (11:43 +0000)] 
Move all database format definition into format.h

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
2 years agoIntroduce object to store an AS
Michael Tremer [Tue, 12 Dec 2017 11:40:47 +0000 (11:40 +0000)] 
Introduce object to store an AS

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
2 years agoDraft initial database format
Michael Tremer [Fri, 8 Dec 2017 14:49:17 +0000 (14:49 +0000)] 
Draft initial database format

This patch adds a writer and reader for the database and already
has some metadata and the ability to write and read the string
pool from disk.

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
2 years agoAdd deduplicated and memory-efficient string pool
Michael Tremer [Thu, 7 Dec 2017 12:36:11 +0000 (12:36 +0000)] 
Add deduplicated and memory-efficient string pool

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
2 years agoInitial commit
Michael Tremer [Tue, 5 Dec 2017 18:48:36 +0000 (18:48 +0000)] 
Initial commit

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>