LCOV - code coverage report
Current view: top level - vnet/session - session_types.h (source / functions) Hit Total Coverage
Test: coverage-filtered.info Lines: 30 35 85.7 %
Date: 2023-10-26 01:39:38 Functions: 13 15 86.7 %

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

Generated by: LCOV version 1.14