3 * tclient.h - skeleton vpp engine plug-in header file
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:
10 * http://www.apache.org/licenses/LICENSE-2.0
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.
18 #ifndef __included_tclient_h__
19 #define __included_tclient_h__
21 #include <vnet/vnet.h>
22 #include <vnet/ip/ip.h>
23 #include <vnet/ethernet/ethernet.h>
25 #include <vppinfra/hash.h>
26 #include <vppinfra/error.h>
27 #include <vlibmemory/unix_shared_memory_queue.h>
28 #include <svm/svm_fifo_segment.h>
29 #include <vnet/session/session.h>
30 #include <vnet/session/application_interface.h>
39 svm_fifo_t *server_rx_fifo;
40 svm_fifo_t *server_tx_fifo;
42 u64 vpp_session_handle;
47 /* API message ID base */
51 unix_shared_memory_queue_t *vl_input_queue;
53 /* API client handle */
56 /* The URI we're playing with */
62 /* Hash table for disconnect processing */
63 uword *session_index_by_vpp_handles;
65 /* intermediate rx buffer */
68 /* URI for slave's connect */
71 u32 connected_session_index;
75 /* drop all packets */
79 unix_shared_memory_queue_t *our_event_queue;
81 /* $$$ single thread only for the moment */
82 unix_shared_memory_queue_t *vpp_event_queue;
86 /* For deadman timers */
87 clib_time_t clib_time;
89 /* Connection counts */
90 u32 expected_connections;
91 volatile u32 ready_connections;
93 /* Signal variables */
94 volatile int run_test;
96 /* Number of iterations */
102 u32 configured_segment_size;
104 /* VNET_API_ERROR_FOO -> "Foo" hash table */
105 uword *error_string_by_error_number;
107 u8 *connect_test_data;
108 pthread_t client_thread_handle;
109 u32 client_bytes_received;
110 u8 test_return_packets;
117 vlib_main_t *vlib_main;
118 vnet_main_t *vnet_main;
119 ethernet_main_t *ethernet_main;
122 tclient_main_t tclient_main;
124 vlib_node_registration_t tclient_node;
126 #endif /* __included_tclient_h__ */
129 * fd.io coding-style-patch-verification: ON
132 * eval: (c-set-style "gnu")