FD.io VPP  v16.09
Vector Packet Processing
cnat_ipv4_icmp.h
Go to the documentation of this file.
1 /*
2  *-----------------------------------------------------------------------------
3  *
4  * Filename: cnat_ipv4_icmp.h
5  *
6  * Description: common functions for icmp node
7  *
8  * Assumptions and Constraints:
9  *
10  * Copyright (c) 2000-2009, 2014 Cisco and/or its affiliates.
11  * Licensed under the Apache License, Version 2.0 (the "License");
12  * you may not use this file except in compliance with the License.
13  * You may obtain a copy of the License at:
14  *
15  * http://www.apache.org/licenses/LICENSE-2.0
16  *
17  * Unless required by applicable law or agreed to in writing, software
18  * distributed under the License is distributed on an "AS IS" BASIS,
19  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
20  * See the License for the specific language governing permissions and
21  * limitations under the License.
22  *-----------------------------------------------------------------------------
23  */
24 
25 #ifndef __CNAT_IPV4_ICMP_H__
26 #define __CNAT_IPV4_ICMP_H__
27 
28 #include "tcp_header_definitions.h"
29 #include "cnat_db.h"
30 #include "cnat_v4_functions.h"
31 #include "cnat_global.h"
32 #include "cnat_config.h"
33 
34 typedef struct {
40 
41 extern void swap_ip_src_icmp_id(ipv4_header *ip,
42  icmp_v4_t *icmp,
44  u16 vrf);
45 
46 extern void swap_ip_dst_icmp_id(ipv4_header *ip,
47  icmp_v4_t *icmp,
49  u16 vrf);
50 
51 extern void swap_ip_src_emip_dst(ipv4_header *ip,
52  icmp_em_ip_info *icmp_info,
53  cnat_main_db_entry_t *db, u16 vrf);
54 
55 extern void swap_ip_dst_emip_src(ipv4_header *ip,
56  icmp_em_ip_info *icmp_info,
57  cnat_main_db_entry_t *db, u16 vrf);
58 
59 
60 #endif /* __CNAT_IPV4_ICMP_H__ */
void swap_ip_src_icmp_id(ipv4_header *ip, icmp_v4_t *icmp, cnat_main_db_entry_t *db, u16 vrf)
Definition: cnat_db.h:153
ipv4_header * em_ip
void swap_ip_dst_emip_src(ipv4_header *ip, icmp_em_ip_info *icmp_info, cnat_main_db_entry_t *db, u16 vrf)
void swap_ip_dst_icmp_id(ipv4_header *ip, icmp_v4_t *icmp, cnat_main_db_entry_t *db, u16 vrf)
void swap_ip_src_emip_dst(ipv4_header *ip, icmp_em_ip_info *icmp_info, cnat_main_db_entry_t *db, u16 vrf)
unsigned short u16
Definition: types.h:57
icmp_v4_t * icmp