X-Git-Url: http://git.meshlink.io/?a=blobdiff_plain;f=src%2Fsptps_speed.c;h=c27683b57ab8e69d19bc9ae1d9116680c2cb355d;hb=31ab43d8a0691e773db6992fa3b52ca24f7f8db4;hp=206ee4face8cc873abcc3450d5d1174ae1e560a9;hpb=a86faaf34711d6b0f278b670d70a229a3cf0d479;p=meshlink diff --git a/src/sptps_speed.c b/src/sptps_speed.c index 206ee4fa..c27683b5 100644 --- a/src/sptps_speed.c +++ b/src/sptps_speed.c @@ -1,6 +1,6 @@ /* sptps_speed.c -- SPTPS benchmark - Copyright (C) 2013 Guus Sliepen , + Copyright (C) 2014 Guus Sliepen This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by @@ -29,18 +29,20 @@ // Symbols necessary to link with logger.o bool send_request(void *c, const char *msg, ...) { return false; } -struct list_t *connection_list = NULL; +void *mesh; +void *global_log_cb; +int global_log_level; bool send_meta(void *c, const char *msg , int len) { return false; } char *logfilename = NULL; struct timeval now; -static bool send_data(void *handle, uint8_t type, const char *data, size_t len) { +static bool send_data(void *handle, uint8_t type, const void *data, size_t len) { int fd = *(int *)handle; send(fd, data, len, 0); return true; } -static bool receive_record(void *handle, uint8_t type, const char *data, uint16_t len) { +static bool receive_record(void *handle, uint8_t type, const void *data, uint16_t len) { return true; } @@ -82,6 +84,10 @@ int main(int argc, char *argv[]) { crypto_init(); + randomize(buf1, sizeof buf1); + randomize(buf2, sizeof buf2); + randomize(buf3, sizeof buf3); + // Key generation fprintf(stderr, "Generating keys for %lg seconds: ", duration);