L2 BD API to flush all IP-MAC entries in the specified BD
[vpp.git] / src / vcl / sock_test_client.c
index 75913d9..fb71cd7 100644 (file)
@@ -23,6 +23,7 @@
 #include <time.h>
 #include <arpa/inet.h>
 #include <vcl/sock_test.h>
+#include <fcntl.h>
 #ifndef VCL_TEST
 #include <sys/un.h>
 #endif
@@ -156,8 +157,9 @@ echo_test_client ()
       _rfdset = rd_fdset;
 
 #ifdef VCL_TEST
-      rv = vppcom_select (nfds, (uint64_t *) rfdset, (uint64_t *) wfdset,
-                         NULL, 0);
+      rv =
+       vppcom_select (nfds, (unsigned long *) rfdset,
+                      (unsigned long *) wfdset, NULL, 0);
 #else
       {
        struct timeval timeout;
@@ -416,8 +418,9 @@ stream_test_client (vcl_test_t test)
       _rfdset = rd_fdset;
 
 #ifdef VCL_TEST
-      rv = vppcom_select (nfds, (uint64_t *) rfdset, (uint64_t *) wfdset,
-                         NULL, 0);
+      rv =
+       vppcom_select (nfds, (unsigned long *) rfdset,
+                      (unsigned long *) wfdset, NULL, 0);
 #else
       {
        struct timeval timeout;
@@ -647,6 +650,14 @@ sock_test_connect_test_sockets (uint32_t num_test_sockets)
                       errno_val);
              return tsock->fd;
            }
+         if (fcntl (tsock->fd, F_SETFL, O_NONBLOCK) < 0)
+           {
+             errno_val = errno;
+             perror ("ERROR in sock_test_connect_test_sockets()");
+             fprintf (stderr, "CLIENT: ERROR: fcntl failed (errno = %d)!\n",
+                      errno_val);
+             return -1;
+           }
 
 #ifdef VCL_TEST
          rv = vppcom_session_connect (tsock->fd, &scm->server_endpt);