diff options
Diffstat (limited to 'code/test')
-rw-r--r-- | code/test/Makefile | 20 | ||||
-rw-r--r-- | code/test/init_vconn.c (renamed from code/test/init_proxy.c) | 8 | ||||
-rw-r--r-- | code/test/vc_client.c (renamed from code/test/pr_client.c) | 14 | ||||
-rw-r--r-- | code/test/vc_server.c (renamed from code/test/pr_server.c) | 6 | ||||
-rw-r--r-- | code/test/vcs.c (renamed from code/test/proxy.c) | 4 |
5 files changed, 26 insertions, 26 deletions
diff --git a/code/test/Makefile b/code/test/Makefile index 8f42021..997f77e 100644 --- a/code/test/Makefile +++ b/code/test/Makefile @@ -1,12 +1,12 @@ -CFLAGS=-I../core -I../proxy -I../util -O3 -Wno-int-to-void-pointer-cast +CFLAGS=-I../core -I../vconn -I../util -O3 -Wno-int-to-void-pointer-cast LDFLAGS=-lm -pthread -dep=../core/libecpcore.a ../core/crypto/libecpcr.a ../core/htable/libecpht.a ../core/posix/libecptr.a ../core/posix/libecptm.a ../proxy/libecpproxy.a ../util/libecputil.a +dep=../core/libecpcore.a ../core/crypto/libecpcr.a ../core/htable/libecpht.a ../core/posix/libecptr.a ../core/posix/libecptm.a ../vconn/libecpvconn.a ../util/libecputil.a %.o: %.c $(CC) $(CFLAGS) -c $< -all: basic client server echo stress proxy pr_server pr_client +all: basic client server echo stress vcs vc_server vc_client basic: basic.o init.o $(dep) $(CC) -o $@ $< init.o $(dep) $(LDFLAGS) @@ -23,14 +23,14 @@ echo: echo.o init.o $(dep) stress: stress.o init.o $(dep) $(CC) -o $@ $< init.o $(dep) $(LDFLAGS) -proxy: proxy.o init_proxy.o $(dep) - $(CC) -o $@ $< init_proxy.o $(dep) $(LDFLAGS) +vcs: vcs.o init_vconn.o $(dep) + $(CC) -o $@ $< init_vconn.o $(dep) $(LDFLAGS) -pr_server: pr_server.o init_proxy.o $(dep) - $(CC) -o $@ $< init_proxy.o $(dep) $(LDFLAGS) +vc_server: vc_server.o init_vconn.o $(dep) + $(CC) -o $@ $< init_vconn.o $(dep) $(LDFLAGS) -pr_client: pr_client.o init_proxy.o $(dep) - $(CC) -o $@ $< init_proxy.o $(dep) $(LDFLAGS) +vc_client: vc_client.o init_vconn.o $(dep) + $(CC) -o $@ $< init_vconn.o $(dep) $(LDFLAGS) opus_root=../../../opus-1.1.5 @@ -42,4 +42,4 @@ voip: voip.o init.o $(dep) clean: rm -f *.o - rm -f basic client server echo stress proxy pr_server pr_client voip + rm -f basic client server echo stress vcs vc_server vc_client voip diff --git a/code/test/init_proxy.c b/code/test/init_vconn.c index c7f560d..2e82598 100644 --- a/code/test/init_proxy.c +++ b/code/test/init_vconn.c @@ -3,7 +3,7 @@ #include <unistd.h> #include "core.h" -#include "proxy.h" +#include "vconn.h" static int v_rng(void *buf, size_t bufsize) { int fd; @@ -17,8 +17,8 @@ static int v_rng(void *buf, size_t bufsize) { static ECPConnection *conn_alloc(unsigned char type) { switch (type) { - case ECP_CTYPE_PROXYF: - return malloc(sizeof(ECPConnProxyF)); + case ECP_CTYPE_VCONN: + return malloc(sizeof(ECPVConnIn)); default: return malloc(sizeof(ECPConnection)); } @@ -38,5 +38,5 @@ int ecp_init(ECPContext *ctx) { ctx->conn_alloc = conn_alloc; ctx->conn_free = conn_free; - return ecp_proxy_init(ctx); + return ecp_ctx_vconn_init(ctx); }
\ No newline at end of file diff --git a/code/test/pr_client.c b/code/test/vc_client.c index d643dd3..586fec5 100644 --- a/code/test/pr_client.c +++ b/code/test/vc_client.c @@ -4,7 +4,7 @@ #include <stdlib.h> #include "core.h" -#include "proxy.h" +#include "vconn.h" #include "util.h" ECPContext ctx; @@ -14,8 +14,8 @@ ECPConnHandler handler; ECPConnection conn; ECPNode node; -ECPConnProxy conn_proxy[20]; -ECPNode node_proxy[20]; +ECPVConnection vconn[20]; +ECPNode vconn_node[20]; #define CTYPE_TEST 0 #define MTYPE_MSG 8 @@ -47,7 +47,7 @@ ssize_t handle_msg(ECPConnection *conn, ecp_seq_t sq, unsigned char t, unsigned } static void usage(char *arg) { - fprintf(stderr, "Usage: %s <server.pub> <p1.pub> ... <pn.pub>\n", arg); + fprintf(stderr, "Usage: %s <server.pub> <v1.pub> ... <vn.pub>\n", arg); exit(1); } @@ -77,15 +77,15 @@ int main(int argc, char *argv[]) { printf("ecp_util_node_load RV:%d\n", rv); for (i=0; i<argc-2; i++) { - rv = ecp_util_node_load(&ctx, &node_proxy[i], argv[i+2]); + rv = ecp_util_node_load(&ctx, &vconn_node[i], argv[i+2]); printf("ecp_util_node_load RV:%d\n", rv); } rv = ecp_conn_create(&conn, &sock, CTYPE_TEST); printf("ecp_conn_create RV:%d\n", rv); - rv = ecp_conn_proxy_open(&conn, &node, conn_proxy, node_proxy, argc-2); - printf("ecp_conn_proxy_open RV:%d\n", rv); + rv = ecp_vconn_open(&conn, &node, vconn, vconn_node, argc-2); + printf("ecp_vconn_open RV:%d\n", rv); while (1) sleep(1); }
\ No newline at end of file diff --git a/code/test/pr_server.c b/code/test/vc_server.c index 2fd81a6..fb6b923 100644 --- a/code/test/pr_server.c +++ b/code/test/vc_server.c @@ -4,7 +4,7 @@ #include <stdlib.h> #include "core.h" -#include "proxy.h" +#include "vconn.h" #include "util.h" ECPContext ctx; @@ -38,7 +38,7 @@ ssize_t handle_msg(ECPConnection *conn, ecp_seq_t sq, unsigned char t, unsigned } static void usage(char *arg) { - fprintf(stderr, "Usage: %s <node.priv> <proxy.pub>\n", arg); + fprintf(stderr, "Usage: %s <node.priv> <vcs.pub>\n", arg); exit(1); } @@ -70,7 +70,7 @@ int main(int argc, char *argv[]) { rv = ecp_util_node_load(&ctx, &node, argv[2]); printf("ecp_util_node_load RV:%d\n", rv); - rv = ecp_conn_create(&conn, &sock, ECP_CTYPE_PROXYB); + rv = ecp_conn_create(&conn, &sock, ECP_CTYPE_VLINK); printf("ecp_conn_create RV:%d\n", rv); rv = ecp_conn_open(&conn, &node); diff --git a/code/test/proxy.c b/code/test/vcs.c index ae7cce5..1dbf67d 100644 --- a/code/test/proxy.c +++ b/code/test/vcs.c @@ -5,7 +5,7 @@ #include "core.h" #include "util.h" -#include "proxy.h" +#include "vconn.h" ECPContext ctx; ECPSocket sock; @@ -43,7 +43,7 @@ int main(int argc, char *argv[]) { rv = ecp_util_node_load(&ctx, &node, argv[3]); printf("ecp_util_node_load RV:%d\n", rv); - rv = ecp_conn_create(&conn, &sock, ECP_CTYPE_PROXYB); + rv = ecp_conn_create(&conn, &sock, ECP_CTYPE_VLINK); printf("ecp_conn_create RV:%d\n", rv); rv = ecp_conn_open(&conn, &node); |