From 9ded58045c0bc657ae97659dc3447b0ded03dd69 Mon Sep 17 00:00:00 2001 From: Quentin Dufour Date: Wed, 5 Feb 2020 22:52:50 +0100 Subject: [PATCH] outch --- src/algo_lightning.c | 4 ---- src/packet.h | 3 +++ 2 files changed, 3 insertions(+), 4 deletions(-) diff --git a/src/algo_lightning.c b/src/algo_lightning.c index 143485b..6ce3c06 100644 --- a/src/algo_lightning.c +++ b/src/algo_lightning.c @@ -182,9 +182,7 @@ void algo_lightning_pad(struct evt_core_ctx* ctx, struct evt_core_fdinfo* fdinfo // 2. Append abstract packets stored in our buffers uint64_t add_ref = ref; - printf("---- begin loop ----\n"); while(1) { - dump_buffer_packet(bp); //fprintf(stderr, " [algo_lightning] Enter loop with ref %ld\n", add_ref); if (add_ref < 1) { //fprintf(stderr, " [algo_lightning] add_ref=%ld < 1\n", add_ref); @@ -208,9 +206,7 @@ void algo_lightning_pad(struct evt_core_ctx* ctx, struct evt_core_fdinfo* fdinfo buffer_append_ap (bp, ap); if (ctx->verbose > 1) fprintf(stderr, " [algo_lightning] Pad packet (now %ld bytes)\n", buffer_full_size (bp)); - printf("---- +1 ----\n"); } - printf("---- end loop ----\n"); } void monitoring(struct evt_core_ctx* ctx, struct evt_core_fdinfo* fdinfo, struct buffer_packet* bp) { diff --git a/src/packet.h b/src/packet.h index 286a084..73a59fc 100644 --- a/src/packet.h +++ b/src/packet.h @@ -47,6 +47,7 @@ struct link_info { uint16_t delta_t; }; +#pragma pack(1) union abstract_packet { char raw; struct { @@ -76,6 +77,7 @@ union abstract_packet { } fmt; }; +#pragma pack(1) struct buffer_packet { enum BP_MODE mode; uint8_t ap_count; @@ -85,6 +87,7 @@ struct buffer_packet { char ip[6000]; }; +#pragma pack(1) struct udp_target { struct sockaddr_in addr; socklen_t addrlen;