FD.io VPP  v18.01-8-g0eacf49
Vector Packet Processing
builtin_proxy.h
Go to the documentation of this file.
1 
2 /*
3  * builtin_proxy.h - skeleton vpp engine plug-in header file
4  *
5  * Copyright (c) <current-year> <your-organization>
6  * Licensed under the Apache License, Version 2.0 (the "License");
7  * you may not use this file except in compliance with the License.
8  * You may obtain a copy of the License at:
9  *
10  * http://www.apache.org/licenses/LICENSE-2.0
11  *
12  * Unless required by applicable law or agreed to in writing, software
13  * distributed under the License is distributed on an "AS IS" BASIS,
14  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
15  * See the License for the specific language governing permissions and
16  * limitations under the License.
17  */
18 #ifndef __included_builtin_proxy_h__
19 #define __included_builtin_proxy_h__
20 
21 #include <vnet/vnet.h>
22 #include <vnet/ip/ip.h>
23 #include <vnet/ethernet/ethernet.h>
24 
25 #include <vppinfra/hash.h>
26 #include <vppinfra/error.h>
28 #include <svm/svm_fifo_segment.h>
29 #include <vnet/session/session.h>
31 
32 typedef struct
33 {
36 
40 
41 typedef struct
42 {
43  unix_shared_memory_queue_t *vl_input_queue; /**< vpe input queue */
44  /** per-thread vectors */
47  u8 **rx_buf; /**< intermediate rx buffers */
48 
49  u32 cli_node_index; /**< cli process node index */
50  u32 server_client_index; /**< server API client handle */
51  u32 server_app_index; /**< server app index */
52  u32 active_open_client_index; /**< active open API client handle */
53  u32 active_open_app_index; /**< active open index after attach */
54 
57 
58  /*
59  * Configuration params
60  */
61  u8 *connect_uri; /**< URI for slave's connect */
64  u32 private_segment_count; /**< Number of private fifo segs */
65  u32 private_segment_size; /**< size of private fifo segs */
67 
68  /*
69  * Test state variables
70  */
71  proxy_session_t *sessions; /**< Session pool, shared */
75 
76  /*
77  * Flags
78  */
80  u8 prealloc_fifos; /**< Request fifo preallocation */
81 
82  /*
83  * Convenience
84  */
89 
91 
92 #endif /* __included_builtin_proxy_h__ */
93 
94 /*
95  * fd.io coding-style-patch-verification: ON
96  *
97  * Local Variables:
98  * eval: (c-set-style "gnu")
99  * End:
100  */
u32 private_segment_size
size of private fifo segs
Definition: builtin_proxy.h:65
u32 server_app_index
server app index
Definition: builtin_proxy.h:51
u64 vpp_active_open_handle
Definition: builtin_proxy.h:38
clib_spinlock_t sessions_lock
Definition: builtin_proxy.h:72
vnet_main_t * vnet_main
Definition: builtin_proxy.h:86
uword * proxy_session_by_server_handle
Definition: builtin_proxy.h:55
proxy_session_t * sessions
Session pool, shared.
Definition: builtin_proxy.h:71
svm_fifo_t * server_rx_fifo
Definition: builtin_proxy.h:34
struct _svm_fifo svm_fifo_t
u32 active_open_client_index
active open API client handle
Definition: builtin_proxy.h:52
pthread_t client_thread_handle
Definition: builtin_proxy.h:74
vlib_main_t * vlib_main
Definition: builtin_proxy.h:85
unsigned long u64
Definition: types.h:89
u8 prealloc_fifos
Request fifo preallocation.
Definition: builtin_proxy.h:80
unix_shared_memory_queue_t ** server_event_queue
per-thread vectors
Definition: builtin_proxy.h:45
u32 server_client_index
server API client handle
Definition: builtin_proxy.h:50
u32 ** connection_index_by_thread
Definition: builtin_proxy.h:73
u32 private_segment_count
Number of private fifo segs.
Definition: builtin_proxy.h:64
unsigned int u32
Definition: types.h:88
uword * proxy_session_by_active_open_handle
Definition: builtin_proxy.h:56
u32 cli_node_index
cli process node index
Definition: builtin_proxy.h:49
u64 uword
Definition: types.h:112
ethernet_main_t * ethernet_main
Definition: builtin_proxy.h:87
svm_fifo_t * server_tx_fifo
Definition: builtin_proxy.h:35
unsigned char u8
Definition: types.h:56
unix_shared_memory_queue_t ** active_open_event_queue
Definition: builtin_proxy.h:46
u8 ** rx_buf
intermediate rx buffers
Definition: builtin_proxy.h:47
builtin_proxy_main_t builtin_proxy_main
Definition: builtin_proxy.c:22
unix_shared_memory_queue_t * vl_input_queue
vpe input queue
Definition: builtin_proxy.h:43
u32 active_open_app_index
active open index after attach
Definition: builtin_proxy.h:53
struct _unix_shared_memory_queue unix_shared_memory_queue_t
u8 * connect_uri
URI for slave&#39;s connect.
Definition: builtin_proxy.h:61