#ifndef LC6_COMMON_H #define LC6_COMMON_H #include #include #include "../inc/libchat6.h" typedef struct LC6_NODE { unsigned char *pub_key; unsigned char *priv_key; } LC6_NODE; typedef struct LC6_USER { struct LC6_USER *prev; struct LC6_USER *next; unsigned char nickname[256]; unsigned char pub_key[32]; unsigned char priv_key[32]; unsigned char icon[32768]; unsigned int status; } LC6_USER; #define LC6_CONFIG_BOOTSTRAP "bootstrap.bin" #define LC6_CONFIG_USER "user.bin" #define LC6_CONFIG_FRIENDS "friends.bin" typedef struct LC6_BOOTSTRAP { struct LC6_BOOTSTRAP *prev; struct LC6_BOOTSTRAP *next; time_t last_contact; int af; union addr { struct in_addr inet; struct in6_addr inet6; } addr; } LC6_BOOTSTRAP; typedef struct LC6_CTX { char path[MAXPATHLEN]; LC6_USER *user; LC6_USER *node; LC6_USER *friends; LC6_BOOTSTRAP *bootstrap; } LC6_CTX; #endif