18 #ifndef included_vlibmemory_api_common_h 19 #define included_vlibmemory_api_common_h 50 #define foreach_vl_aring_size \ 51 _(64+sizeof(ring_alloc_t), 1024) \ 52 _(256+sizeof(ring_alloc_t), 128) \ 53 _(1024+sizeof(ring_alloc_t), 64) 55 #define foreach_clnt_aring_size \ 56 _(1024+sizeof(ring_alloc_t), 1024) \ 57 _(2048+sizeof(ring_alloc_t), 128) \ 58 _(4096+sizeof(ring_alloc_t), 8) 88 #define VL_SHM_VERSION 2 90 #define VL_API_EPOCH_MASK 0xFF 91 #define VL_API_EPOCH_SHIFT 8 123 const char *client_name,
126 const char *client_name,
133 int is_private_region);
143 #define QUEUE_SIGNAL_EVENT 1 144 #define SOCKET_READ_EVENT 2 146 #define API_SOCKET_FILE "/run/vpp-api.sock" 204 #define SOCKET_CLIENT_DEFAULT_BUFFER_SIZE 4096 208 u8 * buffer,
uword buffer_bytes);
216 u8 * buffer,
uword buffer_bytes);
219 u8 * buffer,
uword buffer_bytes);
231 char *client_name,
u32 socket_buffer_size);
volatile int ** vl_api_queue_cursizes
vl_api_registration_t * regp
void * vl_msg_api_alloc_as_if_client(int nbytes)
void vl_set_api_memory_size(u64 size)
vl_api_registration_t * registration_pool
struct ring_alloc_ ring_alloc_t
void vl_client_disconnect(void)
void vl_socket_client_read_reply(socket_client_main_t *scm)
void vl_set_memory_gid(int gid)
void vl_init_shmem(svm_region_t *vlib_rp, int is_vlib, int is_private_region)
void vl_socket_process_msg(struct clib_file *uf, struct vl_api_registration_ *rp, i8 *input_v)
unix_shared_memory_queue_t * vl_input_queue
vl_socket_args_for_process_t * process_args
struct _vlib_node_registration vlib_node_registration_t
ring_alloc_t * client_rings
int control_pings_outstanding
void vl_set_memory_uid(int uid)
int vl_client_connect(const char *name, int ctx_quota, int input_queue_size)
void vl_api_socket_process_msg(clib_file_t *uf, vl_api_registration_t *rp, i8 *input_v)
void vl_client_api_unmap(void)
int vl_client_connect_to_vlib(const char *svm_name, const char *client_name, int rx_queue_size)
void * vl_msg_api_alloc(int nbytes)
void vl_free_socket_registration_index(u32 pool_index)
void vl_msg_api_free(void *)
vlib_node_registration_t memclnt_node
(constructor) VLIB_REGISTER_NODE (memclnt_node)
void vl_client_install_client_message_handlers(void)
void vl_api_send_pending_rpc_requests(vlib_main_t *vm)
void vl_socket_api_send(vl_api_registration_t *rp, u8 *elem)
void vl_set_global_memory_baseva(u64 baseva)
void vl_client_msg_api_send(vl_api_registration_t *cm, u8 *elem)
clib_error_t * vl_socket_write_ready(struct clib_file *uf)
socket_main_t socket_main
An API client registration, only in vpp/vlib.
void * vl_msg_api_alloc_as_if_client_or_null(int nbytes)
void vl_unmap_shmem(void)
clib_socket_t client_socket
clib_socket_t socksvr_listen_socket
u32 sockclnt_open_index(char *client_name, char *hostname, int port)
socket_client_main_t socket_client_main
void vl_set_global_pvt_heap_size(u64 size)
unix_shared_memory_queue_t * vl_api_client_index_to_input_queue(u32 index)
void vl_set_memory_region_name(const char *name)
void vl_api_rpc_call_main_thread(void *fp, u8 *data, u32 data_length)
u32 vl_api_memclnt_create_internal(char *, unix_shared_memory_queue_t *)
void vl_msg_api_send_shmem(unix_shared_memory_queue_t *q, u8 *elem)
int vl_socket_client_connect(socket_client_main_t *scm, char *socket_path, char *client_name, u32 socket_buffer_size)
struct _socket_t clib_socket_t
void vl_register_mapped_shmem_region(svm_region_t *rp)
int vl_client_connect_to_vlib_no_map(const char *svm_name, const char *client_name, int rx_queue_size)
vl_api_registration_t * current_rp
void vl_set_api_pvt_heap_size(u64 size)
void vl_socket_add_pending_output(struct clib_file *uf, struct vl_api_registration_ *rp, u8 *buffer, uword buffer_bytes)
clib_error_t * vl_socket_read_ready(struct clib_file *uf)
void vl_msg_api_send_shmem_nolock(unix_shared_memory_queue_t *q, u8 *elem)
void vl_socket_client_enable_disable(socket_client_main_t *scm, int enable)
void vl_client_disconnect_from_vlib(void)
void vl_socket_add_pending_output_no_flush(struct clib_file *uf, struct vl_api_registration_ *rp, u8 *buffer, uword buffer_bytes)
unix_shared_memory_queue_t * rp
vl_api_registration_t * sockclnt_get_registration(u32 index)
vl_api_registration_t * vl_api_client_index_to_registration(u32 index)
int vl_client_api_map(const char *region_name)
struct vl_shmem_hdr_ vl_shmem_hdr_t
void vl_set_global_memory_size(u64 size)
void vl_set_memory_root_path(const char *root_path)
int vl_client_connect_to_vlib_no_rx_pthread(const char *svm_name, const char *client_name, int rx_queue_size)
int vl_map_shmem(const char *region_name, int is_vlib)
void socksvr_add_pending_output(struct clib_file *uf, struct vl_api_registration_ *cf, u8 *buffer, uword buffer_bytes)
void vl_msg_api_send(vl_api_registration_t *rp, u8 *elem)
void * vl_msg_api_alloc_or_null(int nbytes)
u16 vl_client_get_first_plugin_msg_id(const char *plugin_name)
void sockclnt_close_index(u32 index)
struct _unix_shared_memory_queue unix_shared_memory_queue_t