summaryrefslogtreecommitdiff
path: root/src/tools/oping
diff options
context:
space:
mode:
authorDimitri Staessens <dimitri@ouroboros.rocks>2020-02-24 22:30:22 +0100
committerSander Vrijders <sander@ouroboros.rocks>2020-02-25 08:21:09 +0100
commitfe6b60909d455abdac7885ceaba1097749e7aeb1 (patch)
treeffd3f3c6a2f15a1af5b393d8a5c068304b29a636 /src/tools/oping
parent11fbe2f998a39ca156e2c806fd78f2af781836a4 (diff)
downloadouroboros-fe6b60909d455abdac7885ceaba1097749e7aeb1.tar.gz
ouroboros-fe6b60909d455abdac7885ceaba1097749e7aeb1.zip
lib, ipcpd: piggyback ECDHE on flow allocation
The initial implementation for the ECDHE key exchange was doing the key exchange after a flow was established. The public keys are now sent allowg on the flow allocation messages, so that an encrypted tunnel can be created within 1 RTT. The flow allocation steps had to be extended to pass the opaque data ('piggybacking'). Signed-off-by: Dimitri Staessens <dimitri@ouroboros.rocks> Signed-off-by: Sander Vrijders <sander@ouroboros.rocks>
Diffstat (limited to 'src/tools/oping')
-rw-r--r--src/tools/oping/oping.c2
-rw-r--r--src/tools/oping/oping_server.c2
2 files changed, 4 insertions, 0 deletions
diff --git a/src/tools/oping/oping.c b/src/tools/oping/oping.c
index b6d64051..ca685292 100644
--- a/src/tools/oping/oping.c
+++ b/src/tools/oping/oping.c
@@ -233,6 +233,8 @@ int main(int argc,
client.qs = qos_voice;
else if (strcmp(qos, "data") == 0)
client.qs = qos_data;
+ else if (strcmp(qos, "raw_crypt") == 0)
+ client.qs = qos_raw_crypt;
else
printf("Unknown QoS cube, defaulting to raw.\n");
}
diff --git a/src/tools/oping/oping_server.c b/src/tools/oping/oping_server.c
index 1b5d2f78..5cc347cb 100644
--- a/src/tools/oping/oping_server.c
+++ b/src/tools/oping/oping_server.c
@@ -100,6 +100,8 @@ void * server_thread(void *o)
continue;
}
+ printf("Received %d bytes on fd %d.\n", msg_len, fd);
+
clock_gettime(CLOCK_REALTIME, &now);
pthread_mutex_lock(&server.lock);