#include <stdint.h>
#include "cmdline.h"

struct ip_level_t;
typedef struct ip_level_t {
    const struct ip_level_t* prev;
    const struct ip_level_t* next;
    const struct ip_level_t* childs;
    uint8_t start;
    uint8_t end;
    uint8_t average;
    uint8_t code;
} ip_level;

const uint8_t* ip_to_geo(uint32_t ipv4);
const uint8_t* get_country_code(const uint8_t* idx);
int strip_to_int(char* strip_, uint32_t* ip);

int interactive(struct gengetopt_args_info* params);
int daemonize(struct gengetopt_args_info* params);

// From test.c
int self_test();
