projects
/
tinc
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Use AF_UNSPEC instead of AF_UNKNOWN for unspecified local address in add_edge_h().
[tinc]
/
src
/
sptps_speed.c
diff --git
a/src/sptps_speed.c
b/src/sptps_speed.c
index
d9776b7
..
ab41e8d
100644
(file)
--- a/
src/sptps_speed.c
+++ b/
src/sptps_speed.c
@@
-1,6
+1,6
@@
/*
sptps_speed.c -- SPTPS benchmark
/*
sptps_speed.c -- SPTPS benchmark
- Copyright (C) 2013
Guus Sliepen <guus@tinc-vpn.org>,
+ Copyright (C) 2013
-2014 Guus Sliepen <guus@tinc-vpn.org>
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
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
@@
-18,6
+18,7
@@
*/
#include "system.h"
*/
#include "system.h"
+#include "utils.h"
#include <poll.h>
#include <poll.h>
@@
-34,13
+35,13
@@
bool send_meta(void *c, const char *msg , int len) { return false; }
char *logfilename = NULL;
struct timeval now;
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;
}
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;
}
return true;
}
@@
-96,14
+97,14
@@
int main(int argc, char *argv[]) {
key1 = ecdsa_generate();
key2 = ecdsa_generate();
key1 = ecdsa_generate();
key2 = ecdsa_generate();
- // E
CDSA
signatures
+ // E
d25519
signatures
- fprintf(stderr, "E
CDSA
sign for %lg seconds: ", duration);
+ fprintf(stderr, "E
d25519
sign for %lg seconds: ", duration);
for(clock_start(); clock_countto(duration);)
ecdsa_sign(key1, buf1, 256, buf2);
fprintf(stderr, "%22.2lf op/s\n", rate);
for(clock_start(); clock_countto(duration);)
ecdsa_sign(key1, buf1, 256, buf2);
fprintf(stderr, "%22.2lf op/s\n", rate);
- fprintf(stderr, "E
CDSA
verify for %lg seconds: ", duration);
+ fprintf(stderr, "E
d25519
verify for %lg seconds: ", duration);
for(clock_start(); clock_countto(duration);)
ecdsa_verify(key1, buf1, 256, buf2);
fprintf(stderr, "%20.2lf op/s\n", rate);
for(clock_start(); clock_countto(duration);)
ecdsa_verify(key1, buf1, 256, buf2);
fprintf(stderr, "%20.2lf op/s\n", rate);
@@
-121,7
+122,7
@@
int main(int argc, char *argv[]) {
int fd[2];
if(socketpair(AF_UNIX, SOCK_STREAM, 0, fd)) {
int fd[2];
if(socketpair(AF_UNIX, SOCK_STREAM, 0, fd)) {
- fprintf(stderr, "Could not create a UNIX socket pair: %s\n", s
trerror(
errno));
+ fprintf(stderr, "Could not create a UNIX socket pair: %s\n", s
ockstrerror(sock
errno));
return 1;
}
return 1;
}
@@
-174,7
+175,7
@@
int main(int argc, char *argv[]) {
close(fd[1]);
if(socketpair(AF_UNIX, SOCK_DGRAM, 0, fd)) {
close(fd[1]);
if(socketpair(AF_UNIX, SOCK_DGRAM, 0, fd)) {
- fprintf(stderr, "Could not create a UNIX socket pair: %s\n", s
trerror(
errno));
+ fprintf(stderr, "Could not create a UNIX socket pair: %s\n", s
ockstrerror(sock
errno));
return 1;
}
return 1;
}