-
Notifications
You must be signed in to change notification settings - Fork 831
/
misc.h
78 lines (52 loc) · 1.6 KB
/
misc.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
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
/*
* misc.h
*
* Created on: Oct 26, 2017
* Author: root
*/
#ifndef MISC_H_
#define MISC_H_
#include "common.h"
#include "connection.h"
#include "fd_manager.h"
#include "delay_manager.h"
#include "fec_manager.h"
extern char fifo_file[1000];
extern int mtu_warn;
extern int disable_mtu_warn;
extern int disable_fec;
extern int disable_checksum;
extern int debug_force_flush_fec;
extern int jitter_min;
extern int jitter_max;
extern int output_interval_min;
extern int output_interval_max;
extern int fix_latency;
// extern u32_t local_ip_uint32,remote_ip_uint32;
// extern char local_ip[100], remote_ip[100];
// extern int local_port, remote_port;
extern address_t local_addr, remote_addr;
extern address_t *out_addr;
extern char *out_interface;
extern conn_manager_t conn_manager;
extern delay_manager_t delay_manager;
extern fd_manager_t fd_manager;
extern int time_mono_test;
extern int delay_capacity;
extern int keep_reconnect;
extern int tun_mtu;
extern int mssfix;
extern int manual_set_tun;
extern int persist_tun;
int from_normal_to_fec(conn_info_t &conn_info, char *data, int len, int &out_n, char **&out_arr, int *&out_len, my_time_t *&out_delay);
int from_fec_to_normal(conn_info_t &conn_info, char *data, int len, int &out_n, char **&out_arr, int *&out_len, my_time_t *&out_delay);
int delay_send(my_time_t delay, const dest_t &dest, char *data, int len);
int print_parameter();
int handle_command(char *s);
int unit_test();
// void print_help();
void process_arg(int argc, char *argv[]);
extern char sub_net[100];
extern u32_t sub_net_uint32;
extern char tun_dev[100];
#endif /* MISC_H_ */