]> git.ipfire.org Git - location/libloc.git/blobdiff - src/loc/database.h
database: Implement lookup
[location/libloc.git] / src / loc / database.h
index 28c29e9912aef47578568212bfb6e54aa3f2312c..78963c078dc74ceefd8ede0a443b6974aac26966 100644 (file)
 #ifndef LIBLOC_DATABASE_H
 #define LIBLOC_DATABASE_H
 
+#include <netinet/in.h>
 #include <stdio.h>
 #include <stdint.h>
 
 #include <loc/libloc.h>
+#include <loc/network.h>
 #include <loc/as.h>
 
 struct loc_database;
@@ -37,4 +39,9 @@ size_t loc_database_count_as(struct loc_database* db);
 
 int loc_database_write(struct loc_database* db, FILE* f);
 
+int loc_database_lookup(struct loc_database* db,
+               struct in6_addr* address, struct loc_network** network);
+int loc_database_lookup_from_string(struct loc_database* db,
+               const char* string, struct loc_network** network);
+
 #endif