static
This commit is contained in:
parent
82b29e9a3b
commit
1f00810da3
10 changed files with 24 additions and 28 deletions
|
@ -40,11 +40,11 @@ char *device = NULL;
|
||||||
char *iface = NULL;
|
char *iface = NULL;
|
||||||
char *device_info = NULL;
|
char *device_info = NULL;
|
||||||
|
|
||||||
int device_total_in = 0;
|
static int device_total_in = 0;
|
||||||
int device_total_out = 0;
|
static int device_total_out = 0;
|
||||||
|
|
||||||
pid_t reader_pid;
|
static pid_t reader_pid;
|
||||||
int sp[2];
|
static int sp[2];
|
||||||
|
|
||||||
bool setup_device(void)
|
bool setup_device(void)
|
||||||
{
|
{
|
||||||
|
|
|
@ -39,8 +39,8 @@ int device_fd = -1;
|
||||||
char *device;
|
char *device;
|
||||||
char *iface;
|
char *iface;
|
||||||
char *device_info;
|
char *device_info;
|
||||||
int device_total_in = 0;
|
static int device_total_in = 0;
|
||||||
int device_total_out = 0;
|
static int device_total_out = 0;
|
||||||
static device_type_t device_type = DEVICE_TYPE_TUN;
|
static device_type_t device_type = DEVICE_TYPE_TUN;
|
||||||
|
|
||||||
bool setup_device(void)
|
bool setup_device(void)
|
||||||
|
|
|
@ -33,8 +33,8 @@ int device_fd = -1;
|
||||||
char *device;
|
char *device;
|
||||||
char *iface;
|
char *iface;
|
||||||
char *device_info;
|
char *device_info;
|
||||||
int device_total_in = 0;
|
static int device_total_in = 0;
|
||||||
int device_total_out = 0;
|
static int device_total_out = 0;
|
||||||
|
|
||||||
bool setup_device(void)
|
bool setup_device(void)
|
||||||
{
|
{
|
||||||
|
|
|
@ -46,14 +46,14 @@ typedef enum device_type_t {
|
||||||
} device_type_t;
|
} device_type_t;
|
||||||
|
|
||||||
int device_fd = -1;
|
int device_fd = -1;
|
||||||
device_type_t device_type;
|
static device_type_t device_type;
|
||||||
char *device;
|
char *device;
|
||||||
char *iface;
|
char *iface;
|
||||||
char ifrname[IFNAMSIZ];
|
char ifrname[IFNAMSIZ];
|
||||||
char *device_info;
|
char *device_info;
|
||||||
|
|
||||||
int device_total_in = 0;
|
static int device_total_in = 0;
|
||||||
int device_total_out = 0;
|
static int device_total_out = 0;
|
||||||
|
|
||||||
bool setup_device(void)
|
bool setup_device(void)
|
||||||
{
|
{
|
||||||
|
|
|
@ -35,13 +35,13 @@
|
||||||
#include "mingw/common.h"
|
#include "mingw/common.h"
|
||||||
|
|
||||||
int device_fd = 0;
|
int device_fd = 0;
|
||||||
HANDLE device_handle = INVALID_HANDLE_VALUE;
|
static HANDLE device_handle = INVALID_HANDLE_VALUE;
|
||||||
char *device = NULL;
|
char *device = NULL;
|
||||||
char *iface = NULL;
|
char *iface = NULL;
|
||||||
char *device_info = NULL;
|
char *device_info = NULL;
|
||||||
|
|
||||||
int device_total_in = 0;
|
static int device_total_in = 0;
|
||||||
int device_total_out = 0;
|
static int device_total_out = 0;
|
||||||
|
|
||||||
extern char *myport;
|
extern char *myport;
|
||||||
|
|
||||||
|
|
|
@ -37,8 +37,8 @@ char *device;
|
||||||
char *iface;
|
char *iface;
|
||||||
char *device_info;
|
char *device_info;
|
||||||
|
|
||||||
int device_total_in = 0;
|
static int device_total_in = 0;
|
||||||
int device_total_out = 0;
|
static int device_total_out = 0;
|
||||||
|
|
||||||
bool setup_device(void)
|
bool setup_device(void)
|
||||||
{
|
{
|
||||||
|
|
|
@ -30,16 +30,13 @@
|
||||||
|
|
||||||
#define DEFAULT_DEVICE "/dev/tun0"
|
#define DEFAULT_DEVICE "/dev/tun0"
|
||||||
|
|
||||||
#define DEVICE_TYPE_ETHERTAP 0
|
|
||||||
#define DEVICE_TYPE_TUNTAP 1
|
|
||||||
|
|
||||||
int device_fd = -1;
|
int device_fd = -1;
|
||||||
char *device;
|
char *device;
|
||||||
char *iface;
|
char *iface;
|
||||||
char *device_info;
|
char *device_info;
|
||||||
|
|
||||||
int device_total_in = 0;
|
static int device_total_in = 0;
|
||||||
int device_total_out = 0;
|
static int device_total_out = 0;
|
||||||
|
|
||||||
bool setup_device(void)
|
bool setup_device(void)
|
||||||
{
|
{
|
||||||
|
|
|
@ -48,8 +48,8 @@ char *interface;
|
||||||
char ifrname[IFNAMSIZ];
|
char ifrname[IFNAMSIZ];
|
||||||
char *device_info;
|
char *device_info;
|
||||||
|
|
||||||
int device_total_in = 0;
|
static int device_total_in = 0;
|
||||||
int device_total_out = 0;
|
static int device_total_out = 0;
|
||||||
|
|
||||||
bool setup_device(void)
|
bool setup_device(void)
|
||||||
{
|
{
|
||||||
|
|
|
@ -37,11 +37,10 @@
|
||||||
int device_fd = -1;
|
int device_fd = -1;
|
||||||
char *device = NULL;
|
char *device = NULL;
|
||||||
char *iface = NULL;
|
char *iface = NULL;
|
||||||
char ifrname[IFNAMSIZ];
|
|
||||||
char *device_info = NULL;
|
char *device_info = NULL;
|
||||||
|
|
||||||
int device_total_in = 0;
|
static int device_total_in = 0;
|
||||||
int device_total_out = 0;
|
static int device_total_out = 0;
|
||||||
|
|
||||||
bool setup_device(void)
|
bool setup_device(void)
|
||||||
{
|
{
|
||||||
|
|
|
@ -43,8 +43,8 @@ char *device_info;
|
||||||
extern char *identname;
|
extern char *identname;
|
||||||
extern bool running;
|
extern bool running;
|
||||||
|
|
||||||
int device_total_in = 0;
|
static int device_total_in = 0;
|
||||||
int device_total_out = 0;
|
static int device_total_out = 0;
|
||||||
|
|
||||||
enum request_type { REQ_NEW_CONTROL };
|
enum request_type { REQ_NEW_CONTROL };
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue