summaryrefslogtreecommitdiffstats
path: root/src/vlibmemory/socket_client.h
diff options
context:
space:
mode:
authorFlorin Coras <fcoras@cisco.com>2018-10-02 18:29:25 -0700
committerDave Barach <openvpp@barachs.net>2018-10-03 16:42:38 +0000
commit2881dec8631629cf1fa415a1f63b8561590df275 (patch)
tree4a497a6c5547ec53fcee5884f298e5f8a4650fd7 /src/vlibmemory/socket_client.h
parent5bdd55831e65ffd7bb0122bf31a6c07ef8f5138a (diff)
sock api: fix registrations and client reads
- When clients connect, instead of returing registration indicies return handles. By convention socket registrations will have the MSB set to 1. This makes it easy to distinguish them from shm registrations. - Fix client reads to allow for messages larger than 4kB (needed for the creat reply wherein the message table is provided). Change-Id: I7bc0a072d066dffbf2e3ad9ba3ed50291231af9d Signed-off-by: Florin Coras <fcoras@cisco.com>
Diffstat (limited to 'src/vlibmemory/socket_client.h')
-rw-r--r--src/vlibmemory/socket_client.h5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/vlibmemory/socket_client.h b/src/vlibmemory/socket_client.h
index 5612a9809a5..46e2c865250 100644
--- a/src/vlibmemory/socket_client.h
+++ b/src/vlibmemory/socket_client.h
@@ -25,8 +25,9 @@
typedef struct
{
int socket_fd;
- /* Temporarily disable the connection, so we can keep it around... */
- int socket_enable;
+ int socket_enable; /**< Can temporarily disable the connection
+ but still can keep it around... */
+ u32 client_index; /**< Client index allocated by VPP */
clib_socket_t client_socket;