2019-02-19 18:15:37 +00:00
|
|
|
#pragma once
|
|
|
|
#include <stdlib.h>
|
|
|
|
#include <stdio.h>
|
|
|
|
#include <string.h>
|
2019-05-09 09:24:05 +00:00
|
|
|
#include <sys/signalfd.h>
|
|
|
|
#include <errno.h>
|
2019-02-19 18:15:37 +00:00
|
|
|
#include "net_tools.h"
|
|
|
|
#include "evt_core.h"
|
|
|
|
#include "packet.h"
|
|
|
|
|
2019-03-28 10:47:14 +00:00
|
|
|
struct donar_params {
|
2019-05-09 13:33:27 +00:00
|
|
|
int opt, is_server, is_client, is_waiting_bootstrap, is_healing, errored, verbose, links, fresh_data, redundant_data;
|
2019-06-21 14:50:49 +00:00
|
|
|
char *bound_ip, *port, *onion_file, *algo, *capture_file;
|
2019-03-28 10:47:14 +00:00
|
|
|
GPtrArray *remote_ports, *exposed_ports;
|
|
|
|
};
|
|
|
|
|
2019-05-09 09:24:05 +00:00
|
|
|
void signal_init(struct evt_core_ctx* evts);
|
2019-02-19 18:15:37 +00:00
|
|
|
void init_udp_remote(char* port, struct evt_core_ctx* evts);
|
2019-06-21 14:50:49 +00:00
|
|
|
void init_udp_exposed(char *bound_ip, char* port, struct evt_core_ctx* evts);
|
2019-03-28 10:47:14 +00:00
|
|
|
void donar_init_params(struct donar_params* dp);
|