summaryrefslogtreecommitdiffstats
path: root/src/vlibapi/api.h
AgeCommit message (Expand)AuthorFilesLines
2021-09-28api: API trace improvementsFilip Tehlar1-2/+7
2020-05-04misc: binary api fuzz test fixesDave Barach1-0/+1
2019-12-10api: multiple connections per processDave Barach1-1/+1
2019-12-06api: avoid swapping vlib_rp before barrier syncFlorin Coras1-2/+3
2019-08-08api: vppapitrace JSON/API trace converterOle Troan1-2/+2
2018-06-13Stat segment / client: show run" works nowDave Barach1-1/+1
2018-01-09api: refactor vlibmemoryFlorin Coras1-9/+7
2017-10-09vppapigen: support per-file (major,minor,patch) version stampsDave Barach1-0/+2
2017-07-01Refactor API message handling codeKlement Sekera1-255/+25
2017-06-01Improve fifo allocator performanceDave Barach1-0/+3
2017-05-17Add vl_msg_api_get_message_length[_inline]Dave Barach1-0/+11
2017-05-03A sprinkling of const in vlibmemory/api.h and friendsNeale Ranns1-5/+6
2017-03-14Clean up dead API client reaper callack schemeDave Barach1-0/+44
2017-03-09vlib_mains == 0 special cases be goneDave Barach1-1/+3
2017-03-03Improve api trace replay consistency checkingDave Barach1-0/+3
2017-03-02Clean up binary api message handler registration issuesDave Barach1-0/+15
2017-01-09Self-service garbage collection for the API message allocatorDave Barach1-1/+2
2016-12-28Reorganize source tree to use single autotools instanceDamjan Marion1-0/+281
* Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at: * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. *------------------------------------------------------------------ */ #ifndef SRC_VLIBMEMORY_SOCKET_API_H_ #define SRC_VLIBMEMORY_SOCKET_API_H_ #include <vlibapi/api_common.h> #include <svm/ssvm.h> #include <vppinfra/file.h> /* Deprecated */ #define API_SOCKET_FILE "/run/vpp/api.sock" #define API_SOCKET_FILENAME "api.sock" typedef struct { clib_file_t *clib_file; vl_api_registration_t *regp; u8 *data; } vl_socket_args_for_process_t; typedef struct { /* Server port number */ u8 *socket_name; /* By default, localhost... */ u32 bind_address; /* * (listen, server, client) registrations. Shared memory * registrations are in shared memory */ vl_api_registration_t *registration_pool; /* * Chain-drag variables, so message API handlers * (generally) don't know whether they're talking to a socket * or to a shared-memory connection. */ vl_api_registration_t *current_rp; clib_file_t *current_uf; /* One input buffer, shared across all sockets */ i8 *input_buffer; /* pool of process args for socket clients */ vl_socket_args_for_process_t *process_args; /* Listen for API connections here */ clib_socket_t socksvr_listen_socket; } socket_main_t; extern socket_main_t socket_main; void vl_socket_free_registration_index (u32 pool_index); clib_error_t *vl_socket_read_ready (struct clib_file *uf); clib_error_t *vl_socket_write_ready (struct clib_file *uf); void vl_socket_api_send (vl_api_registration_t * rp, u8 * elem); void vl_socket_process_api_msg (clib_file_t * uf, vl_api_registration_t * rp, i8 * input_v); void vl_sock_api_dump_clients (vlib_main_t * vm, api_main_t * am); clib_error_t *vl_sock_api_init (vlib_main_t * vm); 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_handle_to_registration (u32 idx); u8 vl_socket_api_registration_handle_is_valid (u32 reg_index); #endif /* SRC_VLIBMEMORY_SOCKET_API_H_ */ /* * fd.io coding-style-patch-verification: ON * * Local Variables: * eval: (c-set-style "gnu") * End: */