FD.io VPP  v21.06-3-gbb25fbf28
Vector Packet Processing
session_types.h
Go to the documentation of this file.
1 /*
2  * Copyright (c) 2017-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 SRC_VNET_SESSION_SESSION_TYPES_H_
17 #define SRC_VNET_SESSION_SESSION_TYPES_H_
18 
19 #include <svm/svm_fifo.h>
21 
22 #define SESSION_INVALID_INDEX ((u32)~0)
23 #define SESSION_INVALID_HANDLE ((u64)~0)
24 #define SESSION_CTRL_MSG_MAX_SIZE 86
25 #define SESSION_NODE_FRAME_SIZE 128
26 
27 #define foreach_session_endpoint_fields \
28  foreach_transport_endpoint_cfg_fields \
29  _(u8, transport_proto) \
30 
31 typedef struct _session_endpoint
32 {
33 #define _(type, name) type name;
35 #undef _
37 
38 typedef struct _session_endpoint_cfg
39 {
40 #define _(type, name) type name;
42 #undef _
43  u32 app_wrk_index;
44  u32 opaque;
45  u32 ns_index;
46  u8 original_tp;
47  u64 parent_handle;
48  u8 flags;
51 
52 #define SESSION_IP46_ZERO \
53 { \
54  .ip6 = { \
55  { 0, 0, }, \
56  }, \
57 }
58 
59 #define TRANSPORT_ENDPOINT_NULL \
60 { \
61  .sw_if_index = ENDPOINT_INVALID_INDEX, \
62  .ip = SESSION_IP46_ZERO, \
63  .fib_index = ENDPOINT_INVALID_INDEX, \
64  .is_ip4 = 0, \
65  .port = 0, \
66 }
67 #define SESSION_ENDPOINT_NULL \
68 { \
69  .sw_if_index = ENDPOINT_INVALID_INDEX, \
70  .ip = SESSION_IP46_ZERO, \
71  .fib_index = ENDPOINT_INVALID_INDEX, \
72  .is_ip4 = 0, \
73  .port = 0, \
74  .peer = TRANSPORT_ENDPOINT_NULL, \
75  .transport_proto = 0, \
76 }
77 #define SESSION_ENDPOINT_CFG_NULL \
78  { \
79  .sw_if_index = ENDPOINT_INVALID_INDEX, .ip = SESSION_IP46_ZERO, \
80  .fib_index = ENDPOINT_INVALID_INDEX, .is_ip4 = 0, .port = 0, \
81  .peer = TRANSPORT_ENDPOINT_NULL, .transport_proto = 0, \
82  .app_wrk_index = ENDPOINT_INVALID_INDEX, \
83  .opaque = ENDPOINT_INVALID_INDEX, \
84  .parent_handle = SESSION_INVALID_HANDLE, .ext_cfg = 0, \
85  }
86 
87 #define session_endpoint_to_transport(_sep) ((transport_endpoint_t *)_sep)
88 #define session_endpoint_to_transport_cfg(_sep) \
89  ((transport_endpoint_cfg_t *)_sep)
90 
93 {
94  return sep->is_ip4 ? FIB_PROTOCOL_IP4 : FIB_PROTOCOL_IP6;
95 }
96 
97 static inline u8
99 {
100  return (ip_is_zero (&sep->ip, sep->is_ip4)
101  || ip_is_local_host (&sep->ip, sep->is_ip4));
102 }
103 
104 static inline u8
106 {
107  return ip_is_zero (&sep->ip, sep->is_ip4);
108 }
109 
112 
113 typedef enum
114 {
118 
119 typedef enum session_ft_action_
120 {
125 
126 /*
127  * Session states
128  */
129 #define foreach_session_state \
130  _(CREATED, "created") \
131  _(LISTENING, "listening") \
132  _(CONNECTING, "connecting") \
133  _(ACCEPTING, "accepting") \
134  _(READY, "ready") \
135  _(OPENED, "opened") \
136  _(TRANSPORT_CLOSING, "transport-closing") \
137  _(CLOSING, "closing") \
138  _(APP_CLOSED, "app-closed") \
139  _(TRANSPORT_CLOSED, "transport-closed") \
140  _(CLOSED, "closed") \
141  _(TRANSPORT_DELETED, "transport-deleted") \
142 
143 typedef enum
144 {
145 #define _(sym, str) SESSION_STATE_ ## sym,
147 #undef _
150 
151 #define foreach_session_flag \
152  _ (RX_EVT, "rx-event") \
153  _ (PROXY, "proxy") \
154  _ (CUSTOM_TX, "custom-tx") \
155  _ (IS_MIGRATING, "migrating") \
156  _ (UNIDIRECTIONAL, "unidirectional") \
157  _ (CUSTOM_FIFO_TUNING, "custom-fifo-tuning") \
158  _ (HALF_OPEN, "half-open")
159 
161 {
162 #define _(sym, str) SESSION_F_BIT_ ## sym,
164 #undef _
167 
168 typedef enum session_flags_
169 {
170 #define _(sym, str) SESSION_F_ ## sym = 1 << SESSION_F_BIT_ ## sym,
172 #undef _
174 
175 typedef struct session_
176 {
177  /** Pointers to rx/tx buffers. Once allocated, these do not move */
180 
181  /** Type built from transport and network protocol types */
183 
184  /** State in session layer state machine. See @ref session_state_t */
185  volatile u8 session_state;
186 
187  /** Index in thread pool where session was allocated */
189 
190  /** Index of the app worker that owns the session */
192 
193  /** Index of the thread that allocated the session */
195 
196  /** Session flags. See @ref session_flags_t */
198 
199  /** Index of the transport connection associated to the session */
201 
202  /** Index of application that owns the listener. Set only if a listener */
204 
205  union
206  {
207  /** Parent listener session index if the result of an accept */
209 
210  /** App listener index in app's listener pool if a listener */
212 
213  /** Index in app worker's half-open table if a half-open */
215  };
216 
217  /** Opaque, for general use */
219 
221 } session_t;
222 
225 {
226  return (proto << 1 | is_ip4);
227 }
228 
231 {
232  return (st >> 1);
233 }
234 
237 {
238  return (st & 1);
239 }
240 
243 {
244  return (s->session_type >> 1);
245 }
246 
249 {
250  u8 is_ip4 = s->session_type & 1;
251  return (is_ip4 ? FIB_PROTOCOL_IP4 : FIB_PROTOCOL_IP6);
252 }
253 
256 {
257  return (session_get_transport_proto (s) != TRANSPORT_PROTO_NONE);
258 }
259 
260 static inline transport_service_type_t
262 {
266 }
267 
268 static inline transport_tx_fn_type_t
270 {
273  return transport_protocol_tx_fn_type (tp);
274 }
275 
276 static inline u8
278 {
280 }
281 
284 {
285  return ((u64) s->thread_index << 32) | (u64) s->session_index;
286 }
287 
290 {
291  return handle & 0xFFFFFFFF;
292 }
293 
296 {
297  return handle >> 32;
298 }
299 
300 always_inline void
302  u32 * thread_index)
303 {
304  *index = session_index_from_handle (handle);
306 }
307 
308 static inline session_handle_t
309 session_make_handle (u32 session_index, u32 data)
310 {
311  return (((u64) data << 32) | (u64) session_index);
312 }
313 
316 {
317  return (ho_handle & 0xffffffff);
318 }
319 
322 {
323  return (ho_handle >> 32);
324 }
325 
326 typedef enum
327 {
364 
365 #define foreach_session_ctrl_evt \
366  _ (LISTEN, listen) \
367  _ (LISTEN_URI, listen_uri) \
368  _ (BOUND, bound) \
369  _ (UNLISTEN, unlisten) \
370  _ (UNLISTEN_REPLY, unlisten_reply) \
371  _ (ACCEPTED, accepted) \
372  _ (ACCEPTED_REPLY, accepted_reply) \
373  _ (CONNECT, connect) \
374  _ (CONNECT_URI, connect_uri) \
375  _ (CONNECTED, connected) \
376  _ (SHUTDOWN, shutdown) \
377  _ (DISCONNECT, disconnect) \
378  _ (DISCONNECTED, disconnected) \
379  _ (DISCONNECTED_REPLY, disconnected_reply) \
380  _ (RESET_REPLY, reset_reply) \
381  _ (REQ_WORKER_UPDATE, req_worker_update) \
382  _ (WORKER_UPDATE, worker_update) \
383  _ (WORKER_UPDATE_REPLY, worker_update_reply) \
384  _ (APP_DETACH, app_detach) \
385  _ (APP_ADD_SEGMENT, app_add_segment) \
386  _ (APP_DEL_SEGMENT, app_del_segment) \
387  _ (MIGRATED, migrated) \
388  _ (CLEANUP, cleanup) \
389  _ (APP_WRK_RPC, app_wrk_rpc) \
390  _ (TRANSPORT_ATTR, transport_attr) \
391  _ (TRANSPORT_ATTR_REPLY, transport_attr_reply) \
392 /* Deprecated and will be removed. Use types above */
393 #define FIFO_EVENT_APP_RX SESSION_IO_EVT_RX
394 #define FIFO_EVENT_APP_TX SESSION_IO_EVT_TX
395 #define FIFO_EVENT_DISCONNECT SESSION_CTRL_EVT_CLOSE
396 #define FIFO_EVENT_BUILTIN_RX SESSION_IO_EVT_BUILTIN_RX
397 #define FIFO_EVENT_BUILTIN_TX SESSION_IO_EVT_BUILTIN_TX
398 
399 typedef enum
400 {
405 
406 typedef struct
407 {
408  void *fp;
409  void *arg;
411 
412 typedef struct
413 {
414  u8 event_type;
415  u8 postponed;
416  union
417  {
418  u32 session_index;
420  session_rpc_args_t rpc_args;
421  u32 ctrl_data_index;
422  struct
423  {
424  u8 data[0];
425  };
426  };
427 } __clib_packed session_event_t;
428 
429 #define SESSION_MSG_NULL { }
430 
432 {
436 
437 typedef struct session_dgram_header_
438 {
441  ip46_address_t rmt_ip;
442  ip46_address_t lcl_ip;
446 } __clib_packed session_dgram_hdr_t;
447 
448 #define SESSION_CONN_ID_LEN 37
449 #define SESSION_CONN_HDR_LEN 45
450 
452  "session conn id wrong length");
453 
454 #define foreach_session_error \
455  _ (NONE, "no error") \
456  _ (UNKNOWN, "generic/unknown error") \
457  _ (REFUSED, "refused") \
458  _ (TIMEDOUT, "timedout") \
459  _ (ALLOC, "obj/memory allocation error") \
460  _ (OWNER, "object not owned by application") \
461  _ (NOROUTE, "no route") \
462  _ (NOINTF, "no resolving interface") \
463  _ (NOIP, "no ip for lcl interface") \
464  _ (NOPORT, "no lcl port") \
465  _ (NOSUPPORT, "not supported") \
466  _ (NOLISTEN, "not listening") \
467  _ (NOSESSION, "session does not exist") \
468  _ (NOAPP, "app not attached") \
469  _ (PORTINUSE, "lcl port in use") \
470  _ (IPINUSE, "ip in use") \
471  _ (ALREADY_LISTENING, "ip port pair already listened on") \
472  _ (INVALID_RMT_IP, "invalid remote ip") \
473  _ (INVALID_APPWRK, "invalid app worker") \
474  _ (INVALID_NS, "invalid namespace") \
475  _ (SEG_NO_SPACE, "Couldn't allocate a fifo pair") \
476  _ (SEG_NO_SPACE2, "Created segment, couldn't allocate a fifo pair") \
477  _ (SEG_CREATE, "Couldn't create a new segment") \
478  _ (FILTERED, "session filtered") \
479  _ (SCOPE, "scope not supported") \
480  _ (BAPI_NO_FD, "bapi doesn't have a socket fd") \
481  _ (BAPI_SEND_FD, "couldn't send fd over bapi socket fd") \
482  _ (BAPI_NO_REG, "app bapi registration not found") \
483  _ (MQ_MSG_ALLOC, "failed to alloc mq msg") \
484  _ (TLS_HANDSHAKE, "failed tls handshake") \
485  _ (EVENTFD_ALLOC, "failed to alloc eventfd") \
486  _ (NOEXTCFG, "no extended transport config") \
487  _ (NOCRYPTOENG, "no crypto engine") \
488  _ (NOCRYPTOCKP, "cert key pair not found ") \
489  _ (LOCAL_CONNECT, "could not connect with local scope")
490 
491 typedef enum session_error_p_
492 {
493 #define _(sym, str) SESSION_EP_##sym,
495 #undef _
498 
499 typedef enum session_error_
500 {
501 #define _(sym, str) SESSION_E_##sym = -SESSION_EP_##sym,
503 #undef _
505 
506 #define SESSION_CLI_ID_LEN "60"
507 #define SESSION_CLI_STATE_LEN "15"
508 
509 /* Maintained for compatibility. Will be deprecated */
510 #define SESSION_ERROR_SEG_CREATE SESSION_E_SEG_CREATE
511 #define SESSION_ERROR_NO_SPACE SESSION_E_SEG_NO_SPACE
512 #define SESSION_ERROR_NEW_SEG_NO_SPACE SESSION_E_SEG_NO_SPACE2
513 
514 #endif /* SRC_VNET_SESSION_SESSION_TYPES_H_ */
515 
516 /*
517  * fd.io coding-style-patch-verification: ON
518  *
519  * Local Variables:
520  * eval: (c-set-style "gnu")
521  * End:
522  */
SESSION_CTRL_EVT_SHUTDOWN
@ SESSION_CTRL_EVT_SHUTDOWN
Definition: session_types.h:348
SESSION_CTRL_EVT_RPC
@ SESSION_CTRL_EVT_RPC
Definition: session_types.h:333
SESSION_MQ_N_RINGS
@ SESSION_MQ_N_RINGS
Definition: session_types.h:403
session_error_t
enum session_error_ session_error_t
session_dgram_header_::data_length
u32 data_length
Definition: session_types.h:439
session_evt_type_t
session_evt_type_t
Definition: session_types.h:326
thread_index
u32 thread_index
Definition: nat44_ei_hairpinning.c:492
transport_protocol_tx_fn_type
transport_tx_fn_type_t transport_protocol_tx_fn_type(transport_proto_t tp)
Definition: transport.c:296
foreach_session_state
#define foreach_session_state
Definition: session_types.h:129
session_dgram_header_
Definition: session_types.h:437
session_::CLIB_CACHE_LINE_ALIGN_MARK
CLIB_CACHE_LINE_ALIGN_MARK(pad)
SESSION_N_FLAGS
@ SESSION_N_FLAGS
Definition: session_types.h:165
session_::session_index
u32 session_index
Index in thread pool where session was allocated.
Definition: session_types.h:188
SESSION_FT_ACTION_ENQUEUED
@ SESSION_FT_ACTION_ENQUEUED
Definition: session_types.h:121
SESSION_MQ_IO_EVT_RING
@ SESSION_MQ_IO_EVT_RING
Definition: session_types.h:401
session_type_t
u8 session_type_t
Definition: session_types.h:110
SESSION_CTRL_EVT_WORKER_UPDATE
@ SESSION_CTRL_EVT_WORKER_UPDATE
Definition: session_types.h:346
session_parse_handle
static void session_parse_handle(session_handle_t handle, u32 *index, u32 *thread_index)
Definition: session_types.h:301
SESSION_CTRL_EVT_CONNECTED
@ SESSION_CTRL_EVT_CONNECTED
Definition: session_types.h:341
session_flags_bits_
session_flags_bits_
Definition: session_types.h:160
SESSION_CTRL_EVT_DISCONNECTED
@ SESSION_CTRL_EVT_DISCONNECTED
Definition: session_types.h:342
session_dgram_hdr_t
struct session_dgram_header_ session_dgram_hdr_t
session_::tx_fifo
svm_fifo_t * tx_fifo
Definition: session_types.h:179
SESSION_CTRL_EVT_CONNECT
@ SESSION_CTRL_EVT_CONNECT
Definition: session_types.h:350
session_
Definition: session_types.h:175
session_endpoint_cfg_t
struct _session_endpoint_cfg session_endpoint_cfg_t
transport_service_type_t
enum transport_service_type_ transport_service_type_t
session_error_p_t
enum session_error_p_ session_error_p_t
session_handle_t
u64 session_handle_t
Definition: session_types.h:111
session_make_handle
static session_handle_t session_make_handle(u32 session_index, u32 data)
Definition: session_types.h:309
SESSION_FT_ACTION_DEQUEUED
@ SESSION_FT_ACTION_DEQUEUED
Definition: session_types.h:122
u16
unsigned short u16
Definition: types.h:57
SESSION_IO_EVT_RX
@ SESSION_IO_EVT_RX
Definition: session_types.h:328
session_::thread_index
u8 thread_index
Index of the thread that allocated the session.
Definition: session_types.h:194
session_::session_type
session_type_t session_type
Type built from transport and network protocol types.
Definition: session_types.h:182
SESSION_IO_EVT_BUILTIN_TX
@ SESSION_IO_EVT_BUILTIN_TX
Definition: session_types.h:332
session_tx_is_dgram
static u8 session_tx_is_dgram(session_t *s)
Definition: session_types.h:277
session_endpoint_is_local
static u8 session_endpoint_is_local(session_endpoint_t *sep)
Definition: session_types.h:98
session_thread_from_handle
static u32 session_thread_from_handle(session_handle_t handle)
Definition: session_types.h:295
session_type_transport_proto
static transport_proto_t session_type_transport_proto(session_type_t st)
Definition: session_types.h:230
session_error_
session_error_
Definition: session_types.h:499
session_t
struct session_ session_t
foreach_session_error
#define foreach_session_error
Definition: session_types.h:454
SESSION_CONN_ID_LEN
#define SESSION_CONN_ID_LEN
Definition: session_types.h:448
session_flags_
session_flags_
Definition: session_types.h:168
svm_fifo_t
struct _svm_fifo svm_fifo_t
SESSION_CLEANUP_TRANSPORT
@ SESSION_CLEANUP_TRANSPORT
Definition: session_types.h:115
transport_tx_fn_type_t
enum transport_dequeue_type_ transport_tx_fn_type_t
SESSION_CTRL_EVT_CLOSE
@ SESSION_CTRL_EVT_CLOSE
Definition: session_types.h:335
session_::app_wrk_index
u32 app_wrk_index
Index of the app worker that owns the session.
Definition: session_types.h:191
session_ft_action_t
enum session_ft_action_ session_ft_action_t
SESSION_CTRL_EVT_TRANSPORT_ATTR_REPLY
@ SESSION_CTRL_EVT_TRANSPORT_ATTR_REPLY
Definition: session_types.h:362
session_::rx_fifo
svm_fifo_t * rx_fifo
Pointers to rx/tx buffers.
Definition: session_types.h:178
SESSION_CTRL_EVT_UNLISTEN
@ SESSION_CTRL_EVT_UNLISTEN
Definition: session_types.h:354
SESSION_IO_EVT_BUILTIN_RX
@ SESSION_IO_EVT_BUILTIN_RX
Definition: session_types.h:331
SESSION_CTRL_EVT_UNLISTEN_REPLY
@ SESSION_CTRL_EVT_UNLISTEN_REPLY
Definition: session_types.h:338
svm_fifo.h
session_dgram_header_::lcl_port
u16 lcl_port
Definition: session_types.h:444
session_::app_index
u32 app_index
Index of application that owns the listener.
Definition: session_types.h:203
transport_endpt_ext_cfg_
Definition: transport_types.h:276
SESSION_CTRL_EVT_HALF_CLOSE
@ SESSION_CTRL_EVT_HALF_CLOSE
Definition: session_types.h:334
transport_types.h
SESSION_CTRL_EVT_BOUND
@ SESSION_CTRL_EVT_BOUND
Definition: session_types.h:337
STATIC_ASSERT
STATIC_ASSERT(sizeof(session_dgram_hdr_t)==(SESSION_CONN_ID_LEN+8), "session conn id wrong length")
SESSION_CTRL_EVT_LISTEN_URI
@ SESSION_CTRL_EVT_LISTEN_URI
Definition: session_types.h:353
session_endpoint_is_zero
static u8 session_endpoint_is_zero(session_endpoint_t *sep)
Definition: session_types.h:105
SESSION_CTRL_EVT_CLEANUP
@ SESSION_CTRL_EVT_CLEANUP
Definition: session_types.h:359
session_endpoint_fib_proto
static u8 session_endpoint_fib_proto(session_endpoint_t *sep)
Definition: session_types.h:92
SESSION_CTRL_EVT_LISTEN
@ SESSION_CTRL_EVT_LISTEN
Definition: session_types.h:352
ip_is_local_host
u8 ip_is_local_host(ip46_address_t *ip46_address, u8 is_ip4)
Definition: ip.c:31
SESSION_IO_EVT_TX_FLUSH
@ SESSION_IO_EVT_TX_FLUSH
Definition: session_types.h:330
session_type_is_ip4
static u8 session_type_is_ip4(session_type_t st)
Definition: session_types.h:236
session_get_fib_proto
static fib_protocol_t session_get_fib_proto(session_t *s)
Definition: session_types.h:248
SESSION_CTRL_EVT_DISCONNECTED_REPLY
@ SESSION_CTRL_EVT_DISCONNECTED_REPLY
Definition: session_types.h:343
session_index_from_handle
static u32 session_index_from_handle(session_handle_t handle)
Definition: session_types.h:289
session_ft_action_
session_ft_action_
Definition: session_types.h:119
session_handle
static session_handle_t session_handle(session_t *s)
Definition: session_types.h:283
session_dgram_pre_hdr_::data_length
u32 data_length
Definition: session_types.h:433
session_dgram_header_::data_offset
u32 data_offset
Definition: session_types.h:440
SESSION_FT_ACTION_N_ACTIONS
@ SESSION_FT_ACTION_N_ACTIONS
Definition: session_types.h:123
SESSION_IO_EVT_TX
@ SESSION_IO_EVT_TX
Definition: session_types.h:329
fib_protocol_t
enum fib_protocol_t_ fib_protocol_t
Protocol Type.
SESSION_CTRL_EVT_APP_DETACH
@ SESSION_CTRL_EVT_APP_DETACH
Definition: session_types.h:355
SESSION_CTRL_EVT_REQ_WORKER_UPDATE
@ SESSION_CTRL_EVT_REQ_WORKER_UPDATE
Definition: session_types.h:345
FIB_PROTOCOL_IP4
@ FIB_PROTOCOL_IP4
Definition: fib_types.h:36
session_rpc_args_t::fp
void * fp
Definition: session_types.h:408
session_::listener_handle
session_handle_t listener_handle
Parent listener session index if the result of an accept.
Definition: session_types.h:208
session_type_from_proto_and_ip
static session_type_t session_type_from_proto_and_ip(transport_proto_t proto, u8 is_ip4)
Definition: session_types.h:224
SESSION_CTRL_EVT_RESET_REPLY
@ SESSION_CTRL_EVT_RESET_REPLY
Definition: session_types.h:344
data
u8 data[128]
Definition: ipsec_types.api:92
session_dgram_pre_hdr_::data_offset
u32 data_offset
Definition: session_types.h:434
session_rpc_args_t::arg
void * arg
Definition: session_types.h:409
index
u32 index
Definition: flow_types.api:221
always_inline
#define always_inline
Definition: rdma_mlx5dv.h:23
TRANSPORT_TX_DGRAM
@ TRANSPORT_TX_DGRAM
datagram mode
Definition: transport_types.h:33
SESSION_CTRL_EVT_ACCEPTED
@ SESSION_CTRL_EVT_ACCEPTED
Definition: session_types.h:339
session_error_p_
session_error_p_
Definition: session_types.h:491
u64
unsigned long u64
Definition: types.h:89
session_dgram_header_::rmt_port
u16 rmt_port
Definition: session_types.h:443
session_state_t
session_state_t
Definition: session_types.h:143
session_::opaque
u32 opaque
Opaque, for general use.
Definition: session_types.h:218
session_flag_bits_t
enum session_flags_bits_ session_flag_bits_t
u32
unsigned int u32
Definition: types.h:88
SESSION_CLEANUP_SESSION
@ SESSION_CLEANUP_SESSION
Definition: session_types.h:116
transport_proto_t
enum _transport_proto transport_proto_t
FIB_PROTOCOL_IP6
@ FIB_PROTOCOL_IP6
Definition: fib_types.h:37
transport_protocol_service_type
transport_service_type_t transport_protocol_service_type(transport_proto_t tp)
Definition: transport.c:290
session_endpoint_t
struct _session_endpoint session_endpoint_t
SESSION_CTRL_EVT_APP_WRK_RPC
@ SESSION_CTRL_EVT_APP_WRK_RPC
Definition: session_types.h:360
SESSION_N_STATES
@ SESSION_N_STATES
Definition: session_types.h:148
session_get_transport_proto
static transport_proto_t session_get_transport_proto(session_t *s)
Definition: session_types.h:242
u8
unsigned char u8
Definition: types.h:56
SESSION_CTRL_EVT_CONNECT_URI
@ SESSION_CTRL_EVT_CONNECT_URI
Definition: session_types.h:351
session_transport_service_type
static transport_service_type_t session_transport_service_type(session_t *s)
Definition: session_types.h:261
SESSION_CTRL_EVT_TRANSPORT_ATTR
@ SESSION_CTRL_EVT_TRANSPORT_ATTR
Definition: session_types.h:361
session_flags_t
enum session_flags_ session_flags_t
SESSION_CTRL_EVT_RESET
@ SESSION_CTRL_EVT_RESET
Definition: session_types.h:336
SESSION_CTRL_EVT_DISCONNECT
@ SESSION_CTRL_EVT_DISCONNECT
Definition: session_types.h:349
session_handle_data
static u32 session_handle_data(session_handle_t ho_handle)
Definition: session_types.h:321
session_mq_rings_e
session_mq_rings_e
Definition: session_types.h:399
SESSION_CTRL_EVT_ACCEPTED_REPLY
@ SESSION_CTRL_EVT_ACCEPTED_REPLY
Definition: session_types.h:340
session_handle_index
static u32 session_handle_index(session_handle_t ho_handle)
Definition: session_types.h:315
session_::flags
u32 flags
Session flags.
Definition: session_types.h:197
session_dgram_header_::lcl_ip
ip46_address_t lcl_ip
Definition: session_types.h:442
SESSION_CTRL_EVT_MIGRATED
@ SESSION_CTRL_EVT_MIGRATED
Definition: session_types.h:358
session_::ho_index
u32 ho_index
Index in app worker's half-open table if a half-open.
Definition: session_types.h:214
pad
u8 pad[3]
log2 (size of the packing page block)
Definition: bihash_doc.h:61
session_transport_tx_fn_type
static transport_tx_fn_type_t session_transport_tx_fn_type(session_t *s)
Definition: session_types.h:269
session_::al_index
u32 al_index
App listener index in app's listener pool if a listener.
Definition: session_types.h:211
session_has_transport
static u8 session_has_transport(session_t *s)
Definition: session_types.h:255
proto
vl_api_ip_proto_t proto
Definition: acl_types.api:51
SESSION_MQ_CTRL_EVT_RING
@ SESSION_MQ_CTRL_EVT_RING
Definition: session_types.h:402
foreach_session_flag
#define foreach_session_flag
Definition: session_types.h:151
SESSION_CTRL_EVT_WORKER_UPDATE_REPLY
@ SESSION_CTRL_EVT_WORKER_UPDATE_REPLY
Definition: session_types.h:347
foreach_session_endpoint_fields
#define foreach_session_endpoint_fields
Definition: session_types.h:27
session_dgram_pre_hdr_
Definition: session_types.h:431
session_cleanup_ntf_t
session_cleanup_ntf_t
Definition: session_types.h:113
session_::session_state
volatile u8 session_state
State in session layer state machine.
Definition: session_types.h:185
session_dgram_pre_hdr_t
struct session_dgram_pre_hdr_ session_dgram_pre_hdr_t
session_dgram_header_::is_ip4
u8 is_ip4
Definition: session_types.h:445
session_::connection_index
u32 connection_index
Index of the transport connection associated to the session.
Definition: session_types.h:200
session_dgram_header_::rmt_ip
ip46_address_t rmt_ip
Definition: session_types.h:441
session_rpc_args_t
Definition: session_types.h:406
SESSION_N_ERRORS
@ SESSION_N_ERRORS
Definition: session_types.h:496
SESSION_CTRL_EVT_APP_ADD_SEGMENT
@ SESSION_CTRL_EVT_APP_ADD_SEGMENT
Definition: session_types.h:356
ip_is_zero
u8 ip_is_zero(ip46_address_t *ip46_address, u8 is_ip4)
Definition: ip.c:22
SESSION_CTRL_EVT_APP_DEL_SEGMENT
@ SESSION_CTRL_EVT_APP_DEL_SEGMENT
Definition: session_types.h:357
flags
vl_api_wireguard_peer_flags_t flags
Definition: wireguard.api:105