tor_multipath_voip/src/capture_traffic.c
2019-05-27 18:14:21 +02:00

22 lines
473 B
C

#include "capture_traffic.h"
void traffic_capture_init(struct capture_ctx* ctx, char* filename) {
ctx->activated = filename == NULL ? 0 : 1;
if (!ctx->activated) return;
ctx->filename = strdup(filename);
ctx->capture_in = g_queue_new ();
ctx->capture_out = g_queue_new ();
}
void traffic_capture_stop(struct capture_ctx* ctx) {
if (!ctx->activated) return;
FILE* fd = NULL;
if ((fd = fopen(ctx->filename, "w")) == NULL) {
}
free(ctx->filename);
}