diff options
author | Uros Majstorovic <majstor@majstor.org> | 2024-06-03 04:06:21 +0200 |
---|---|---|
committer | Uros Majstorovic <majstor@majstor.org> | 2024-06-03 04:06:21 +0200 |
commit | 109f39e09630409a30a9f4e8183f539c499f07ba (patch) | |
tree | 4492b38e1840be67e9ffedadb30df8f8baf9a0a7 /ecp/test/client.c | |
parent | 4c2c25f80b3cc173f09f6113e0ee623866948b87 (diff) |
improved (v)conn init / open / init vlink / open vlink API; implemented randezvous hashing
Diffstat (limited to 'ecp/test/client.c')
-rw-r--r-- | ecp/test/client.c | 15 |
1 files changed, 7 insertions, 8 deletions
diff --git a/ecp/test/client.c b/ecp/test/client.c index eb39c92..de4fe9c 100644 --- a/ecp/test/client.c +++ b/ecp/test/client.c @@ -39,8 +39,8 @@ static void usage(char *arg) { int main(int argc, char *argv[]) { ECPDHKey key_perma; - ECPNode node; - ecp_ecdh_public_t node_pub; + ecp_tr_addr_t addr; + ecp_ecdh_public_t public; int rv; /* client */ @@ -64,15 +64,14 @@ int main(int argc, char *argv[]) { rv = ecp_start_receiver(&sock); LOG("ecp_start_receiver", rv); - rv = ecp_util_load_key(argv[2], &node_pub, NULL); - LOG("ecp_util_load_key", rv); + rv = ecp_addr_init(&addr, argv[1]); + LOG("ecp_addr_init", rv); - ecp_node_init(&node, &node_pub, NULL); - rv = ecp_node_set_addr(&node, argv[1]); - LOG("ecp_node_set_addr", rv); + rv = ecp_util_load_key(argv[2], &public, NULL); + LOG("ecp_util_load_key", rv); ecp_conn_init(&conn, &sock, CTYPE_TEST); - rv = ecp_conn_open(&conn, &node); + rv = ecp_conn_open(&conn, &public, &addr); LOG("ecp_conn_open", rv); while (1) sleep(1); |