FD.io VPP  v19.08.1-401-g8e4ed521a
Vector Packet Processing
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) 2017-2019 Cisco and/or its affiliates.
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_proxy_h__
19 #define __included_proxy_h__
20 
21 #include <vnet/vnet.h>
22 #include <vnet/ip/ip.h>
23 
24 #include <vppinfra/hash.h>
25 #include <vppinfra/error.h>
26 #include <vnet/session/session.h>
28 
29 typedef struct
30 {
33 
37 
38 typedef struct
39 {
40  svm_queue_t *vl_input_queue; /**< vpe input queue */
41  /** per-thread vectors */
44  u8 **rx_buf; /**< intermediate rx buffers */
45 
46  u32 cli_node_index; /**< cli process node index */
47  u32 server_client_index; /**< server API client handle */
48  u32 server_app_index; /**< server app index */
49  u32 active_open_client_index; /**< active open API client handle */
50  u32 active_open_app_index; /**< active open index after attach */
51 
54 
55  /*
56  * Configuration params
57  */
58  u8 *connect_uri; /**< URI for slave's connect */
61  u32 private_segment_count; /**< Number of private fifo segs */
62  u32 private_segment_size; /**< size of private fifo segs */
66 
67  /*
68  * Test state variables
69  */
70  proxy_session_t *sessions; /**< Session pool, shared */
74 
75  /*
76  * Flags
77  */
79  u8 prealloc_fifos; /**< Request fifo preallocation */
80 } proxy_main_t;
81 
83 
84 #endif /* __included_proxy_h__ */
85 
86 /*
87  * fd.io coding-style-patch-verification: ON
88  *
89  * Local Variables:
90  * eval: (c-set-style "gnu")
91  * End:
92  */
u64 vpp_active_open_handle
Definition: proxy.h:35
u32 private_segment_count
Number of private fifo segs.
Definition: proxy.h:61
svm_queue_t * vl_input_queue
vpe input queue
Definition: proxy.h:40
unsigned long u64
Definition: types.h:89
uword * proxy_session_by_server_handle
Definition: proxy.h:52
u8 is_init
Definition: proxy.h:78
unsigned char u8
Definition: types.h:56
svm_fifo_t * server_rx_fifo
Definition: proxy.h:31
struct _svm_fifo svm_fifo_t
u8 prealloc_fifos
Request fifo preallocation.
Definition: proxy.h:79
u32 fifo_size
Definition: proxy.h:60
u8 * connect_uri
URI for slave&#39;s connect.
Definition: proxy.h:58
proxy_main_t proxy_main
Definition: proxy.c:22
unsigned int u32
Definition: types.h:88
int rcv_buffer_size
Definition: proxy.h:63
u32 server_app_index
server app index
Definition: proxy.h:48
proxy_session_t * sessions
Session pool, shared.
Definition: proxy.h:70
u32 cli_node_index
cli process node index
Definition: proxy.h:46
u64 vpp_server_handle
Definition: proxy.h:34
svm_msg_q_t ** active_open_event_queue
Definition: proxy.h:43
u32 active_open_client_index
active open API client handle
Definition: proxy.h:49
u32 configured_segment_size
Definition: proxy.h:59
u32 server_client_index
server API client handle
Definition: proxy.h:47
u8 * server_uri
Definition: proxy.h:64
svm_msg_q_t ** server_event_queue
per-thread vectors
Definition: proxy.h:42
u32 active_open_app_index
active open index after attach
Definition: proxy.h:50
uword * proxy_session_by_active_open_handle
Definition: proxy.h:53
u8 ** rx_buf
intermediate rx buffers
Definition: proxy.h:44
u32 ** connection_index_by_thread
Definition: proxy.h:72
pthread_t client_thread_handle
Definition: proxy.h:73
clib_spinlock_t sessions_lock
Definition: proxy.h:71
u32 private_segment_size
size of private fifo segs
Definition: proxy.h:62
svm_fifo_t * server_tx_fifo
Definition: proxy.h:32
u64 uword
Definition: types.h:112
struct _svm_queue svm_queue_t
u8 * client_uri
Definition: proxy.h:65