FD.io VPP
v21.06-3-gbb25fbf28
Vector Packet Processing
Main Page
Related Pages
Modules
Namespaces
Namespace List
Namespace Members
All
b
d
e
f
g
i
l
m
n
o
p
r
s
t
v
w
Functions
d
f
g
l
m
n
o
p
t
v
Variables
Typedefs
Enumerations
Enumerator
Data Structures
Data Structures
Data Structure Index
Class Hierarchy
Data Fields
All
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
~
Functions
a
b
c
d
e
f
g
h
i
k
l
m
n
o
p
r
s
t
u
v
w
z
~
Variables
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
Typedefs
c
e
g
h
k
m
n
o
r
s
Related Functions
c
d
e
h
i
m
o
p
r
s
v
Source
Files
Symbols
All
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
z
Functions
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
z
Variables
a
b
c
d
e
f
g
h
i
k
l
m
n
o
p
q
r
s
t
u
v
w
x
z
Typedefs
a
b
c
d
e
f
g
h
i
l
m
n
o
p
q
r
s
t
u
v
w
x
z
Enumerations
a
b
c
d
e
f
g
h
i
l
m
n
o
p
q
r
s
t
u
v
w
x
Enumerator
a
b
c
d
e
f
g
h
i
k
l
m
n
o
p
q
r
s
t
u
v
w
Macros
a
b
c
d
e
f
g
h
i
k
l
m
n
o
p
q
r
s
t
u
v
w
x
z
•
All
Data Structures
Namespaces
Files
Functions
Variables
Typedefs
Enumerations
Enumerator
Friends
Macros
Modules
Pages
session_table.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_TABLE_H_
17
#define SRC_VNET_SESSION_SESSION_TABLE_H_
18
19
#include <
vppinfra/bihash_16_8.h
>
20
#include <
vppinfra/bihash_48_8.h
>
21
#include <
vnet/session/session_rules_table.h
>
22
23
typedef
struct
_session_lookup_table
24
{
25
/**
26
* Lookup tables for established sessions and listeners
27
*/
28
clib_bihash_16_8_t v4_session_hash;
29
clib_bihash_48_8_t v6_session_hash;
30
31
/**
32
* Lookup tables for half-open sessions
33
*/
34
clib_bihash_16_8_t v4_half_open_hash;
35
clib_bihash_48_8_t v6_half_open_hash;
36
37
/**
38
* Per fib proto and transport proto session rules tables
39
*/
40
session_rules_table_t
*session_rules;
41
42
/** Flag that indicates if table has local scope */
43
u8
is_local
;
44
45
/** Namespace this table belongs to */
46
u32
appns_index;
47
48
/** For global tables only one fib proto is active. This is a
49
* byproduct of fib table ids not necessarily being the same for
50
* identical fib idices of v4 and v6 fib protos */
51
u8
active_fib_proto;
52
/* Required for pool_get_aligned(...) */
53
CLIB_CACHE_LINE_ALIGN_MARK
(cacheline0);
54
}
session_table_t
;
55
56
#define SESSION_TABLE_INVALID_INDEX ((u32)~0)
57
#define SESSION_LOCAL_TABLE_PREFIX ((u32)~0)
58
#define SESSION_DROP_HANDLE (((u64)~0) - 1)
59
60
typedef
int (*
ip4_session_table_walk_fn_t
) (
clib_bihash_kv_16_8_t
* kvp,
61
void
*
ctx
);
62
63
void
ip4_session_table_walk
(clib_bihash_16_8_t * hash,
64
ip4_session_table_walk_fn_t
fn,
void
*arg);
65
66
session_table_t
*
session_table_alloc
(
void
);
67
session_table_t
*
session_table_get
(
u32
table_index);
68
u32
session_table_index
(
session_table_t
* slt);
69
void
session_table_init
(
session_table_t
* slt,
u8
fib_proto);
70
71
/* Internal, try not to use it! */
72
session_table_t
*_get_session_tables ();
73
74
#define session_table_foreach(VAR, BODY) \
75
pool_foreach (VAR, _get_session_tables ()) BODY
76
77
#endif
/* SRC_VNET_SESSION_SESSION_TABLE_H_ */
78
/* *INDENT-ON* */
79
/*
80
* fd.io coding-style-patch-verification: ON
81
*
82
* Local Variables:
83
* eval: (c-set-style "gnu")
84
* End:
85
*/
CLIB_CACHE_LINE_ALIGN_MARK
#define CLIB_CACHE_LINE_ALIGN_MARK(mark)
Definition:
cache.h:60
session_rules_table.h
session_table_init
void session_table_init(session_table_t *slt, u8 fib_proto)
Initialize session table hash tables.
Definition:
session_table.c:70
session_rules_table_t
struct _session_rules_table_t session_rules_table_t
ip4_session_table_walk_fn_t
int(* ip4_session_table_walk_fn_t)(clib_bihash_kv_16_8_t *kvp, void *ctx)
Definition:
session_table.h:60
session_table_alloc
session_table_t * session_table_alloc(void)
Definition:
session_table.c:31
session_table_index
u32 session_table_index(session_table_t *slt)
Definition:
session_table.c:40
ip4_session_table_walk
void ip4_session_table_walk(clib_bihash_16_8_t *hash, ip4_session_table_walk_fn_t fn, void *arg)
Definition:
session_table.c:152
clib_bihash_kv_16_8_t
Definition:
bihash_16_8.h:40
u32
unsigned int u32
Definition:
types.h:88
ctx
long ctx[MAX_CONNS]
Definition:
main.c:144
bihash_16_8.h
u8
unsigned char u8
Definition:
types.h:56
is_local
bool is_local
Definition:
ikev2_types.api:33
session_table_get
session_table_t * session_table_get(u32 table_index)
Definition:
session_table.c:46
session_table_t
struct _session_lookup_table session_table_t
bihash_48_8.h
src
vnet
session
session_table.h
Generated on Sat Jan 8 2022 10:05:28 for FD.io VPP by
1.8.17