aboutsummaryrefslogtreecommitdiffstats
path: root/src/vcl/vcl_test_server.c
diff options
context:
space:
mode:
authorFlorin Coras <fcoras@cisco.com>2018-07-27 05:45:06 -0700
committerDave Barach <openvpp@barachs.net>2018-07-31 11:36:54 +0000
commit460dce6e2d017cc7b2151fd0fa61d464570489d7 (patch)
tree19e944702f8b7fcb659a8166f50a03ee5eba9a7a /src/vcl/vcl_test_server.c
parente939bf1b508e1fae6929dd8cf0f3effdc2c12549 (diff)
vcl: add read/write udp support
Change-Id: Ie6171c12055cde6915856de340839f5da1b1b1da Signed-off-by: Florin Coras <fcoras@cisco.com>
Diffstat (limited to 'src/vcl/vcl_test_server.c')
-rw-r--r--src/vcl/vcl_test_server.c17
1 files changed, 10 insertions, 7 deletions
diff --git a/src/vcl/vcl_test_server.c b/src/vcl/vcl_test_server.c
index 6a2fda0be57..b49383eb73a 100644
--- a/src/vcl/vcl_test_server.c
+++ b/src/vcl/vcl_test_server.c
@@ -425,14 +425,17 @@ main (int argc, char **argv)
return -1;
}
- rv = vppcom_session_listen (ssm->listen_fd, 10);
- if (rv < 0)
+ if (!ssm->cfg.transport_udp)
{
- errno_val = errno = -rv;
- perror ("ERROR in main()");
- fprintf (stderr, "SERVER: ERROR: listen failed "
- "(errno = %d)!\n", errno_val);
- return -1;
+ rv = vppcom_session_listen (ssm->listen_fd, 10);
+ if (rv < 0)
+ {
+ errno_val = errno = -rv;
+ perror ("ERROR in main()");
+ fprintf (stderr, "SERVER: ERROR: listen failed "
+ "(errno = %d)!\n", errno_val);
+ return -1;
+ }
}
ssm->epfd = vppcom_epoll_create ();