-
Notifications
You must be signed in to change notification settings - Fork 0
/
config.h
48 lines (38 loc) · 902 Bytes
/
config.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
//meshDNS by rémi arnaud
#ifndef __CONFIGH__
#define __CONFIGH__
#include <netinet/in.h>
#include "meshDNS.h"
// peut etre définir struct sname avant
typedef struct snamelist{
struct sname *name;
struct snamelist *next;
} lname;
typedef struct skey {
struct sockaddr_in ip;
char key[128];
struct snamelist *lName;
struct skey *next;
} key;
typedef struct skeylist {
struct skey *key;
struct skeylist *next;
} lkey;
typedef struct sname {
char name[128];
struct skeylist *lKey;
struct sname *next;
} name;
typedef struct localinfo {
key *me;
name *names;
key *keys;
} linfo;
name *newName(char *str, lkey *keys);
key *newKey(struct sockaddr_in ip, char *str, lname *names);
lkey *newLkey(key *k);
lname *newLname(name *n);
void addKeyToName(key *k, name *n);
void addNameToKey(name *n, key *k);
char parseFile(linfo *infos);
#endif