moved compression code into transforms (#961)

This commit is contained in:
Logan oos Even
2022-02-21 10:09:06 +01:00
committed by GitHub
parent 4b8aaa7f6e
commit f59c6900a1
11 changed files with 411 additions and 223 deletions
+5 -1
View File
@@ -103,7 +103,7 @@
#include <syslog.h>
#include <sys/wait.h>
#ifdef HAVE_LIBZSTD
#ifdef HAVE_ZSTD
#include <zstd.h>
#endif
@@ -183,6 +183,10 @@ int n2n_transop_tf_init (const n2n_edge_conf_t *conf, n2n_trans_op_t *ttt);
int n2n_transop_aes_init (const n2n_edge_conf_t *conf, n2n_trans_op_t *ttt);
int n2n_transop_cc20_init (const n2n_edge_conf_t *conf, n2n_trans_op_t *ttt);
int n2n_transop_speck_init (const n2n_edge_conf_t *conf, n2n_trans_op_t *ttt);
int n2n_transop_lzo_init (const n2n_edge_conf_t *conf, n2n_trans_op_t *ttt);
#ifdef HAVE_ZSTD
int n2n_transop_zstd_init (const n2n_edge_conf_t *conf, n2n_trans_op_t *ttt);
#endif
/* Log */
void setTraceLevel (int level);
+4
View File
@@ -715,6 +715,10 @@ struct n2n_edge {
size_t sup_attempts; /**< Number of remaining attempts to this supernode. */
tuntap_dev device; /**< All about the TUNTAP device */
n2n_trans_op_t transop; /**< The transop to use when encoding */
n2n_trans_op_t transop_lzo; /**< The transop for LZO compression */
#ifdef HAVE_ZSTD
n2n_trans_op_t transop_zstd; /**< The transop for ZSTD compression */
#endif
n2n_route_t *sn_route_to_clean; /**< Supernode route to clean */
n2n_edge_callbacks_t cb; /**< API callbacks */
void *user_data; /**< Can hold user data */