summaryrefslogtreecommitdiffstats
path: root/src/vcl/sock_test.h
diff options
context:
space:
mode:
authorDave Wallace <dwallacelf@gmail.com>2018-01-03 22:24:41 -0500
committerKeith Burns <alagalah@gmail.com>2018-01-17 22:26:17 +0000
commit048b1d6ab787e46ad91574ac950329bccc7fe809 (patch)
treef2db18c1781bc351311dbe935dce51e7bd63b5ab /src/vcl/sock_test.h
parentd3e83a9c82b4a57c24061828db6a309692f7f2d4 (diff)
LD_PRELOAD: stateless LDP
- Refactor LDP to be stateless. - Use upper bit of fd to identify tag as VCL session. - Clean up debug output. - Add VCOM config env vars for app name and sid bit. - Add VCL get/set attributes - Add VCL poll implementation. Change-Id: I4603ae88254c460a024fdb79fe91c6d1ef9bc7b9 Signed-off-by: Dave Wallace <dwallacelf@gmail.com>
Diffstat (limited to 'src/vcl/sock_test.h')
-rw-r--r--src/vcl/sock_test.h15
1 files changed, 8 insertions, 7 deletions
diff --git a/src/vcl/sock_test.h b/src/vcl/sock_test.h
index 281ba6fd473..b4a22adbe20 100644
--- a/src/vcl/sock_test.h
+++ b/src/vcl/sock_test.h
@@ -157,7 +157,8 @@ sock_test_buf_alloc (sock_test_cfg_t *cfg, uint8_t is_rxbuf, uint8_t **buf,
{
int errno_val = errno;
perror ("ERROR in sock_test_buf_alloc()");
- fprintf (stderr, "ERROR: Buffer allocation failed (errno = %d)!\n"
+ fprintf (stderr, "SOCK_TEST: ERROR: Buffer allocation "
+ "failed (errno = %d)!\n"
" Using buffer size %d instead of desired"
" size (%d)\n", errno_val, *bufsize, alloc_size);
}
@@ -340,8 +341,8 @@ sock_test_read (int fd, uint8_t *buf, uint32_t nbytes,
{
errno_val = errno;
perror ("ERROR in sock_test_read()");
- fprintf (stderr, "ERROR: socket read failed (errno = %d)!\n",
- errno_val);
+ fprintf (stderr, "SOCK_TEST: ERROR: socket read "
+ "failed (errno = %d)!\n", errno_val);
errno = errno_val;
}
else if (stats)
@@ -392,8 +393,8 @@ sock_test_write (int fd, uint8_t *buf, uint32_t nbytes,
stats->tx_incomp++;
if (verbose)
{
- printf ("WARNING: bytes written (%d) != bytes to write (%d)!\n",
- tx_bytes, nbytes);
+ printf ("SOCK_TEST: WARNING: bytes written (%d) "
+ "!= bytes to write (%d)!\n", tx_bytes, nbytes);
}
}
@@ -403,8 +404,8 @@ sock_test_write (int fd, uint8_t *buf, uint32_t nbytes,
{
errno_val = errno;
perror ("ERROR in sock_test_write()");
- fprintf (stderr, "ERROR: socket write failed (errno = %d)!\n",
- errno_val);
+ fprintf (stderr, "SOCK_TEST: ERROR: socket write failed "
+ "(errno = %d)!\n", errno_val);
}
else if (stats)
stats->tx_bytes += tx_bytes;