gso: use the header offsets from buffer metadata
[vpp.git] / src / plugins / hs_apps / sapi / vpp_echo_common.h
1 /*
2  * Copyright (c) 2019 Cisco and/or its affiliates.
3  * Licensed under the Apache License, Version 2.0 (the "License");
4  * you may not use this file except in compliance with the License.
5  * You may obtain a copy of the License at:
6  *
7  *     http://www.apache.org/licenses/LICENSE-2.0
8  *
9  * Unless required by applicable law or agreed to in writing, software
10  * distributed under the License is distributed on an "AS IS" BASIS,
11  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12  * See the License for the specific language governing permissions and
13  * limitations under the License.
14  */
15
16 #ifndef __included_vpp_echo_common_h__
17 #define __included_vpp_echo_common_h__
18
19 #include <vnet/session/application_interface.h>
20 #include <vnet/format_fns.h>
21 #include <vnet/session/session.api_enum.h>
22 #include <vnet/session/session.api_types.h>
23
24 #define TIMEOUT 10.0
25 #define LOGGING_BATCH (100)
26 #define LOG_EVERY_N_IDLE_CYCLES (1e8)
27 #define ECHO_MQ_SEG_HANDLE      ((u64) ~0 - 1)
28
29 #define ECHO_INVALID_SEGMENT_INDEX  ((u32) ~0)
30 #define ECHO_INVALID_SEGMENT_HANDLE ((u64) ~0)
31
32 #define foreach_echo_fail_code                                          \
33   _(ECHO_FAIL_NONE, "ECHO_FAIL_NONE")                                   \
34   _(ECHO_FAIL_USAGE, "ECHO_FAIL_USAGE")                                 \
35   _(ECHO_FAIL_SEND_IO_EVT, "ECHO_FAIL_SEND_IO_EVT")                     \
36   _(ECHO_FAIL_SOCKET_CONNECT, "ECHO_FAIL_SOCKET_CONNECT")               \
37   _(ECHO_FAIL_INIT_SHM_API, "ECHO_FAIL_INIT_SHM_API")                   \
38   _(ECHO_FAIL_SHMEM_CONNECT, "ECHO_FAIL_SHMEM_CONNECT")                 \
39   _(ECHO_FAIL_TEST_BYTES_ERR, "ECHO_FAIL_TEST_BYTES_ERR")               \
40   _(ECHO_FAIL_BIND, "ECHO_FAIL_BIND")                                   \
41   _(ECHO_FAIL_SESSION_ACCEPTED_BAD_LISTENER,                            \
42     "ECHO_FAIL_SESSION_ACCEPTED_BAD_LISTENER")                          \
43   _(ECHO_FAIL_ACCEPTED_WAIT_FOR_SEG_ALLOC,                              \
44     "ECHO_FAIL_ACCEPTED_WAIT_FOR_SEG_ALLOC")                            \
45   _(ECHO_FAIL_SESSION_CONNECT, "ECHO_FAIL_SESSION_CONNECT")             \
46   _(ECHO_FAIL_CONNECTED_WAIT_FOR_SEG_ALLOC,                             \
47     "ECHO_FAIL_CONNECTED_WAIT_FOR_SEG_ALLOC")                           \
48   _(ECHO_FAIL_APP_ATTACH, "ECHO_FAIL_APP_ATTACH")                       \
49   _(ECHO_FAIL_SERVER_DISCONNECT_TIMEOUT,                                \
50     "ECHO_FAIL_SERVER_DISCONNECT_TIMEOUT")                              \
51   _(ECHO_FAIL_INVALID_URI, "ECHO_FAIL_INVALID_URI")                     \
52   _(ECHO_FAIL_PROTOCOL_NOT_SUPPORTED,                                   \
53     "ECHO_FAIL_PROTOCOL_NOT_SUPPORTED")                                 \
54   _(ECHO_FAIL_CONNECT_TO_VPP, "ECHO_FAIL_CONNECT_TO_VPP")               \
55   _(ECHO_FAIL_ATTACH_TO_VPP, "ECHO_FAIL_ATTACH_TO_VPP")                 \
56   _(ECHO_FAIL_1ST_PTHREAD_CREATE, "ECHO_FAIL_1ST_PTHREAD_CREATE")       \
57   _(ECHO_FAIL_PTHREAD_CREATE, "ECHO_FAIL_PTHREAD_CREATE")               \
58   _(ECHO_FAIL_DETACH, "ECHO_FAIL_DETACH")                               \
59   _(ECHO_FAIL_DEL_CERT_KEY, "ECHO_FAIL_DEL_CERT_KEY")                               \
60   _(ECHO_FAIL_MQ_PTHREAD, "ECHO_FAIL_MQ_PTHREAD")                       \
61   _(ECHO_FAIL_VL_API_APP_ATTACH, "ECHO_FAIL_VL_API_APP_ATTACH")         \
62   _(ECHO_FAIL_VL_API_MISSING_SEGMENT_NAME,                              \
63     "ECHO_FAIL_VL_API_MISSING_SEGMENT_NAME")                            \
64   _(ECHO_FAIL_VL_API_NULL_APP_MQ, "ECHO_FAIL_VL_API_NULL_APP_MQ")       \
65   _(ECHO_FAIL_VL_API_RECV_FD_MSG, "ECHO_FAIL_VL_API_RECV_FD_MSG")       \
66   _(ECHO_FAIL_VL_API_SVM_FIFO_SEG_ATTACH,                               \
67     "ECHO_FAIL_VL_API_SVM_FIFO_SEG_ATTACH")                             \
68   _(ECHO_FAIL_VL_API_FIFO_SEG_ATTACH,                                   \
69     "ECHO_FAIL_VL_API_FIFO_SEG_ATTACH")                                 \
70   _(ECHO_FAIL_VL_API_DETACH_REPLY, "ECHO_FAIL_VL_API_DETACH_REPLY")     \
71   _(ECHO_FAIL_VL_API_BIND_URI_REPLY, "ECHO_FAIL_VL_API_BIND_URI_REPLY") \
72   _(ECHO_FAIL_VL_API_UNBIND_REPLY, "ECHO_FAIL_VL_API_UNBIND_REPLY")     \
73   _(ECHO_FAIL_SESSION_DISCONNECT, "ECHO_FAIL_SESSION_DISCONNECT")       \
74   _(ECHO_FAIL_SESSION_RESET, "ECHO_FAIL_SESSION_RESET")                 \
75   _(ECHO_FAIL_VL_API_CERT_KEY_ADD_REPLY,                                \
76     "ECHO_FAIL_VL_API_CERT_KEY_ADD_REPLY")                              \
77   _(ECHO_FAIL_VL_API_CERT_KEY_DEL_REPLY,                                \
78     "ECHO_FAIL_VL_API_CERT_KEY_DEL_REPLY")                              \
79   _(ECHO_FAIL_GET_SESSION_FROM_HANDLE,                                  \
80     "ECHO_FAIL_GET_SESSION_FROM_HANDLE")                                \
81   _(ECHO_FAIL_QUIC_WRONG_CONNECT, "ECHO_FAIL_QUIC_WRONG_CONNECT")       \
82   _(ECHO_FAIL_QUIC_WRONG_ACCEPT, "ECHO_FAIL_QUIC_WRONG_ACCEPT")         \
83   _(ECHO_FAIL_TCP_BAPI_CONNECT, "ECHO_FAIL_TCP_BAPI_CONNECT")           \
84   _(ECHO_FAIL_UDP_BAPI_CONNECT, "ECHO_FAIL_UDP_BAPI_CONNECT")           \
85   _(ECHO_FAIL_MISSING_START_EVENT, "ECHO_FAIL_MISSING_START_EVENT")     \
86   _(ECHO_FAIL_MISSING_END_EVENT, "ECHO_FAIL_MISSING_END_EVENT")         \
87   _(ECHO_FAIL_TEST_ASSERT_RX_TOTAL, "ECHO_FAIL_TEST_ASSERT_RX_TOTAL")   \
88   _(ECHO_FAIL_UNIDIRECTIONAL, "ECHO_FAIL_UNIDIRECTIONAL")               \
89   _(ECHO_FAIL_TEST_ASSERT_TX_TOTAL, "ECHO_FAIL_TEST_ASSERT_TX_TOTAL")   \
90   _(ECHO_FAIL_TEST_ASSERT_ALL_SESSIONS_CLOSED,                          \
91     "ECHO_FAIL_TEST_ASSERT_ALL_SESSIONS_CLOSED")                        \
92   _(ECHO_FAIL_RPC_SIZE, "ECHO_FAIL_RPC_SIZE")
93
94 typedef enum
95 {
96 #define _(sym, str) sym,
97   foreach_echo_fail_code
98 #undef _
99 } echo_fail_t;
100
101 extern char *echo_fail_code_str[];
102
103 #define CHECK_SAME(fail, expected, result, _fmt, _args...)      \
104 do {                                                            \
105   if ((expected) != (result))                                   \
106     ECHO_FAIL ((fail), "expected same (%lld, got %lld) : "_fmt, \
107                (u64)(expected), (u64)(result), ##_args);        \
108 } while (0)
109
110 #define CHECK_DIFF(fail, expected, result, _fmt, _args...)      \
111 do {                                                            \
112   if ((expected) == (result))                                   \
113     ECHO_FAIL ((fail), "expected different (both %lld) : "_fmt, \
114                (u64)(expected), ##_args);                       \
115 } while (0)
116
117 #define ECHO_FAIL(fail, _fmt, _args...)                                 \
118 do {                                                                    \
119     echo_main_t *em = &echo_main;                                       \
120     em->has_failed = (fail);                                            \
121     if (vec_len(em->fail_descr))                                        \
122       em->fail_descr = format(em->fail_descr, " | %s (%u): "_fmt,       \
123                               echo_fail_code_str[fail], fail, ##_args); \
124     else                                                                \
125       em->fail_descr = format(0, "%s (%u): "_fmt,                       \
126                               echo_fail_code_str[fail], fail, ##_args); \
127     em->time_to_stop = 1;                                               \
128     if (em->log_lvl > 0)                                                \
129       clib_warning ("%v", em->fail_descr);                              \
130 } while (0)
131
132 #define ECHO_LOG(lvl, _fmt,_args...)    \
133   {                                     \
134     echo_main_t *em = &echo_main;       \
135     if (em->log_lvl > lvl)              \
136          clib_warning (_fmt, ##_args);  \
137   }
138
139 #define ECHO_REGISTER_PROTO(proto, vft)                 \
140   static void __clib_constructor                        \
141   vpp_echo_init_##proto ()                              \
142   {                                                     \
143     echo_main_t *em = &echo_main;                       \
144     vec_validate (em->available_proto_cb_vft, proto);   \
145     em->available_proto_cb_vft[proto] = &vft;           \
146   }
147
148 typedef struct
149 {
150   CLIB_CACHE_LINE_ALIGN_MARK (cacheline0);
151 #define _(type, name) type name;
152   foreach_app_session_field
153 #undef _
154   u64 vpp_session_handle;
155   u64 bytes_sent;
156   u64 bytes_to_send;
157   volatile u64 bytes_received;
158   volatile u64 bytes_to_receive;
159   f64 start;
160   u32 listener_index;           /* listener index in echo session pool */
161   u32 idle_cycles;              /* consecutive enq/deq with no data */
162   volatile u64 accepted_session_count;  /* sessions we accepted (as a listener) */
163 } echo_session_t;
164
165 typedef enum
166 {
167   ECHO_NO_DATA_SOURCE,
168   ECHO_TEST_DATA_SOURCE,
169   ECHO_RX_DATA_SOURCE,
170   ECHO_INVALID_DATA_SOURCE
171 } data_source_t;
172
173 enum echo_close_f_t
174 {
175   ECHO_CLOSE_F_INVALID = 0,
176   ECHO_CLOSE_F_PASSIVE,         /* wait for close msg */
177   ECHO_CLOSE_F_ACTIVE,          /* send close msg */
178   ECHO_CLOSE_F_NONE,            /* don't bother sending close msg */
179 };
180
181 enum quic_session_type_t
182 {
183   ECHO_SESSION_TYPE_QUIC,
184   ECHO_SESSION_TYPE_STREAM,
185   ECHO_SESSION_TYPE_LISTEN,
186 };
187
188 enum quic_session_state_t
189 {
190   ECHO_SESSION_STATE_INITIAL,
191   ECHO_SESSION_STATE_READY,
192   ECHO_SESSION_STATE_AWAIT_CLOSING,     /* Data transfer is done, wait for close evt */
193   ECHO_SESSION_STATE_AWAIT_DATA,        /* Peer closed, wait for outstanding data */
194   ECHO_SESSION_STATE_CLOSING,   /* told vpp to close */
195   ECHO_SESSION_STATE_CLOSED,    /* closed in vpp */
196 };
197
198 typedef enum
199 {
200   STATE_START,
201   STATE_ATTACHED_NO_CERT,
202   STATE_ATTACHED,
203   STATE_LISTEN,
204   STATE_READY,
205   STATE_DATA_DONE,
206   STATE_DISCONNECTED,
207   STATE_CLEANED_CERT_KEY,
208   STATE_DETACHED
209 } connection_state_t;
210
211 typedef enum echo_test_evt_
212 {
213   ECHO_EVT_START = 1,           /* app starts */
214   ECHO_EVT_FIRST_QCONNECT = (1 << 1),   /* First connect Quic session sent */
215   ECHO_EVT_LAST_QCONNECTED = (1 << 2),  /* All Quic session are connected */
216   ECHO_EVT_FIRST_SCONNECT = (1 << 3),   /* First connect Stream session sent */
217   ECHO_EVT_LAST_SCONNECTED = (1 << 4),  /* All Stream session are connected */
218   ECHO_EVT_LAST_BYTE = (1 << 5),        /* Last byte received */
219   ECHO_EVT_EXIT = (1 << 6),     /* app exits */
220 } echo_test_evt_t;
221
222 typedef union session_connected_bundled_msg_
223 {
224   session_connected_msg_t *mp;
225 } session_connected_bundled_msg_t;
226
227 typedef struct echo_proto_cb_vft_
228 {
229   void (*connected_cb) (session_connected_bundled_msg_t * mp, u32 session_index, u8 is_failed); /* Session is connected */
230   void (*accepted_cb) (session_accepted_msg_t * mp, echo_session_t * session);  /* Session got accepted */
231   void (*bound_uri_cb) (session_bound_msg_t * mp, echo_session_t * session);    /* Session got bound */
232   void (*reset_cb) (session_reset_msg_t * mp, echo_session_t * s);      /* Received RESET on session */
233   void (*disconnected_cb) (session_disconnected_msg_t * mp, echo_session_t * s);        /* Received DISCONNECT on session */
234   void (*sent_disconnect_cb) (echo_session_t * s);      /* ACK disconnect we sent to vpp */
235   void (*cleanup_cb) (echo_session_t * s, u8 parent_died);      /* Session should be cleaned up (parent listener may be dead) */
236   /* Add CLI options */
237   int (*process_opts_cb) (unformat_input_t * a);
238   void (*set_defaults_before_opts_cb) (void);
239   void (*set_defaults_after_opts_cb) (void);
240   void (*print_usage_cb) (void);
241 } echo_proto_cb_vft_t;
242
243 typedef enum
244 {
245   RETURN_PACKETS_NOTEST,
246   RETURN_PACKETS_LOG_WRONG,
247   RETURN_PACKETS_ASSERT,
248 } test_return_packets_t;
249
250 typedef struct teardown_stat_
251 {
252   u32 q;                        /* quic sessions */
253   u32 s;                        /* stream sessions */
254 } teardown_stat_t;
255
256 typedef struct echo_stats_
257 {
258   u64 tx_total;
259   u64 rx_total;
260   u64 tx_expected;
261   u64 rx_expected;
262   teardown_stat_t reset_count;  /* received reset from vpp */
263   teardown_stat_t close_count;  /* received close from vpp */
264   teardown_stat_t active_count; /* sent close to vpp */
265   teardown_stat_t clean_count;  /* cleaned up stale session */
266   teardown_stat_t connected_count;      /* connected sessions count */
267   teardown_stat_t accepted_count;       /* connected sessions count */
268 } echo_stats_t;
269
270 typedef struct
271 {
272   svm_queue_t *vl_input_queue;  /* vpe input queue */
273   u32 my_client_index;          /* API client handle */
274   u8 *uri;                      /* The URI we're playing with */
275   u8 *app_name;
276   u32 n_uris;                   /* Cycle through adjacent ips */
277   ip46_address_t lcl_ip;        /* Local ip for client */
278   u8 lcl_ip_set;
279   echo_session_t *sessions;     /* Session pool */
280   svm_msg_q_t *app_mq;          /* Our receiveing event queue */
281   svm_msg_q_t *ctrl_mq;         /* Our control queue (towards vpp) */
282   clib_time_t clib_time;        /* For deadman timers */
283   u8 *socket_name;
284   u8 use_app_socket_api;
285   clib_socket_t app_api_sock;
286   int i_am_master;
287   u32 *listen_session_indexes;  /* vec of vpp listener sessions */
288   volatile u32 listen_session_cnt;
289
290   uword *session_index_by_vpp_handles;  /* Hash table : quic_echo s_id -> vpp s_handle */
291   clib_spinlock_t sid_vpp_handles_lock; /* Hash table lock */
292
293   uword *shared_segment_handles;        /* Hash table : segment_names -> 1 */
294   clib_spinlock_t segment_handles_lock; /* Hash table lock */
295   echo_proto_cb_vft_t *proto_cb_vft;
296   svm_msg_q_t rpc_msq_queue; /* MQ between quic_echo threads */
297   fifo_segment_main_t segment_main;
298
299   /* State of the connection, shared between msg RX thread and main thread */
300   volatile connection_state_t state;
301   volatile u8 time_to_stop;     /* Signal variables */
302   u8 rx_results_diff;           /* Rx results will be different than cfg */
303   u8 tx_results_diff;           /* Tx results will be different than cfg */
304   u8 has_failed;                /* stores the exit code */
305   u8 *fail_descr;               /* vector containing fail description */
306
307   /** Flag that decides if socket, instead of svm, api is used to connect to
308    * vpp. If sock api is used, shm binary api is subsequently bootstrapped
309    * and all other messages are exchanged using shm IPC. */
310   u8 use_sock_api;
311
312   u8 *connect_test_data;
313   u8 test_return_packets;
314   u64 bytes_to_send;            /* target per stream */
315   u64 bytes_to_receive;         /* target per stream */
316   u32 fifo_size;
317   u32 prealloc_fifo_pairs;
318   u64 rx_buf_size;
319   u64 tx_buf_size;
320   data_source_t data_source;    /* Use no/placeholder/mirrored data */
321   u8 send_stream_disconnects;   /* actively send disconnect */
322   u8 output_json;               /* Output stats as JSON */
323   volatile u8 wait_for_gdb;     /* Wait for gdb to attach */
324   u8 log_lvl;                   /* Verbosity of the logging */
325   int max_test_msg;             /* Limit the number of incorrect data messages */
326   u32 evt_q_size;               /* Size of the vpp MQ (app<->vpp events) */
327   u32 ckpair_index;             /* Cert key pair used */
328   u8 crypto_engine;             /* crypto engine used */
329   u8 connect_flag;              /* flags to pass to mq connect */
330   u32 periodic_stats_delta;     /* seconds between periodic stats */
331
332   u8 *appns_id;
333   u64 appns_flags;
334   u64 appns_secret;
335
336   pthread_t *data_thread_handles;       /* vec of data thread handles */
337   pthread_t mq_thread_handle;   /* Message queue thread handle */
338   u32 *volatile data_thread_args;
339
340   u32 n_connects;               /* Target number of connects to send */
341   u32 n_sessions;               /* Number of sessions to prealloc */
342   u32 n_clients;                /* Target number of clients doing RX/TX */
343   u32 n_rx_threads;             /* Number of data threads */
344
345   volatile u32 n_clients_connected;     /* Number of STREAM sessions connected */
346   volatile u32 nxt_available_sidx;      /* next unused prealloced session_index */
347
348   volatile int max_sim_connects;
349
350   /* VNET_API_ERROR_FOO -> "Foo" hash table */
351   uword *error_string_by_error_number;
352   echo_proto_cb_vft_t **available_proto_cb_vft;
353
354   echo_stats_t stats;
355   echo_stats_t last_stat_sampling;      /* copy of stats at last sampling */
356   f64 last_stat_sampling_ts;
357
358   struct                        /* Event based timing : start & end depend on CLI specified events */
359   {
360     f64 start_time;
361     f64 end_time;
362     u8 events_sent;
363     u8 start_event;
364     u8 end_event;
365   } timing;
366
367   struct
368   {
369     u32 transport_proto;
370     ip46_address_t ip;
371     u32 port;
372     u8 is_ip4;
373   } uri_elts;
374 } echo_main_t;
375
376 extern echo_main_t echo_main;
377
378
379 typedef struct echo_connect_args_
380 {
381   u32 context;
382   u64 parent_session_handle;
383   ip46_address_t ip;
384   ip46_address_t lcl_ip;
385 } echo_connect_args_t;
386
387 typedef struct echo_disconnect_args_
388 {
389   u64 session_handle;
390 } echo_disconnect_args_t;
391
392 typedef union
393 {
394   echo_connect_args_t connect;
395   echo_disconnect_args_t disconnect;
396 } echo_rpc_args_t;
397
398 typedef void (*echo_rpc_t) (echo_main_t * em, echo_rpc_args_t * arg);
399
400 typedef struct
401 {
402   void *fp;
403   echo_rpc_args_t args;
404 } echo_rpc_msg_t;
405
406
407 u8 *format_ip4_address (u8 * s, va_list * args);
408 u8 *format_ip6_address (u8 * s, va_list * args);
409 u8 *format_ip46_address (u8 * s, va_list * args);
410 u8 *format_api_error (u8 * s, va_list * args);
411 void init_error_string_table ();
412 u8 *echo_format_session (u8 * s, va_list * args);
413 u8 *echo_format_session_type (u8 * s, va_list * args);
414 u8 *echo_format_session_state (u8 * s, va_list * args);
415 u8 *echo_format_app_state (u8 * s, va_list * args);
416 uword echo_unformat_close (unformat_input_t * input, va_list * args);
417 uword echo_unformat_timing_event (unformat_input_t * input, va_list * args);
418 u8 *echo_format_timing_event (u8 * s, va_list * args);
419 uword unformat_transport_proto (unformat_input_t * input, va_list * args);
420 u8 *format_transport_proto (u8 * s, va_list * args);
421 uword unformat_ip4_address (unformat_input_t * input, va_list * args);
422 uword unformat_ip6_address (unformat_input_t * input, va_list * args);
423
424 void echo_session_handle_add_del (echo_main_t * em, u64 handle, u32 sid);
425 echo_session_t *echo_session_new (echo_main_t * em);
426 int echo_send_rpc (echo_main_t * em, void *fp, echo_rpc_args_t * args);
427 echo_session_t *echo_get_session_from_handle (echo_main_t * em, u64 handle);
428 int wait_for_state_change (echo_main_t * em, connection_state_t state,
429                            f64 timeout);
430 void echo_notify_event (echo_main_t * em, echo_test_evt_t e);
431 void echo_session_print_stats (echo_main_t * em, echo_session_t * session);
432 u8 *echo_format_crypto_engine (u8 * s, va_list * args);
433 uword echo_unformat_crypto_engine (unformat_input_t * input, va_list * args);
434 u8 *echo_format_bytes_per_sec (u8 * s, va_list * args);
435 int echo_segment_attach (u64 segment_handle, char *name,
436                          ssvm_segment_type_t type, int fd);
437 u32 echo_segment_lookup (u64 segment_handle);
438 void echo_segment_detach (u64 segment_handle);
439 int echo_attach_session (uword segment_handle, uword rxf_offset,
440                          uword mq_offset, uword txf_offset, echo_session_t *s);
441 int echo_segment_attach_mq (uword segment_handle, uword mq_offset,
442                             u32 mq_index, svm_msg_q_t **mq);
443 svm_fifo_chunk_t *echo_segment_alloc_chunk (uword segment_handle,
444                                             u32 slice_index, u32 size,
445                                             uword *offset);
446
447 /* Binary API */
448
449 void echo_send_attach (echo_main_t * em);
450 void echo_send_detach (echo_main_t * em);
451 void echo_send_listen (echo_main_t * em, ip46_address_t * ip);
452 void echo_send_unbind (echo_main_t * em, echo_session_t * s);
453 void echo_send_connect (echo_main_t * em, void *args);
454 void echo_send_disconnect_session (echo_main_t * em, void *args);
455 void echo_api_hookup (echo_main_t * em);
456 void echo_send_add_cert_key (echo_main_t * em);
457 void echo_send_del_cert_key (echo_main_t * em);
458 int echo_bapi_recv_fd (echo_main_t *em, int *fds, int n_fds);
459
460 /* Session socket API */
461 int echo_sapi_attach (echo_main_t *em);
462 int echo_sapi_add_cert_key (echo_main_t *em);
463 int echo_sapi_del_cert_key (echo_main_t *em);
464 int echo_api_connect_app_socket (echo_main_t *em);
465 int echo_sapi_detach (echo_main_t *em);
466 int echo_sapi_recv_fd (echo_main_t *em, int *fds, int n_fds);
467
468 #endif /* __included_vpp_echo_common_h__ */
469
470 /*
471  * fd.io coding-style-patch-verification: ON
472  *
473  * Local Variables:
474  * eval: (c-set-style "gnu")
475  * End:
476  */