-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathaixen.h
55 lines (43 loc) · 890 Bytes
/
aixen.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
49
50
51
52
53
54
55
#include "config.h"
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <assert.h>
#include <pthread.h>
struct hostport {
char *host;
int port;
};
struct list_hostports {
struct hostport *address;
int count;
};
struct aixen_ipports {
union {
struct list_hostports db;
struct list_hostports slave;
} master;
union {
struct list_hostports master;
struct list_hostports client;
} slave;
};
struct aixen_status {
int main;
int peer;
};
struct aixen_configuration {
struct aixen_ipports ipport;
struct aixen_status status;
int master;
int connected;
char* upstream;
};
extern struct aixen_configuration config;
// control panel
void redraw (void);
void draw (void);
void control (void);
int doCommand (char* comm);
void writeline (char* line); // Use this to log messages to CPL
int error_invocation (int argc, char** argv);