A library for a decentralised peer-to-peer chat over IPv6 only.
Vous ne pouvez pas sélectionner plus de 25 sujets Les noms de sujets doivent commencer par une lettre ou un nombre, peuvent contenir des tirets ('-') et peuvent comporter jusqu'à 35 caractères.

lc6_config.h 814B

12345678910111213141516171819202122232425262728293031323334353637383940
  1. #ifndef LC6_CONFIG_H
  2. #define LC6_CONFIG_H
  3. #include <sys/param.h>
  4. #include <arpa/inet.h>
  5. #include "lc6_user.h"
  6. #define LC6_CONFIG_BOOTSTRAP "bootstrap.bin"
  7. #define LC6_CONFIG_USER "user.bin"
  8. #define LC6_CONFIG_FRIENDS "friends.bin"
  9. typedef struct LC6_BOOTSTRAP {
  10. struct LC6_BOOTSTRAP *prev;
  11. struct LC6_BOOTSTRAP *next;
  12. time_t last_contact;
  13. int af;
  14. union addr {
  15. struct in_addr inet;
  16. struct in6_addr inet6;
  17. } addr;
  18. } LC6_BOOTSTRAP;
  19. typedef struct LC6_CTX {
  20. char path[MAXPATHLEN];
  21. LC6_USER *user;
  22. LC6_USER *node;
  23. LC6_USER *friends;
  24. LC6_BOOTSTRAP *bootstrap;
  25. } LC6_CTX;
  26. LC6_CTX* lc6config_load(unsigned char *key, char *path);
  27. void lc6config_load_file(
  28. LC6_CTX *conf,
  29. char *path,
  30. char *filename,
  31. unsigned char *password);
  32. #endif