FD.io VPP
v16.06
Vector Packet Processing
Main Page
Related Pages
Data Structures
Source
Files
Symbols
nat64_tcp_sm.h
Go to the documentation of this file.
1
/*
2
*------------------------------------------------------------------
3
* nat64_tcp_sm.h - Stateful NAT64 translation TCP State machine
4
*
5
* Copyright (c) 2011 Cisco and/or its affiliates.
6
* Licensed under the Apache License, Version 2.0 (the "License");
7
* you may not use this file except in compliance with the License.
8
* You may obtain a copy of the License at:
9
*
10
* http://www.apache.org/licenses/LICENSE-2.0
11
*
12
* Unless required by applicable law or agreed to in writing, software
13
* distributed under the License is distributed on an "AS IS" BASIS,
14
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
15
* See the License for the specific language governing permissions and
16
* limitations under the License.
17
*------------------------------------------------------------------
18
*/
19
#ifndef __NAT64_TCP_SM_H__
20
#define __NAT64_TCP_SM_H__
21
22
23
/* TCP States */
24
typedef
enum
{
25
TCP_CLOSED
,
26
TCP_V4_INIT
,
27
TCP_V6_INIT
,
28
TCP_ESTABLISHED
,
29
TCP_V4_FIN_RCV
,
30
TCP_V6_FIN_RCV
,
31
TCP_V4V6_FIN_RCV
,
32
TCP_TRANS
,
33
TCP_NONE
34
}
nat64_tcp_states
;
35
36
/* TCP Events */
37
typedef
enum
{
38
TCP_TIMEOUT_EV
,
39
TCP_V6_SYN_EV
,
40
TCP_V4_SYN_EV
,
41
TCP_V6_FIN_EV
,
42
TCP_V4_FIN_EV
,
43
TCP_V6_RST_EV
,
44
TCP_V4_RST_EV
,
45
TCP_DEFAULT_EV
,
46
TCP_EV_COUNT
47
}
nat64_tcp_events
;
48
49
/* TCP Actions */
50
typedef
enum
{
51
TCP_FORWARD
,
52
TCP_COND_FORWARD
,
/* Conditional forward, based on presence of
53
* session and bib entries */
54
TCP_STORE
,
55
TCP_PROBE
,
56
TCP_CREATE_SESSION
,
57
TCP_DELETE_SESSION
,
58
TCP_DROP
,
59
TCP_ACTION_NONE
,
60
TCP_ACTION_COUNT
61
}
nat64_tcp_actions
;
62
63
typedef
struct
{
64
nat64_tcp_states
next_state
;
65
nat64_tcp_actions
action
;
66
}
nat64_tcp_trans_t
;
67
68
typedef
struct
{
69
nat64_tcp_trans_t
event
[
TCP_EV_COUNT
];
70
}
nat64_tcp_state_trans_t
;
71
72
extern
nat64_tcp_state_trans_t
nat64_tcp_sm_lookup
[
TCP_NONE
];
73
74
/*
75
inline void
76
nat64_update_v6_to_v4_tcp (nat64_v6_to_v4_pipeline_data_t *pctx_ptr,
77
nat64_bib_entry_t *bib_ptr);
78
79
inline u8 nat64_v6_to_v4_tcp_perform_action (
80
spp_ctx_t *ctx,
81
nat64_v6_to_v4_pipeline_data_t *pctx_ptr,
82
nat64_bib_entry_t *bib_db,
83
nat64_session_entry_t *session_db);
84
85
inline void
86
nat64_copy_tcp_into_pctx (nat64_v6_to_v4_pipeline_data_t *pctx_ptr);
87
*/
88
89
90
91
#endif
TCP_V6_FIN_RCV
Definition:
nat64_tcp_sm.h:30
nat64_tcp_actions
nat64_tcp_actions
Definition:
nat64_tcp_sm.h:50
nat64_tcp_state_trans_t
Definition:
nat64_tcp_sm.h:68
TCP_TRANS
Definition:
nat64_tcp_sm.h:32
TCP_ACTION_COUNT
Definition:
nat64_tcp_sm.h:60
nat64_tcp_events
nat64_tcp_events
Definition:
nat64_tcp_sm.h:37
TCP_V6_FIN_EV
Definition:
nat64_tcp_sm.h:41
nat64_tcp_trans_t::next_state
nat64_tcp_states next_state
Definition:
nat64_tcp_sm.h:64
TCP_ACTION_NONE
Definition:
nat64_tcp_sm.h:59
TCP_V4_INIT
Definition:
nat64_tcp_sm.h:26
TCP_V6_SYN_EV
Definition:
nat64_tcp_sm.h:39
nat64_tcp_trans_t
Definition:
nat64_tcp_sm.h:63
nat64_tcp_states
nat64_tcp_states
Definition:
nat64_tcp_sm.h:24
TCP_DROP
Definition:
nat64_tcp_sm.h:58
TCP_V4_RST_EV
Definition:
nat64_tcp_sm.h:44
TCP_CLOSED
Definition:
nat64_tcp_sm.h:25
TCP_CREATE_SESSION
Definition:
nat64_tcp_sm.h:56
TCP_V4V6_FIN_RCV
Definition:
nat64_tcp_sm.h:31
TCP_V4_SYN_EV
Definition:
nat64_tcp_sm.h:40
TCP_V4_FIN_EV
Definition:
nat64_tcp_sm.h:42
TCP_DEFAULT_EV
Definition:
nat64_tcp_sm.h:45
TCP_V6_RST_EV
Definition:
nat64_tcp_sm.h:43
TCP_V4_FIN_RCV
Definition:
nat64_tcp_sm.h:29
TCP_PROBE
Definition:
nat64_tcp_sm.h:55
TCP_TIMEOUT_EV
Definition:
nat64_tcp_sm.h:38
TCP_V6_INIT
Definition:
nat64_tcp_sm.h:27
nat64_tcp_sm_lookup
nat64_tcp_state_trans_t nat64_tcp_sm_lookup[TCP_NONE]
TCP_ESTABLISHED
Definition:
nat64_tcp_sm.h:28
TCP_COND_FORWARD
Definition:
nat64_tcp_sm.h:52
TCP_NONE
Definition:
nat64_tcp_sm.h:33
TCP_EV_COUNT
Definition:
nat64_tcp_sm.h:46
TCP_STORE
Definition:
nat64_tcp_sm.h:54
TCP_DELETE_SESSION
Definition:
nat64_tcp_sm.h:57
nat64_tcp_trans_t::action
nat64_tcp_actions action
Definition:
nat64_tcp_sm.h:65
TCP_FORWARD
Definition:
nat64_tcp_sm.h:51
vnet
vnet
vcgn
nat64_tcp_sm.h
Generated on Thu Sep 1 2016 09:11:49 for FD.io VPP by
1.8.11