diff options
Diffstat (limited to 'main.h')
-rw-r--r-- | main.h | 20 |
1 files changed, 11 insertions, 9 deletions
@@ -80,26 +80,28 @@ typedef struct protocol_frame_t { | |||
80 | } protocol_frame; | 80 | } protocol_frame; |
81 | 81 | ||
82 | /* Rules policy */ | 82 | /* Rules policy */ |
83 | enum rules_policy_enum { VALIDATE, NONE }; | ||
84 | typedef struct rule { | 83 | typedef struct rule { |
85 | uint16_t port; | 84 | uint16_t port; |
86 | char * host; | 85 | char * host; |
87 | struct rule *next; | 86 | struct rule *next; |
88 | } rule; | 87 | } rule; |
89 | 88 | ||
89 | enum Mode { | ||
90 | Mode_Unspecified, | ||
91 | Mode_Server, | ||
92 | Mode_Client_Local_Port_Forward, | ||
93 | Mode_Client_Pipe, | ||
94 | Mode_Client_Ping | ||
95 | }; | ||
96 | |||
90 | /**** GLOBAL VARIABLES ****/ | 97 | /**** GLOBAL VARIABLES ****/ |
91 | extern Tox *tox; | 98 | extern Tox *tox; |
92 | /* Whether we're a client */ | 99 | |
93 | extern int client_mode; | 100 | /* Whether we're a server, client, etc. */ |
94 | /* Just send a ping and exit */ | 101 | extern enum Mode program_mode; |
95 | extern int ping_mode; | ||
96 | /* TOX_CONNECTION global variable */ | 102 | /* TOX_CONNECTION global variable */ |
97 | extern TOX_CONNECTION connection_status; | 103 | extern TOX_CONNECTION connection_status; |
98 | /* Open a local port and forward it */ | 104 | /* Open a local port and forward it */ |
99 | extern int client_local_port_mode; | ||
100 | /* Forward stdin/stdout to remote machine - SSH ProxyCommand mode */ | ||
101 | extern int client_pipe_mode; | ||
102 | /* Remote Tox ID in client mode */ | ||
103 | extern uint8_t *remote_tox_id; | 105 | extern uint8_t *remote_tox_id; |
104 | /* Ports and hostname for port forwarding */ | 106 | /* Ports and hostname for port forwarding */ |
105 | extern int remote_port; | 107 | extern int remote_port; |