diff options
author | Florin Coras <fcoras@cisco.com> | 2018-10-02 18:29:25 -0700 |
---|---|---|
committer | Dave Barach <openvpp@barachs.net> | 2018-10-03 16:42:38 +0000 |
commit | 2881dec8631629cf1fa415a1f63b8561590df275 (patch) | |
tree | 4a497a6c5547ec53fcee5884f298e5f8a4650fd7 /src/vlibmemory/socket_api.h | |
parent | 5bdd55831e65ffd7bb0122bf31a6c07ef8f5138a (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_api.h')
-rw-r--r-- | src/vlibmemory/socket_api.h | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/vlibmemory/socket_api.h b/src/vlibmemory/socket_api.h index 00985fe7591..f3af300238c 100644 --- a/src/vlibmemory/socket_api.h +++ b/src/vlibmemory/socket_api.h @@ -75,7 +75,8 @@ clib_error_t *vl_sock_api_send_fd_msg (int socket_fd, int fds[], int n_fds); clib_error_t *vl_sock_api_recv_fd_msg (int socket_fd, int fds[], int n_fds, u32 wait); -vl_api_registration_t *vl_socket_api_client_index_to_registration (u32 index); +vl_api_registration_t *vl_socket_api_client_handle_to_registration (u32 idx); +u8 vl_socket_api_registration_handle_is_valid (u32 reg_index); #endif /* SRC_VLIBMEMORY_SOCKET_API_H_ */ |