IP to Geo

IP to Geo Git Source Tree

Root/src/ip_to_geo.h

1#include <stdint.h>
2#include "cmdline.h"
3
4struct ip_level_t;
5typedef struct ip_level_t {
6 const struct ip_level_t* prev;
7 const struct ip_level_t* next;
8 const struct ip_level_t* childs;
9 uint8_t start;
10 uint8_t end;
11 uint8_t average;
12 uint8_t code;
13} ip_level;
14
15const uint8_t* ip_to_geo(uint8_t* ip, unsigned ip_size);
16const uint8_t* get_country_code(const uint8_t* idx);
17int strip_to_int(char* strip_, uint32_t* ip);
18
19int interactive(struct gengetopt_args_info* params);
20int daemonize(struct gengetopt_args_info* params);
21
22// From test.c
23int self_test();

Archive Download this file

Branches

Tags