2017-10-26 08:38:52 -05:00
|
|
|
/*
|
|
|
|
* 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"
|
2017-10-28 04:36:37 -05:00
|
|
|
|
2017-10-26 08:38:52 -05:00
|
|
|
extern char fifo_file[1000];
|
|
|
|
|
|
|
|
extern int mtu_warn;
|
|
|
|
|
|
|
|
extern int disable_mtu_warn;
|
|
|
|
extern int disable_fec;
|
2018-08-03 16:43:56 -05:00
|
|
|
extern int disable_checksum;
|
2017-10-26 08:38:52 -05:00
|
|
|
|
|
|
|
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;
|
|
|
|
|
2023-02-07 05:34:06 -05:00
|
|
|
// extern u32_t local_ip_uint32,remote_ip_uint32;
|
|
|
|
// extern char local_ip[100], remote_ip[100];
|
|
|
|
// extern int local_port, remote_port;
|
2018-07-25 03:39:48 -05:00
|
|
|
|
2023-02-07 05:34:06 -05:00
|
|
|
extern address_t local_addr, remote_addr;
|
2020-07-13 22:23:17 -04:00
|
|
|
|
|
|
|
extern address_t *out_addr;
|
|
|
|
extern char *out_interface;
|
2017-10-26 08:38:52 -05:00
|
|
|
|
|
|
|
extern conn_manager_t conn_manager;
|
|
|
|
extern delay_manager_t delay_manager;
|
|
|
|
extern fd_manager_t fd_manager;
|
|
|
|
|
|
|
|
extern int time_mono_test;
|
|
|
|
|
2017-10-27 04:58:20 -05:00
|
|
|
extern int delay_capacity;
|
|
|
|
|
2017-10-28 08:56:24 -05:00
|
|
|
extern int keep_reconnect;
|
|
|
|
|
2017-10-31 19:43:25 -05:00
|
|
|
extern int tun_mtu;
|
|
|
|
|
|
|
|
extern int mssfix;
|
|
|
|
|
2018-08-20 07:58:32 -05:00
|
|
|
extern int manual_set_tun;
|
|
|
|
extern int persist_tun;
|
|
|
|
|
2023-02-07 05:34:06 -05:00
|
|
|
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);
|
2017-10-27 00:03:35 -05:00
|
|
|
|
2023-02-07 05:34:06 -05:00
|
|
|
int delay_send(my_time_t delay, const dest_t &dest, char *data, int len);
|
2017-10-26 08:38:52 -05:00
|
|
|
int print_parameter();
|
|
|
|
int handle_command(char *s);
|
|
|
|
|
|
|
|
int unit_test();
|
|
|
|
|
2023-02-07 05:34:06 -05:00
|
|
|
// void print_help();
|
2017-10-26 08:38:52 -05:00
|
|
|
|
|
|
|
void process_arg(int argc, char *argv[]);
|
|
|
|
|
2017-10-27 21:16:59 -05:00
|
|
|
extern char sub_net[100];
|
|
|
|
extern u32_t sub_net_uint32;
|
|
|
|
extern char tun_dev[100];
|
2017-10-26 08:38:52 -05:00
|
|
|
|
|
|
|
#endif /* MISC_H_ */
|