FD.io VPP  v20.01-rc0-785-g1063f2ae8
Vector Packet Processing
memory_client.h
Go to the documentation of this file.
1 /*
2  *------------------------------------------------------------------
3  * Copyright (c) 2018 Cisco and/or its affiliates.
4  * Licensed under the Apache License, Version 2.0 (the "License");
5  * you may not use this file except in compliance with the License.
6  * You may obtain a copy of the License at:
7  *
8  * http://www.apache.org/licenses/LICENSE-2.0
9  *
10  * Unless required by applicable law or agreed to in writing, software
11  * distributed under the License is distributed on an "AS IS" BASIS,
12  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13  * See the License for the specific language governing permissions and
14  * limitations under the License.
15  *------------------------------------------------------------------
16  */
17 
18 #ifndef SRC_VLIBMEMORY_MEMORY_CLIENT_H_
19 #define SRC_VLIBMEMORY_MEMORY_CLIENT_H_
20 
22 #include <setjmp.h>
23 
24 /*
25  * Exported so folks can code a working custom rx_pthread function
26  */
27 typedef struct
28 {
32  pthread_t rx_thread_handle;
33  /* Plugin message base lookup scheme */
37 
39 
40 int vl_client_connect (const char *name, int ctx_quota, int input_queue_size);
41 void vl_client_send_disconnect (u8 do_cleanup);
42 int vl_client_disconnect (void);
43 int vl_client_api_map (const char *region_name);
44 void vl_client_api_unmap (void);
47 int vl_client_connect_to_vlib (const char *svm_name, const char *client_name,
48  int rx_queue_size);
49 int vl_client_connect_to_vlib_thread_fn (const char *svm_name,
50  const char *client_name,
51  int rx_queue_size,
52  void *(*)(void *));
53 int vl_client_connect_to_vlib_no_rx_pthread (const char *svm_name,
54  const char *client_name,
55  int rx_queue_size);
56 int vl_client_connect_to_vlib_no_map (const char *svm_name,
57  const char *client_name,
58  int rx_queue_size);
59 int vl_client_connect_to_vlib_no_rx_pthread_no_map (const char *svm_name,
60  const char *client_name,
61  int rx_queue_size);
64 
65 #endif /* SRC_VLIBMEMORY_MEMORY_CLIENT_H_ */
66 
67 /*
68  * fd.io coding-style-patch-verification: ON
69  *
70  * Local Variables:
71  * eval: (c-set-style "gnu")
72  * End:
73  */
void vl_client_disconnect_from_vlib_no_unmap(void)
int vl_client_disconnect(void)
int vl_client_connect_to_vlib_thread_fn(const char *svm_name, const char *client_name, int rx_queue_size, void *(*)(void *))
int vl_client_api_map(const char *region_name)
unsigned char u8
Definition: types.h:56
void vl_client_disconnect_from_vlib(void)
int vl_client_connect_to_vlib(const char *svm_name, const char *client_name, int rx_queue_size)
pthread_t rx_thread_handle
Definition: memory_client.h:32
unsigned short u16
Definition: types.h:57
memory_client_main_t memory_client_main
Definition: memory_client.c:47
void vl_client_install_client_message_handlers(void)
u8 name[64]
Definition: ip.api:42
u8 vl_mem_client_is_connected(void)
int vl_client_connect_to_vlib_no_rx_pthread(const char *svm_name, const char *client_name, int rx_queue_size)
int vl_client_connect_to_vlib_no_rx_pthread_no_map(const char *svm_name, const char *client_name, int rx_queue_size)
int vl_client_connect(const char *name, int ctx_quota, int input_queue_size)
void vl_client_api_unmap(void)
void vl_client_send_disconnect(u8 do_cleanup)
int vl_client_connect_to_vlib_no_map(const char *svm_name, const char *client_name, int rx_queue_size)
volatile u8 first_msg_id_reply_ready
Definition: memory_client.h:34