IPv4 to IPv6 translation.
More...
Go to the source code of this file.
|
static u16 | ip4_get_port (ip4_header_t *ip, u8 sender) |
| Get TCP/UDP port number or ICMP id from IPv4 packet. More...
|
|
static int | icmp_to_icmp6_header (icmp46_header_t *icmp, ip4_header_t **inner_ip4) |
| Convert type and code value from ICMP4 to ICMP6. More...
|
|
static int | icmp_to_icmp6 (vlib_buffer_t *p, ip4_to_ip6_set_fn_t fn, void *ctx, ip4_to_ip6_set_fn_t inner_fn, void *inner_ctx) |
| Translate ICMP4 packet to ICMP6. More...
|
|
static int | ip4_to_ip6_fragmented (vlib_buffer_t *p, ip4_to_ip6_set_fn_t fn, void *ctx) |
| Translate IPv4 fragmented packet to IPv6. More...
|
|
static int | ip4_to_ip6_tcp_udp (vlib_buffer_t *p, ip4_to_ip6_set_fn_t fn, void *ctx) |
| Translate IPv4 UDP/TCP packet to IPv6. More...
|
|
static int | ip4_to_ip6 (vlib_buffer_t *p, ip4_to_ip6_set_fn_t fn, void *ctx) |
| Translate IPv4 packet to IPv6 (IP header only). More...
|
|
IPv4 to IPv6 translation.
Definition in file ip4_to_ip6.h.
◆ frag_id_4to6
#define frag_id_4to6 |
( |
|
id | ) |
(id) |
◆ ip4_to_ip6_set_fn_t
IPv4 to IPv6 set call back function type.
Definition at line 28 of file ip4_to_ip6.h.
◆ icmp_to_icmp6()
Translate ICMP4 packet to ICMP6.
- Parameters
-
p | Buffer to translate. |
fn | The function to translate outer header. |
ctx | A context passed in the outer header translate function. |
inner_fn | The function to translate inner header. |
inner_ctx | A context passed in the inner header translate function. |
- Returns
- 0 on success, non-zero value otherwise.
Definition at line 220 of file ip4_to_ip6.h.
◆ icmp_to_icmp6_header()
static int icmp_to_icmp6_header |
( |
icmp46_header_t * |
icmp, |
|
|
ip4_header_t ** |
inner_ip4 |
|
) |
| |
|
inlinestatic |
Convert type and code value from ICMP4 to ICMP6.
- Parameters
-
icmp | ICMP header. |
inner_ip4 | Inner IPv4 header if present, 0 otherwise. |
- Returns
- 0 on success, non-zero value otherwise.
Definition at line 102 of file ip4_to_ip6.h.
◆ ip4_get_port()
Get TCP/UDP port number or ICMP id from IPv4 packet.
- Parameters
-
ip4 | IPv4 header. |
sender | 1 get sender port, 0 get receiver port. |
- Returns
- Port number on success, 0 otherwise.
Definition at line 51 of file ip4_to_ip6.h.
◆ ip4_to_ip6()
Translate IPv4 packet to IPv6 (IP header only).
- Parameters
-
p | Buffer to translate. |
fn | The function to translate header. |
ctx | A context passed in the header translate function. |
- Returns
- 0 on success, non-zero value otherwise.
Definition at line 601 of file ip4_to_ip6.h.
◆ ip4_to_ip6_fragmented()
Translate IPv4 fragmented packet to IPv6.
- Parameters
-
p | Buffer to translate. |
fn | The function to translate header. |
ctx | A context passed in the header translate function. |
- Returns
- 0 on success, non-zero value otherwise.
Definition at line 450 of file ip4_to_ip6.h.
◆ ip4_to_ip6_tcp_udp()
Translate IPv4 UDP/TCP packet to IPv6.
- Parameters
-
p | Buffer to translate. |
fn | The function to translate header. |
ctx | A context passed in the header translate function. |
- Returns
- 0 on success, non-zero value otherwise.
Definition at line 501 of file ip4_to_ip6.h.
◆ icmp_to_icmp6_updater_pointer_table
u8 icmp_to_icmp6_updater_pointer_table[] |
|
static |
Initial value:=
{ 0, 1, 4, 4, ~0,
~0, ~0, ~0, 7, 6,
~0, ~0, 8, 8, 8,
8, 24, 24, 24, 24
}
Definition at line 32 of file ip4_to_ip6.h.