telize

High performance JSON IP and GeoIP REST API (IP Geolocation)
Log | Files | Refs | README | LICENSE

telize.h (899B)


      1 /*
      2  * Telize 3.1.0
      3  * Copyright (c) 2013-2021, Frederic Cambus
      4  * https://www.telize.com
      5  *
      6  * Created:      2013-08-15
      7  * Last Updated: 2021-03-29
      8  *
      9  * Telize is released under the BSD 2-Clause license.
     10  * See LICENSE file for details.
     11  */
     12 
     13 #ifndef TELIZE_H
     14 #define TELIZE_H
     15 
     16 #include <kore/kore.h>
     17 #include <kore/http.h>
     18 
     19 #include <maxminddb.h>
     20 
     21 #define ENTRY_TYPE_UINT32	0
     22 #define ENTRY_TYPE_STRING	1
     23 #define ENTRY_TYPE_DOUBLE	2
     24 #define ENTRY_TYPE_BOOLEAN	3
     25 
     26 int	request_ip(struct http_request *);
     27 int	request_json_ip(struct http_request *);
     28 int	request_location(struct http_request *);
     29 
     30 int	telize_init(int);
     31 int	telize_request_ip(struct http_request *, char *, size_t);
     32 void	telize_getdata(struct kore_buf *, MMDB_lookup_result_s *,
     33 	    MMDB_entry_data_s *, char *, int, ...);
     34 
     35 int	location(struct http_request *);
     36 
     37 extern MMDB_s telize_asn;
     38 extern MMDB_s telize_city;
     39 
     40 #endif /* TELIZE_H */