diff options
author | Florin Coras <fcoras@cisco.com> | 2018-02-14 08:04:31 -0800 |
---|---|---|
committer | Damjan Marion <dmarion.lists@gmail.com> | 2018-02-15 10:53:33 +0000 |
commit | 5fda7a3925be145f0c326d0aecc36d883cbcb2ee (patch) | |
tree | 399956ed3c583d5e8e6d1d75847a11148ee252e6 /src/vnet/session/session.h | |
parent | fae4039ad2af251690e4cb79d5842a6e97029032 (diff) |
session: avoid session handle conflict with vcl
Change-Id: I7f5a3b8d92ef07d60315bab6e560eba49ea07249
Signed-off-by: Florin Coras <fcoras@cisco.com>
Diffstat (limited to 'src/vnet/session/session.h')
-rw-r--r-- | src/vnet/session/session.h | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/src/vnet/session/session.h b/src/vnet/session/session.h index 108e5fe259a..364c6462dec 100644 --- a/src/vnet/session/session.h +++ b/src/vnet/session/session.h @@ -25,6 +25,7 @@ #define HALF_OPEN_LOOKUP_INVALID_VALUE ((u64)~0) #define INVALID_INDEX ((u32)~0) #define SESSION_PROXY_LISTENER_INDEX ((u32)~0 - 1) +#define SESSION_LOCAL_HANDLE_PREFIX 0x7FFFFFFF /* TODO decide how much since we have pre-data as well */ #define MAX_HDRS_LEN 100 /* Max number of bytes for headers */ @@ -299,7 +300,7 @@ session_get_from_handle_if_valid (session_handle_t handle) always_inline u8 session_handle_is_local (session_handle_t handle) { - if ((handle >> 32) == SESSION_LOCAL_TABLE_PREFIX) + if ((handle >> 32) == SESSION_LOCAL_HANDLE_PREFIX) return 1; return 0; } @@ -310,6 +311,12 @@ session_type_transport_proto (session_type_t st) return (st >> 1); } +always_inline u8 +session_type_is_ip4 (session_type_t st) +{ + return (st & 1); +} + always_inline transport_proto_t session_get_transport_proto (stream_session_t * s) { |